[dpdk-dev] [PATCH][v4] net/af_xdp: optimize RX path by removing the unneeded allocation mbuf

2020-11-25 Thread Li RongQing
allocation, and free mbuf when receive packets and rx cached_cons must be rollbacked if fail to allocating mbuf, found by Ciara Loftus Signed-off-by: Li RongQing Signed-off-by: Dongsheng Rong --- V2: rollback rx cached_cons if mbuf failed to be allocated V3: add comment when rollback rx

Re: [dpdk-dev] [PATCH][v3] net/af_xdp: optimize RX path by removing the unneeded allocation mbuf

2020-11-24 Thread Li,Rongqing
> > + if (rte_pktmbuf_alloc_bulk(umem->mb_pool, fq_bufs, nb_pkts)) { > > + AF_XDP_LOG(DEBUG, > > + "Failed to get enough buffers for fq.\n"); > > + /* rollback cached_cons which is added by > > +* xsk_ring_prod__needs_wakeup > > +*/ >

[dpdk-dev] [PATCH][v3] net/af_xdp: optimize RX path by removing the unneeded allocation mbuf

2020-11-19 Thread Li RongQing
allocation, and free mbuf when receive packets and rx cached_cons must be rollbacked if fail to allocating mbuf, found by Ciara Loftus Signed-off-by: Li RongQing Signed-off-by: Dongsheng Rong --- V2: rollback rx cached_cons if mbuf failed to be allocated V3: add comment when rollback rx

Re: [dpdk-dev] [PATCH][v2] net/af_xdp: avoid to unnecessary allocation and free mbuf in rx path

2020-11-18 Thread Li,Rongqing
> > Apologies for the delay, I missed your reply Li. > With the data you've provided I think the patch is justified. > I think the rollback requires some explanation in the code as it may not be > immediately clear what is happening. > I suggest a v3 with either a comment above the rollback, or a

Re: [dpdk-dev] [PATCH][v2] net/af_xdp: avoid to unnecessary allocation and free mbuf in rx path

2020-10-14 Thread Li,Rongqing
> -Original Message- > From: Loftus, Ciara [mailto:ciara.lof...@intel.com] > Sent: Friday, October 02, 2020 12:24 AM > To: Li,Rongqing > Cc: dev@dpdk.org > Subject: RE: [PATCH][v2] net/af_xdp: avoid to unnecessary allocation and free > mbuf in rx path > >

Re: [dpdk-dev] [PATCH] net/bonding: fix a possible unbalance packet receiving

2020-10-09 Thread Li,Rongqing
Ping, should I resend this? Thanks -Li

Re: [dpdk-dev] [PATCH] net/bonding: fix a possible unbalance packet receiving

2020-09-30 Thread Li,Rongqing
Fixes: ae2a04864a9a "(net/bonding: reduce slave starvation on Rx poll)" Thanks -Li From: Wei Hu (Xavier) [mailto:huwei...@chinasoftinc.com] Sent: Wednesday, September 30, 2020 4:41 PM To: Li,Rongqing Cc: dev@dpdk.org; Wei Hu (Xavier) Subject: Re: [dpdk-dev] [PATCH] net/bonding: fix

Re: [dpdk-dev] [PATCH] net/bonding: fix a possible unbalance packet receiving

2020-09-29 Thread Li RongQing
ping thanks -Li

[dpdk-dev] [PATCH][v2] net/af_xdp: avoid to unnecessary allocation and free mbuf in rx path

2020-09-24 Thread Li RongQing
allocation, and free mbuf when receive packets V2: rollback rx cached_cons if mbuf failed to be allocated Signed-off-by: Li RongQing Signed-off-by: Dongsheng Rong --- drivers/net/af_xdp/rte_eth_af_xdp.c | 67 - 1 file changed, 29 insertions(+), 38 deletions

[dpdk-dev] [PATCH 1/2] net/bonding: fix a possible unbalance packet receiving

2020-09-22 Thread Li RongQing
time RX, this is a kind of cache false share, low performance. so move active_slave from bond_dev_private to bond_rx_queue make it as per queue variable Signed-off-by: Li RongQing Signed-off-by: Dongsheng Rong --- drivers/net/bonding/eth_bond_private.h | 3 ++- drivers/net/bonding

[dpdk-dev] [PATCH 2/2] net/bonding: fix RX queue conversion

2020-09-22 Thread Li RongQing
From: Dongsheng Rong it should be bond_rx_queue in bond_ethdev_rx_burst_alb in RX path, not bond_tx_queue Fixes: 06fe78b98ccd ("bond: add mode 6") Signed-off-by: Dongsheng Rong Signed-off-by: Li RongQing --- drivers/net/bonding/rte_eth_bond_pmd.c | 4 ++-- 1 file changed, 2 insert

Re: [dpdk-dev] [PATCH 2/2] af_xdp: avoid to unnecessary allocation and free mbuf

2020-09-19 Thread Li,Rongqing
> -Original Message- > From: Loftus, Ciara [mailto:ciara.lof...@intel.com] > Sent: Friday, September 18, 2020 5:39 PM > To: Li,Rongqing > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH 2/2] af_xdp: avoid to unnecessary allocation > and > free mbuf > >

[dpdk-dev] [PATCH][V2] net/af_xdp: avoid deadlock due to empty fill queue

2020-09-18 Thread Li RongQing
unable to reserve fill queue because dpdk has not pakcets to receive, at last deadlock will happen so move reserve fill queue before xsk_ring_cons__peek to fix it Acked-by: Ciara Loftus Signed-off-by: Li RongQing Signed-off-by: Dongsheng Rong Cc: sta...@dpdk.org --- diff with v1: cc sta

Re: [dpdk-dev] [PATCH] af_xdp: avoid deadlock due to empty fill queue

2020-09-18 Thread Li,Rongqing
> -Original Message- > From: Loftus, Ciara [mailto:ciara.lof...@intel.com] > Sent: Friday, September 18, 2020 5:27 PM > To: Li,Rongqing ; dev@dpdk.org > Cc: sta...@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] af_xdp: avoid deadlock due to empty fill queue > > &g

Re: [dpdk-dev] [PATCH 2/2] af_xdp: avoid to unnecessary allocation and free mbuf

2020-09-18 Thread Li,Rongqing
> -Original Message- > From: Loftus, Ciara [mailto:ciara.lof...@intel.com] > Sent: Friday, September 18, 2020 5:39 PM > To: Li,Rongqing > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH 2/2] af_xdp: avoid to unnecessary allocation > and > free mbuf > >

Re: [dpdk-dev] [PATCH 1/2] af_xdp: not return a negative value in af_xdp_rx_zc

2020-09-17 Thread Li,Rongqing
> -Original Message- > From: Loftus, Ciara [mailto:ciara.lof...@intel.com] > Sent: Thursday, September 17, 2020 3:33 PM > To: Li,Rongqing > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH 1/2] af_xdp: not return a negative value in > af_xdp_rx_zc > > >

[dpdk-dev] [PATCH] af_xdp: avoid deadlock due to empty fill queue

2020-09-17 Thread Li RongQing
unable to reserve fill queue because dpdk has not pakcets to receive, at last deadlock will happen so move reserve fill queue before xsk_ring_cons__peek to fix it Signed-off-by: Li RongQing --- drivers/net/af_xdp/rte_eth_af_xdp.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff

[dpdk-dev] [PATCH] dpdk: avoid deadlock due to empty fill queue

2020-09-17 Thread Li RongQing
Signed-off-by: Li RongQing --- drivers/net/af_xdp/rte_eth_af_xdp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c b/drivers/net/af_xdp/rte_eth_af_xdp.c index 48824050e..de830825d 100644 --- a/drivers/net/af_xdp/rte_eth_af_xdp.c

[dpdk-dev] [PATCH 1/2] af_xdp: not return a negative value in af_xdp_rx_zc

2020-09-16 Thread Li RongQing
af_xdp_rx_zc should always return the number of received packets, and negative value will be as number of received packets, and confuse the caller Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Li RongQing --- drivers/

[dpdk-dev] [PATCH 2/2] af_xdp: avoid to unnecessary allocation and free mbuf

2020-09-16 Thread Li RongQing
optimize rx performance, by allocating mbuf based on result of xsk_ring_cons__peek, to avoid to redundancy allocation, and free mbuf when receive packets Signed-off-by: Li RongQing Signed-off-by: Dongsheng Rong --- drivers/net/af_xdp/rte_eth_af_xdp.c | 64

[dpdk-dev] [PATCH 1/2] af_xdp: not return a negative value in af_xdp_rx_zc

2020-09-16 Thread Li RongQing
af_xdp_rx_zc should always return the number of received packets, and negative value will be as number of received packets, and confuse the caller Fixes: d8a210774e1d ("net/af_xdp: support unaligned umem chunks") Cc: sta...@dpdk.org Signed-off-by: Li RongQing --- drivers/