DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/af_xdp: correct xdp frame size
@ 2019-07-07 15:57 Xiaolong Ye
  2019-07-08  8:26 ` David Marchand
  2019-07-08 18:08 ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Xiaolong Ye @ 2019-07-07 15:57 UTC (permalink / raw)
  To: Ferruh Yigit, Xiaolong Ye, Qi Zhang; +Cc: dev

XSK_UMEM__DEFAULT_FRAME_SIZE has been changed to 4096 in kernel commit
123e8da1d330 (xsk: Change the default frame size to 4096 and allow
controlling it), but we still need to keep ETH_AF_XDP_FRAME_SIZE as 2048 to
fit most dpdk apps.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
---
 drivers/net/af_xdp/rte_eth_af_xdp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c
index 5ce90a760..ff8e90589 100644
--- a/drivers/net/af_xdp/rte_eth_af_xdp.c
+++ b/drivers/net/af_xdp/rte_eth_af_xdp.c
@@ -56,7 +56,7 @@ static int af_xdp_logtype;
 	rte_log(RTE_LOG_ ## level, af_xdp_logtype,	\
 		"%s(): " fmt, __func__, ##args)
 
-#define ETH_AF_XDP_FRAME_SIZE		XSK_UMEM__DEFAULT_FRAME_SIZE
+#define ETH_AF_XDP_FRAME_SIZE		2048
 #define ETH_AF_XDP_NUM_BUFFERS		4096
 #define ETH_AF_XDP_DATA_HEADROOM	0
 #define ETH_AF_XDP_DFLT_NUM_DESCS	XSK_RING_CONS__DEFAULT_NUM_DESCS
-- 
2.17.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] net/af_xdp: correct xdp frame size
  2019-07-07 15:57 [dpdk-dev] [PATCH] net/af_xdp: correct xdp frame size Xiaolong Ye
@ 2019-07-08  8:26 ` David Marchand
  2019-07-08  9:14   ` Bruce Richardson
  2019-07-08 18:08 ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: David Marchand @ 2019-07-08  8:26 UTC (permalink / raw)
  To: Xiaolong Ye; +Cc: Ferruh Yigit, Qi Zhang, dev

On Mon, Jul 8, 2019 at 10:03 AM Xiaolong Ye <xiaolong.ye@intel.com> wrote:

> XSK_UMEM__DEFAULT_FRAME_SIZE has been changed to 4096 in kernel commit
> 123e8da1d330 (xsk: Change the default frame size to 4096 and allow
> controlling it), but we still need to keep ETH_AF_XDP_FRAME_SIZE as 2048 to
> fit most dpdk apps.
>

I might have missed something, but can't you use the mbuf size from the
packet mempool passed at rx_queue_setup?


-- 
David Marchand

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] net/af_xdp: correct xdp frame size
  2019-07-08  8:26 ` David Marchand
@ 2019-07-08  9:14   ` Bruce Richardson
  0 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2019-07-08  9:14 UTC (permalink / raw)
  To: David Marchand; +Cc: Xiaolong Ye, Ferruh Yigit, Qi Zhang, dev

On Mon, Jul 08, 2019 at 10:26:18AM +0200, David Marchand wrote:
> On Mon, Jul 8, 2019 at 10:03 AM Xiaolong Ye <xiaolong.ye@intel.com> wrote:
> 
> > XSK_UMEM__DEFAULT_FRAME_SIZE has been changed to 4096 in kernel commit
> > 123e8da1d330 (xsk: Change the default frame size to 4096 and allow
> > controlling it), but we still need to keep ETH_AF_XDP_FRAME_SIZE as 2048 to
> > fit most dpdk apps.
> >
> 
> I might have missed something, but can't you use the mbuf size from the
> packet mempool passed at rx_queue_setup?
> 
Sadly not - but we are working on ways to allow that. Right now, the kernel
only allows 2k aligned buffers of 2k or 4k in size for packet IO, which
prevents regular mbuf pools from working. There is work in progress to
relax those restrictions, but it's not yet ready for kernel acceptance.
The V1 of the set can be seen at: https://www.spinics.net/lists/netdev/msg579786.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] net/af_xdp: correct xdp frame size
  2019-07-07 15:57 [dpdk-dev] [PATCH] net/af_xdp: correct xdp frame size Xiaolong Ye
  2019-07-08  8:26 ` David Marchand
@ 2019-07-08 18:08 ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-07-08 18:08 UTC (permalink / raw)
  To: Xiaolong Ye, Qi Zhang; +Cc: dev

On 7/7/2019 4:57 PM, Xiaolong Ye wrote:
> XSK_UMEM__DEFAULT_FRAME_SIZE has been changed to 4096 in kernel commit
> 123e8da1d330 (xsk: Change the default frame size to 4096 and allow
> controlling it), but we still need to keep ETH_AF_XDP_FRAME_SIZE as 2048 to
> fit most dpdk apps.
> 
> Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-08 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-07 15:57 [dpdk-dev] [PATCH] net/af_xdp: correct xdp frame size Xiaolong Ye
2019-07-08  8:26 ` David Marchand
2019-07-08  9:14   ` Bruce Richardson
2019-07-08 18:08 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).