[PATCH] net/af_xdp: allow using copy mode in XSK

Zhang, Qi Z qi.z.zhang at intel.com
Tue Jun 14 01:38:21 CEST 2022



> -----Original Message-----
> From: Li, Xiaoyun <xiaoyun.li at intel.com>
> Sent: Monday, June 13, 2022 11:13 PM
> To: Loftus, Ciara <ciara.loftus at intel.com>; Zhang, Qi Z
> <qi.z.zhang at intel.com>; dev at dpdk.org
> Cc: Li, Xiaoyun <xiaoyun.li at intel.com>
> Subject: [PATCH] net/af_xdp: allow using copy mode in XSK
> 
> DPDK assumes that users only want AF_XDP socket (XSK) into zero copy mode
> when the kernel supports it. However, sometimes kernel driver doesn't
> support it well and copy mode is more stable and preferred.

rename "no_zerocopy" to "force_copy" looks better? 

This aligned with the comment on the macro definition in kernel

#define XDP_COPY        (1 << 1) /* Force copy-mode */

And also make the below code more smooth.

	if (internals->force_copy)
		cfg.bind_flags |= XDP_COPY;





More information about the dev mailing list