From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John Daley (johndale)" Subject: Re: [PATCH v2] net/enic: add private API to set ingress VLAN rewrite mode Date: Wed, 13 Mar 2019 21:11:23 +0000 Message-ID: References: <20190305055659.3095-1-hyonkim@cisco.com> <20190305071134.21725-1-hyonkim@cisco.com> <399e1eeb-3c3f-ac73-03e9-2e37b2d8ef52@intel.com> <155267265.tCld3OmuaL@xps> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: Andrew Rybchenko , Qi Zhang , "dev@dpdk.org" , Shahaf Shuler , Jerin Jacob , "David Marchand" , Maxime Coquelin , Konstantin Ananyev , Hemant Agrawal , Stephen Hemminger To: Thomas Monjalon , Ferruh Yigit , "Hyong Youb Kim (hyonkim)" Return-path: Received: from alln-iport-2.cisco.com (alln-iport-2.cisco.com [173.37.142.89]) by dpdk.org (Postfix) with ESMTP id B0342324D for ; Wed, 13 Mar 2019 22:11:34 +0100 (CET) In-Reply-To: <155267265.tCld3OmuaL@xps> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Due to time zone differences, I'll answer for Hyong (below). -john > -----Original Message----- > From: Thomas Monjalon > Sent: Wednesday, March 13, 2019 1:36 PM > To: Ferruh Yigit ; Hyong Youb Kim (hyonkim) > > Cc: Andrew Rybchenko ; Qi Zhang > ; dev@dpdk.org; John Daley (johndale) > ; Shahaf Shuler ; Jerin Jacob > ; David Marchand > ; Maxime Coquelin > ; Konstantin Ananyev > ; Hemant Agrawal > ; Stephen Hemminger > > Subject: Re: [PATCH v2] net/enic: add private API to set ingress VLAN rew= rite > mode >=20 > 13/03/2019 19:32, Ferruh Yigit: > > On 3/5/2019 7:11 AM, Hyong Youb Kim wrote: > > > The driver currently has a devarg to set the rewrite mode during > > > init. Some apps want to programatically set it after running > > > rte_eal_init() and finding that ports are VIC. Add a private > > > function to support such applications. > > > > It is not good idea to have PMD specific APIs (although we already have > some). > > > > Specific to this case, as far as I can see it is to pass a config > > value and do the action related to it, what would you think having a > > generic key/value set/get API in ethdev for this? Similar to rawdev > get_attr/set_attr [1]? > > > > My concern is it may turn into something like ioctl with many things > > pushed to it, and cause possible duplication ... >=20 > Yes, it is clearly ioctl style. >=20 > Please could you explain more what is the rewrite mode? > Does it apply to the port or the queue? >=20 It applies to a port. By default the Cisco VIC VLAN tags every packet on in= gress even if they were untagged coming in on the wire. They are tagged wit= h VLAN 0 or a VLAN id programmed into the NIC depending on the configuratio= n. Its part of the original design, to maintain priority bits, ancient hist= ory. Some apps don't like this (VPP) or take a slower path (OVS). Hyong added a = ig-vlan-rewrite=3Duntag devarg to disable this (leave untagged/default vlan= packets untagged) during rte_eal_init and this is helpful for OVS, but VPP= likes to set the rewrite mode after rte_eal_init() and finding the ports a= re VIC ports. So that is the reasoning behind the private API call.