mbox series

[v2,0/2] i40e Rx descriptor loads ordering

Message ID 20210915083339.2424369-1-ruifeng.wang@arm.com (mailing list archive)
Headers
Series i40e Rx descriptor loads ordering |

Message

Ruifeng Wang Sept. 15, 2021, 8:33 a.m. UTC
  On Rx path, NIC fills Rx descriptor with data pertains to received packet.

A single descriptor consists of multiple words. Word1 has the bit that
indicates readiness of descriptor for software to use. So word1 should
be loaded before other words.

On architectures with weaker memory ordering, barrier is needed to ensure
the ordering of loads.

This patch set fixed the risk on both scalar path and aarch64 vector path.

v2:
Updated commit message. Performance impact added. (Honnappa)

Ruifeng Wang (2):
  net/i40e: fix risk in Rx descriptor read in NEON vector path
  net/i40e: fix risk in Rx descriptor read in scalar path

 drivers/net/i40e/i40e_rxtx.c          | 12 ++++++++++++
 drivers/net/i40e/i40e_rxtx_vec_neon.c |  8 ++++++++
 2 files changed, 20 insertions(+)
  

Comments

Qi Zhang Sept. 24, 2021, 11:08 a.m. UTC | #1
> -----Original Message-----
> From: Ruifeng Wang <ruifeng.wang@arm.com>
> Sent: Wednesday, September 15, 2021 4:34 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> Richardson, Bruce <bruce.richardson@intel.com>; jerinj@marvell.com;
> hemant.agrawal@nxp.com; drc@linux.vnet.ibm.com;
> honnappa.nagarahalli@arm.com; stable@dpdk.org; nd@arm.com; Ruifeng
> Wang <ruifeng.wang@arm.com>
> Subject: [PATCH v2 0/2] i40e Rx descriptor loads ordering
> 
> On Rx path, NIC fills Rx descriptor with data pertains to received packet.
> 
> A single descriptor consists of multiple words. Word1 has the bit that indicates
> readiness of descriptor for software to use. So word1 should be loaded before
> other words.
> 
> On architectures with weaker memory ordering, barrier is needed to ensure
> the ordering of loads.
> 
> This patch set fixed the risk on both scalar path and aarch64 vector path.
> 
> v2:
> Updated commit message. Performance impact added. (Honnappa)
> 
> Ruifeng Wang (2):
>   net/i40e: fix risk in Rx descriptor read in NEON vector path
>   net/i40e: fix risk in Rx descriptor read in scalar path
> 
>  drivers/net/i40e/i40e_rxtx.c          | 12 ++++++++++++
>  drivers/net/i40e/i40e_rxtx_vec_neon.c |  8 ++++++++
>  2 files changed, 20 insertions(+)
> 
> --
> 2.25.1

Applied to dpdk-next-net-intel.

Thanks
Qi