> -----Original Message----- > From: Rong, Leyi <leyi.r...@intel.com> > Sent: Monday, December 13, 2021 11:03 > To: Bin Zheng <zhengbin.89...@bytedance.com>; dev@dpdk.org > Cc: Wang, Haiyue <haiyue.w...@intel.com>; lian...@liangbit.com; > sta...@dpdk.org; jia....@intel.com > Subject: RE: [PATCH v3] net/ixgbe: add vector Rx parameter check > > > > -----Original Message----- > > From: Bin Zheng <zhengbin.89...@bytedance.com> > > Sent: Friday, December 10, 2021 4:22 PM > > To: dev@dpdk.org > > Cc: Wang, Haiyue <haiyue.w...@intel.com>; lian...@liangbit.com; > > sta...@dpdk.org; Rong, Leyi <leyi.r...@intel.com>; Bin Zheng > > <zhengbin.89...@bytedance.com>; jia....@intel.com > > Subject: [PATCH v3] net/ixgbe: add vector Rx parameter check > > > > Under the circumstance that `rx_tail` wrap back to zero and the advance > > speed > > of `rx_tail` is greater than `rxrearm_start`, `rx_tail` will catch up with > > `rxrearm_start` and surpass it. > > This may cause some mbufs be reused by application. > > > > So we need to make some restrictions to ensure that `rx_tail` will not > > exceed > > `rxrearm_start`. > > > > e.g. > > > > RDH: 972 RDT: 991 rxrearm_nb: 991 rxrearm_start: 992 rx_tail: 959 > > RDH: 1004 RDT: 1023 rxrearm_nb: 991 rxrearm_start: 0 rx_tail: 991 > > RDH: 12 RDT: 31 rxrearm_nb: 991 rxrearm_start: 32 rx_tail: 1023 > > RDH: 31 RDT: 63 rxrearm_nb: 960 rxrearm_start: 64 rx_tail: 0 > > RDH: 95 RDT: 95 rxrearm_nb: 1016 rxrearm_start: 96 rx_tail: 88 > > RDH: 95 RDT: 127 rxrearm_nb: 991 rxrearm_start: 128 rx_tail: 95 ... > > RDH: 908 RDT: 927 rxrearm_nb: 991 rxrearm_start: 928 rx_tail: 895 > > RDH: 940 RDT: 959 rxrearm_nb: 991 rxrearm_start: 960 rx_tail: 927 > > RDH: 980 RDT: 991 rxrearm_nb: 991 rxrearm_start: 992 rx_tail: 959 > > RDH: 991 RDT: 991 rxrearm_nb: 1026 rxrearm_start: 992 rx_tail: 994 > > > > when `rx_tail` catches up with `rxrearm_start`, > > 2(994 - 992) mbufs be reused by application ! > > > > Bugzilla ID: 882 > > Fixes: 5a3cca342417 ("net/ixgbe: fix vector Rx") > > Cc: jia....@intel.com > > Cc: sta...@dpdk.org > > > > Signed-off-by: Bin Zheng <zhengbin.89...@bytedance.com> > > --- > > drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > >
> > Acked-by: Leyi Rong <leyi.r...@intel.com> Reviewed-by: Haiyue Wang <haiyue.w...@intel.com>