All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charlie Somerville <charlie@charlie.bz>
To: davem@davemloft.net, kuba@kernel.org, mst@redhat.com,
	jasowang@redhat.com
Cc: netdev@vger.kernel.org, Charlie Somerville <charlie@charlie.bz>
Subject: [PATCH net-next 0/2] Introduce XDP_FLAGS_NO_TX flag
Date: Sat,  9 Jan 2021 13:49:48 +1100	[thread overview]
Message-ID: <20210109024950.4043819-1-charlie@charlie.bz> (raw)

This patch series introduces a new flag XDP_FLAGS_NO_TX which prevents
the allocation of additional send queues for XDP programs.

Included in this patch series is an implementation of XDP_FLAGS_NO_TX
for the virtio_net driver. This flag is intended to be advisory - not
all drivers must implement support for it.

Many virtualised environments only provide enough virtio_net send queues
for the number of processors allocated to the VM:

# nproc
8
# ethtool --show-channels ens3
Channel parameters for ens3:
Pre-set maximums:
RX:     0
TX:     0
Other:      0
Combined:   8

In this configuration XDP is unusable because the virtio_net driver
always tries to allocate an extra send queue for each processor - even
if the XDP the program never uses the XDP_TX functionality.

While XDP_TX is still unavailable in these environments, this new flag
expands the set of XDP programs that can be used.

This is my first contribution to the kernel, so apologies if I've sent
this to the wrong list. I have tried to cc relevant maintainers but
it's possible I may have missed some people. I'm looking forward to
receiving feedback on this change.

Charlie Somerville (2):
  xdp: Add XDP_FLAGS_NO_TX flag
  virtio_net: Implement XDP_FLAGS_NO_TX support

 drivers/net/virtio_net.c     | 17 +++++++++++++----
 include/uapi/linux/if_link.h |  5 ++++-
 2 files changed, 17 insertions(+), 5 deletions(-)

-- 
2.30.0


             reply	other threads:[~2021-01-09  2:52 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-09  2:49 Charlie Somerville [this message]
2021-01-09  2:49 ` [PATCH net-next 1/2] xdp: Add XDP_FLAGS_NO_TX flag Charlie Somerville
2021-01-09  2:49 ` [PATCH net-next 2/2] virtio_net: Implement XDP_FLAGS_NO_TX support Charlie Somerville
2021-01-10 17:31   ` Shay Agroskin
2021-01-11  1:24     ` Charlie Somerville
2021-01-11 10:15       ` Shay Agroskin
2021-01-11 11:10 ` [PATCH net-next 0/2] Introduce XDP_FLAGS_NO_TX flag Toke Høiland-Jørgensen
2021-01-12  3:03 ` Jason Wang
2021-01-12  4:38   ` Charlie Somerville

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=20210109024950.4043819-1-charlie@charlie.bz \
    --to=charlie@charlie.bz \
    --cc=davem@davemloft.net \
    --cc=jasowang@redhat.com \
    --cc=kuba@kernel.org \
    --cc=mst@redhat.com \
    --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.