[dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new Ethdev Tx offloads API

Lu, Wenzhuo wenzhuo.lu at intel.com
Tue Jan 9 12:37:07 CET 2018


Hi Shahaf,

> -----Original Message-----
> From: Shahaf Shuler [mailto:shahafs at mellanox.com]
> Sent: Tuesday, January 9, 2018 6:02 PM
> To: Lu, Wenzhuo <wenzhuo.lu at intel.com>; Wu, Jingjing
> <jingjing.wu at intel.com>; Yigit, Ferruh <ferruh.yigit at intel.com>
> Cc: dev at dpdk.org
> Subject: RE: [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new
> Ethdev Tx offloads API
> 
> Tuesday, January 9, 2018 9:14 AM, Lu, Wenzhuo:
> > > The original code doesn't have such restriction because testpmd
> > > wasn't configuring Tx offloads at all. It used it's own Tx offloads
> > > enum (which I removed on later patches) to indicate which offloads is set.
> > > From the device perspective all the Tx offloads should be set.
> > > It did had a way to configure offloads with txqflags parameter, but
> > > this required queues reconfigurations.
> > ' cmd_tx_vlan_set_parsed' is the function which configures TX vlan
> insertion.
> > This patch adds the restriction in it.
> > For example, on ixgbe it does support on the fly configuration. APP
> > doesn't need to stop the device or reconfigure the queues.
> 
> What is mean is that in the old offloads API, all the Tx offloads were enabled
> by default, besides the ones which were masked with txqflags.
> This is why testpmd didn't have any limitation on changing the Tx offloads.
> All of them were enabled, it just needed to choose with which one to use.
> 
> Now, with the new offloads API, the Tx offloads are disabled by default, and
> enabled per application need on device and queue configuration.
> In order to call device/queue configuration the port must be stopped. This is
> requirement from ethdev API.
> 
> Now, there is an API in ethdev to configure Rx VLAN offloads on the flight for
> supported devices.
> If there are devices which supports it also in the Tx side, and you see a good
> use case for that, then need to think of new API in ethdev to configure Tx
> VLAN offloads on the flight.
> 
> However, the plain conversion of testpmd from the old to the new API
> requires the port to be stopped for all of the Tx offloads.
Let's just talk about TX vlan insertion. Actually there's no ethdev API for it. And no configuration for it. Because vlan insertion is simple, it only need to add a vlan tag when transmitting packets.
You can see it's per packet thing. APP can set the ol_flags and vlan_tci in the mbuf of every packet to enable this function for the packet or not. I think it does be a on the fly function on any NIC.



More information about the dev mailing list