Hi Konstantin, > -----Original Message----- > From: Ananyev, Konstantin > Sent: Tuesday, January 9, 2018 8:15 PM > To: Lu, Wenzhuo <wenzhuo...@intel.com>; Shahaf Shuler > <shah...@mellanox.com>; Wu, Jingjing <jingjing...@intel.com>; Yigit, > Ferruh <ferruh.yi...@intel.com> > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new > Ethdev Tx offloads API > > > > > -----Original Message----- > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Lu, Wenzhuo > > Sent: Tuesday, January 9, 2018 11:37 AM > > To: Shahaf Shuler <shah...@mellanox.com>; Wu, Jingjing > > <jingjing...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com> > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH v3 04/10] app/testpmd: convert to new > > Ethdev Tx offloads API > > > > Hi Shahaf, > > > > > -----Original Message----- > > > From: Shahaf Shuler [mailto:shah...@mellanox.com] > > > Sent: Tuesday, January 9, 2018 6:02 PM > > > To: Lu, Wenzhuo <wenzhuo...@intel.com>; Wu, Jingjing > > > <jingjing...@intel.com>; Yigit, Ferruh <ferruh.yi...@intel.com> > > > Cc: dev@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 still need an appropriate TX function be selected, otherwise mbuf- > >vlan_tci will be just ignored. > So you still has to specify at queue_setup flag that you would like to have > VLAN insertion offload enabled. > Konstantin O, it's a good point. I didn't consider the TX path selection.
Acked-by: Wenzhuo Lu <wenzhuo...@intel.com> > > > 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.