[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210109024950.4043819-1-charlie@charlie.bz>
Date: Sat, 9 Jan 2021 13:49:48 +1100
From: Charlie Somerville <charlie@...rlie.bz>
To: davem@...emloft.net, kuba@...nel.org, mst@...hat.com,
jasowang@...hat.com
Cc: netdev@...r.kernel.org, Charlie Somerville <charlie@...rlie.bz>
Subject: [PATCH net-next 0/2] Introduce XDP_FLAGS_NO_TX flag
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
Powered by blists - more mailing lists