[0/3] fix invalid Tx threshhold setup
mbox series

Message ID 20190504092939.25326-1-qi.z.zhang@intel.com
Headers show
Series
  • fix invalid Tx threshhold setup
Related show

Message

Zhang, Qi Z May 4, 2019, 9:29 a.m. UTC
When tx_free_thresh + tx_rs_thresh > nb_desc, it is possible
that an outdated DD status be checked as tx_next_dd, then segment fault
happen due to free a NULL mbuf pointer.

The issue usually happens with an aggresive tx_free_thresh, for example:

./testpmd -c 0x3 -n 4 -- -i --rxq=16 --txq=16 --rxd=1024 --txd=1024 --txfreet=1020

The patchset fix this issue on i40e, ixgbe and ice.

Qi Zhang (3):
  net/i40e: fix invalid Tx threshold setup
  net/ice: fix invalid Tx threshold setup
  net/ixgbe: fix invalid Tx threshold setup

 drivers/net/i40e/i40e_rxtx.c   | 19 +++++++++++++++++--
 drivers/net/ice/ice_rxtx.c     | 21 ++++++++++++++++++---
 drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++--
 3 files changed, 52 insertions(+), 7 deletions(-)

Comments

Xing, Beilei May 15, 2019, 6:36 a.m. UTC | #1
> -----Original Message-----
> From: Zhang, Qi Z
> Sent: Saturday, May 4, 2019 5:30 PM
> To: Xing, Beilei <beilei.xing@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Subject: [PATCH 0/3] fix invalid Tx threshhold setup
> 
> When tx_free_thresh + tx_rs_thresh > nb_desc, it is possible that an
> outdated DD status be checked as tx_next_dd, then segment fault happen
> due to free a NULL mbuf pointer.
> 
> The issue usually happens with an aggresive tx_free_thresh, for example:
> 
> ./testpmd -c 0x3 -n 4 -- -i --rxq=16 --txq=16 --rxd=1024 --txd=1024 --
> txfreet=1020
> 
> The patchset fix this issue on i40e, ixgbe and ice.
> 
> Qi Zhang (3):
>   net/i40e: fix invalid Tx threshold setup
>   net/ice: fix invalid Tx threshold setup
>   net/ixgbe: fix invalid Tx threshold setup
> 
>  drivers/net/i40e/i40e_rxtx.c   | 19 +++++++++++++++++--
>  drivers/net/ice/ice_rxtx.c     | 21 ++++++++++++++++++---
>  drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++--
>  3 files changed, 52 insertions(+), 7 deletions(-)
> 
> --
> 2.13.6

Acked-by: Beilei Xing <beilei.xing@intel.com>
Zhang, Qi Z May 15, 2019, 7:09 a.m. UTC | #2
> -----Original Message-----
> From: Xing, Beilei
> Sent: Wednesday, May 15, 2019 2:36 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Lu, Wenzhuo
> <wenzhuo.lu@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Ananyev,
> Konstantin <konstantin.ananyev@intel.com>
> Cc: dev@dpdk.org
> Subject: RE: [PATCH 0/3] fix invalid Tx threshhold setup
> 
> 
> 
> > -----Original Message-----
> > From: Zhang, Qi Z
> > Sent: Saturday, May 4, 2019 5:30 PM
> > To: Xing, Beilei <beilei.xing@intel.com>; Lu, Wenzhuo
> > <wenzhuo.lu@intel.com>; Yang, Qiming <qiming.yang@intel.com>; Ananyev,
> > Konstantin <konstantin.ananyev@intel.com>
> > Cc: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> > Subject: [PATCH 0/3] fix invalid Tx threshhold setup
> >
> > When tx_free_thresh + tx_rs_thresh > nb_desc, it is possible that an
> > outdated DD status be checked as tx_next_dd, then segment fault happen
> > due to free a NULL mbuf pointer.
> >
> > The issue usually happens with an aggresive tx_free_thresh, for example:
> >
> > ./testpmd -c 0x3 -n 4 -- -i --rxq=16 --txq=16 --rxd=1024 --txd=1024 --
> > txfreet=1020
> >
> > The patchset fix this issue on i40e, ixgbe and ice.
> >
> > Qi Zhang (3):
> >   net/i40e: fix invalid Tx threshold setup
> >   net/ice: fix invalid Tx threshold setup
> >   net/ixgbe: fix invalid Tx threshold setup
> >
> >  drivers/net/i40e/i40e_rxtx.c   | 19 +++++++++++++++++--
> >  drivers/net/ice/ice_rxtx.c     | 21 ++++++++++++++++++---
> >  drivers/net/ixgbe/ixgbe_rxtx.c | 19 +++++++++++++++++--
> >  3 files changed, 52 insertions(+), 7 deletions(-)
> >
> > --
> > 2.13.6
> 
> Acked-by: Beilei Xing <beilei.xing@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi