[dpdk-dev] [PATCH v3 1/3] fm10k: enable FTAG based forwarding

Bruce Richardson bruce.richardson at intel.com
Thu Feb 25 17:14:06 CET 2016


On Thu, Feb 25, 2016 at 03:45:45PM +0000, Chen, Jing D wrote:
> Hi, Bruce,
> 
> > -----Original Message-----
> > From: Richardson, Bruce
> > Sent: Thursday, February 25, 2016 9:35 PM
> > To: Chen, Jing D <jing.d.chen at intel.com>
> > Cc: Thomas Monjalon <thomas.monjalon at 6wind.com>; Wang, Xiao W
> > <xiao.w.wang at intel.com>; dev at dpdk.org
> > Subject: Re: [dpdk-dev] [PATCH v3 1/3] fm10k: enable FTAG based
> > forwarding
> > 
> > On Thu, Feb 25, 2016 at 10:04:02AM +0000, Chen, Jing D wrote:
> > > Hi, Bruce, Thomas,
> > >
> > > Best Regards,
> > > Mark
> > >
> > > > -----Original Message-----
> > > > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Thomas
> > Monjalon
> > > > Sent: Thursday, February 25, 2016 12:38 AM
> > > > To: Richardson, Bruce; Wang, Xiao W
> > > > Cc: dev at dpdk.org
> > > > Subject: Re: [dpdk-dev] [PATCH v3 1/3] fm10k: enable FTAG based
> > > > forwarding
> > > >
> > > > 2016-02-24 15:42, Bruce Richardson:
> > > > > On Thu, Feb 04, 2016 at 11:38:47AM +0800, Wang Xiao W wrote:
> > > > > > This patch enables reading sglort info into mbuf for RX and
> > > > > > inserting an FTAG at the beginning of the packet for TX. The
> > > > > > vlan_tci_outer field selected from rte_mbuf structure for sglort is not
> > used in fm10k now.
> > > > > > In FTAG based forwarding mode, the switch will forward packets
> > > > according
> > > > > > to glort info in FTAG rather than mac and vlan table.
> > > > > >
> > > > > > To activate this feature, user needs to turn
> > > > ``CONFIG_RTE_LIBRTE_FM10K_FTAG_FWD``
> > > > > > to y in common_linuxapp or common_bsdapp. Currently this feature
> > > > > > is
> > > > supported
> > > > > > only on PF, because FM10K_PFVTCTL register is read-only for VF.
> > > > > >
> > > > > > Signed-off-by: Wang Xiao W <xiao.w.wang at intel.com>
> > > > >
> > > > > Any comments on this patch?
> > > > >
> > > > > My thoughts: is there a way in which this could be done without
> > > > > adding in a
> > > > new
> > > > > build time config option?
> > > >
> > > > Bruce, it's simpler to explain that build time options are forbidden
> > > > to enable such options.
> > > > Or the terrific kid's approach: one day, the Big Build-Option Eater
> > > > will come and will eat every undecided features! ;)
> > >
> > > This feature is trying to use FTAG (a unique tech in fm10k) instead of
> > > mac/vlan to forward packets. App need a way to tell PMD driver that
> > > which forwarding style it would like to use.
> > 
> > Why not just specify this in the port configuration at setup time?
> > 
> 
> Please educate me. I think the port configuration flags are also common to all PMD
> Drivers. Is it possible to add a flag like "RTE_USE_FTAG" and pass to PMD driver?
> 
They are. 
For something PMD specific, like FTAG, it's always a challenge, and I don't know
off the top of my head if there is a simple option. However, given the choice
between an mbuf flag and a port config flag, I'd always choose the former.
Other alternatives would be to have a fm10k specific API in the fm10k driver alone.

I'll let Thomas as ethdev maintainer comment if he has other suggestions as to
how to handle this case. I suspect this won't be the first device-specific 
piece of functionality we need to deal with.

/Bruce


More information about the dev mailing list