[Intel-wired-lan] [PATCH v2 4/4] i40e: disallow changing the number of descriptors when AF_XDP is on
Bowers, AndrewX
andrewx.bowers at intel.com
Tue Sep 11 21:59:00 UTC 2018
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at osuosl.org] On
> Behalf Of Björn Töpel
> Sent: Friday, September 7, 2018 1:19 AM
> To: ast at kernel.org; daniel at iogearbox.net; Kirsher, Jeffrey T
> <jeffrey.t.kirsher at intel.com>; intel-wired-lan at lists.osuosl.org;
> jakub.kicinski at netronome.com
> Cc: netdev at vger.kernel.org; Topel, Bjorn <bjorn.topel at intel.com>;
> magnus.karlsson at gmail.com; Karlsson, Magnus
> <magnus.karlsson at intel.com>
> Subject: [Intel-wired-lan] [PATCH v2 4/4] i40e: disallow changing the number
> of descriptors when AF_XDP is on
>
> From: Björn Töpel <bjorn.topel at intel.com>
>
> When an AF_XDP UMEM is attached to any of the Rx rings, we disallow a
> user to change the number of descriptors via e.g. "ethtool -G IFNAME".
>
> Otherwise, the size of the stash/reuse queue can grow unbounded, which
> would result in OOM or leaking userspace buffers.
>
> Signed-off-by: Björn Töpel <bjorn.topel at intel.com>
> ---
> .../net/ethernet/intel/i40e/i40e_ethtool.c | 9 +++++++-
> .../ethernet/intel/i40e/i40e_txrx_common.h | 1 +
> drivers/net/ethernet/intel/i40e/i40e_xsk.c | 22 +++++++++++++++++++
> 3 files changed, 31 insertions(+), 1 deletion(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
More information about the Intel-wired-lan
mailing list