All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Karlsson <thomas.karlsson@paneda.se>
To: "davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Hardcoded multicast queue length in macvlan.c driver causes poor multicast receive performance
Date: Mon, 23 Nov 2020 14:22:31 +0000	[thread overview]
Message-ID: <147b704ac1d5426fbaa8617289dad648@paneda.se> (raw)
In-Reply-To: <485531aec7e243659ee4e3bb7fa2186d@paneda.se>

Hello,

There is a special queue handling in macvlan.c for broadcast and multicast packages that was arbitrarily set to 1000 in commit 07d92d5cc977a7fe1e683e1d4a6f723f7f2778cb . While this is probably sufficient for most uses cases it is insufficient to support high packet rates. I currently have a setup with 144 000 multicast packets incoming per second (144 different live audio RTP streams) and suffer very frequent packet loss. With unicast this is not an issue and I can in addition to the 144kpps load the macvlan interface with another 450mbit/s using iperf.

In order to verify that the queue is the problem I edited the define to 100000 and recompiled the kernel module. After replacing it with rmmod/insmod I get 0 packet loss (measured over 2 days where I before had losses every other second or so) and can also load an additional 450 mbit/s multicast traffic using iperf without losses. So basically no change in performance between unicast/multicast when it comes to lost packets on my machine.

I think It would be best if this queue length was configurable somehow. Either an option when creating the macvlan (like how bridge/passthrough/etc are set) or at least when loading the module (for instance by using a config in /etc/modprobe.d). One size does not fit all in this situation.


Link to code in question using the define (on master):
https://github.com/torvalds/linux/blob/27bba9c532a8d21050b94224ffd310ad0058c353/drivers/net/macvlan.c#L357 

(re-sent in text/plain instead of html)

Best regards,
Thomas Karlsson

       reply	other threads:[~2020-11-23 14:22 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <485531aec7e243659ee4e3bb7fa2186d@paneda.se>
2020-11-23 14:22 ` Thomas Karlsson [this message]
2020-11-23 22:30   ` Hardcoded multicast queue length in macvlan.c driver causes poor multicast receive performance Jakub Kicinski
2020-11-25 12:51     ` Thomas Karlsson
2020-11-25 16:57       ` [PATCH] macvlan: Support for high multicast packet rate Thomas Karlsson
2020-11-25 21:55         ` [PATCH net-next v2] " Thomas Karlsson
2020-11-25 16:58       ` Hardcoded multicast queue length in macvlan.c driver causes poor multicast receive performance Jakub Kicinski
2020-11-25 17:12         ` Thomas Karlsson
2020-11-25 18:07           ` Jakub Kicinski
2020-11-25 22:15             ` Thomas Karlsson
2020-11-25 23:01               ` Jakub Kicinski
2020-11-26 20:00                 ` Thomas Karlsson
2020-11-27 17:27                   ` Jakub Kicinski
2020-11-27 23:13                     ` Thomas Karlsson
2020-11-30 14:00     ` [PATCH net-next v3] macvlan: Support for high multicast packet rate Thomas Karlsson
2020-12-01 19:11       ` Jakub Kicinski
2020-12-02 11:28         ` Thomas Karlsson
2020-12-02 16:44           ` Jakub Kicinski
2020-11-30 14:23     ` [PATCH iproute2-next v1] iplink macvlan: Added bcqueuelen parameter Thomas Karlsson
2020-12-10 16:07       ` Thomas Karlsson
2020-12-11  0:36         ` Jakub Kicinski
2020-12-02 18:49     ` [PATCH net-next v4] macvlan: Support for high multicast packet rate Thomas Karlsson
2020-12-03 16:20       ` Jakub Kicinski
2020-12-03 16:53         ` Thomas Karlsson
2020-12-14 10:42     ` [PATCH iproute2-next v2] iplink:macvlan: Added bcqueuelen parameter Thomas Karlsson
2020-12-14 17:03       ` David Ahern
2020-12-14 17:50         ` Thomas Karlsson
2020-12-16  4:07       ` David Ahern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=147b704ac1d5426fbaa8617289dad648@paneda.se \
    --to=thomas.karlsson@paneda.se \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.