[dpdk-dev] [PATCH v2] net/i40e: do not turn on flexible payload on driver init

Zhang, Helin helin.zhang at intel.com
Tue Jan 9 16:28:04 CET 2018



> -----Original Message-----
> From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Xing, Beilei
> Sent: Monday, January 8, 2018 1:42 PM
> To: Rybalchenko, Kirill; dev at dpdk.org
> Cc: Rybalchenko, Kirill; Chilikin, Andrey; Wu, Jingjing
> Subject: Re: [dpdk-dev] [PATCH v2] net/i40e: do not turn on flexible payload on
> driver init
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Kirill
> > Rybalchenko
> > Sent: Friday, January 5, 2018 1:45 AM
> > To: dev at dpdk.org
> > Cc: Rybalchenko, Kirill <kirill.rybalchenko at intel.com>; Chilikin,
> > Andrey <andrey.chilikin at intel.com>; Xing, Beilei
> > <beilei.xing at intel.com>; Wu, Jingjing <jingjing.wu at intel.com>
> > Subject: [dpdk-dev] [PATCH v2] net/i40e: do not turn on flexible
> > payload on driver init
> >
> > Function i40e_GLQF_reg_init() overwrites global register for flexible
> > payload, forcing extraction of first 16 bytes of
> > L2/L3/L4 payload to the field vector even if flexible payload is not
> > used by an application. Such unconditional turn on of flexible payload
> > effectively disables ability to use outer IP Destination address for
> > RSS/FDIR for tunnelled packets, as flexible payload overwrites outer
> > IP destination address on the field vector.
> >
> > Now flexible payload turned on only when flow director is enabled and
> > configured.
> >
> > v1:
> > Global registers will be set only when payload is enabled.
> > They will be reset if payload is disabled or on port reset (uninit).
> >
> > v2:
> > dev_init and dev_close disable flexible payload by default.
> > Flexible payload enabled selectively, only if appropriate PIT is set
> > up. The same done for FDIR and for rte_flow API.
> >
> > Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko at intel.com>
> > ---
> >  drivers/net/i40e/i40e_ethdev.c | 29 ++++++++++++++++++-----------
> > drivers/net/i40e/i40e_ethdev.h |  1 +
> >  drivers/net/i40e/i40e_fdir.c   | 14 +++++++++++---
> >  drivers/net/i40e/i40e_flow.c   |  9 ++++++++-
> >  4 files changed, 38 insertions(+), 15 deletions(-)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> > b/drivers/net/i40e/i40e_ethdev.c index 811cc9f..b136120 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -701,17 +701,6 @@ RTE_PMD_REGISTER_KMOD_DEP(net_i40e, "*
> igb_uio |
> > uio_pci_generic | vfio-pci");  static inline void
> > i40e_GLQF_reg_init(struct i40e_hw *hw)  {
> >  	/*
> > -	 * Force global configuration for flexible payload
> > -	 * to the first 16 bytes of the corresponding L2/L3/L4 paylod.
> > -	 * This should be removed from code once proper
> > -	 * configuration API is added to avoid configuration conflicts
> > -	 * between ports of the same device.
> > -	 */
> > -	I40E_WRITE_REG(hw, I40E_GLQF_ORT(33), 0x000000E0);
> > -	I40E_WRITE_REG(hw, I40E_GLQF_ORT(34), 0x000000E3);
> > -	I40E_WRITE_REG(hw, I40E_GLQF_ORT(35), 0x000000E6);
> > -
> 
> Please also help to change the comment in eth_i40e_dev_init where
> i40e_GLQF_reg_init is involved, since this workaround is removed.
> 
> Apart from that,
> Acked-by: Beilei Xing <beilei.xing at intel.com>
Applied to dpdk-next-net-intel, with minor commit log and annotation changes. Thanks!

/Helin


More information about the dev mailing list