From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2530; q=dns/txt; s=iport; t=1552511494; x=1553721094; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=mrrb8pRRjQdZ7V9HOU23uaIypX0Zjo1jXwIl7ShxwfY=; b=ViVY3jdJrTmrv8mwdCPFZ4+lEwnz119QkY4CJLQzp1ngES3mn6dGdvvC Md9RUTuB+4JWz6SA2Xakikbe3Ny7gWxRB0k0jVHv9wUhnpu+TncqRBmIt 0mPAtH4PH+sGwqim4mo6pqp8C6umb0eHjYDRl3rz0jDogeVpVBj7O0bpI w=; IronPort-PHdr: =?us-ascii?q?9a23=3AfX11IRWKY4mfivySp1ZIEzslDbvV8LGuZFwc94?= =?us-ascii?q?YnhrRSc6+q45XlOgnF6O5wiEPSA9yJ8OpK3uzRta2oGXcN55qMqjgjSNRNTF?= =?us-ascii?q?dE7KdehAk8GIiAAEz/IuTtank4G8REWFZh8lmwMFNeH4D1YFiB6nA=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AEAAC5cYlc/4kNJK1kGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAQGBUQQBAQEBAQsBgTxQA4FcBAsnCodHA4RQildKgg2YLoE?= =?us-ascii?q?kA1QLAQEshEAChEYiNAkNAQEDAQEJAQMCbRwMhUoBAQEBAzoGAQE3AQsEAgE?= =?us-ascii?q?IEQQBAQEeEDIdCAIEAQ0FCIR4AxUBo10CihSCIIJ4AQEFhQ0YggwIgS8Biyw?= =?us-ascii?q?XgUA/gVeCTFmEKoM5giaKKoIAmBMJApM0gXuFZ4tlin2SYAIEAgQFAg4BAQW?= =?us-ascii?q?BRziBVnAVgyeCCoNuilNyAYEnjXoBgR4BAQ?= X-IronPort-AV: E=Sophos;i="5.58,475,1544486400"; d="scan'208";a="245190285" Received: from alln-core-4.cisco.com ([173.36.13.137]) by alln-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 13 Mar 2019 21:11:26 +0000 Received: from XCH-RCD-016.cisco.com (xch-rcd-016.cisco.com [173.37.102.26]) by alln-core-4.cisco.com (8.15.2/8.15.2) with ESMTPS id x2DLBQ80015406 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 13 Mar 2019 21:11:26 GMT Received: from xhs-rtp-003.cisco.com (64.101.210.230) by XCH-RCD-016.cisco.com (173.37.102.26) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 13 Mar 2019 16:11:25 -0500 Received: from xhs-rcd-002.cisco.com (173.37.227.247) by xhs-rtp-003.cisco.com (64.101.210.230) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 13 Mar 2019 17:11:25 -0400 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (72.163.14.9) by xhs-rcd-002.cisco.com (173.37.227.247) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 13 Mar 2019 16:11:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector1-cisco-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mrrb8pRRjQdZ7V9HOU23uaIypX0Zjo1jXwIl7ShxwfY=; b=jK+DiOVoVnCOrqPQTtv/UCV1KgZYi9Ui4Vgbl8L48nS+CCR0iQFYUJ4LtPRioQhOKvvzVAA7/tK+EpqyXmIrK5ATCtYb3UbMNTDLtUgvpgKrR0zfRf68G/dhraVxAzGbuZ3KRCmFSgxFZ/C1ej5iCuoJvEQkgaXNu/rNdQrC3t8= Received: from CY4PR1101MB2215.namprd11.prod.outlook.com (10.174.52.141) by CY4PR1101MB2231.namprd11.prod.outlook.com (10.172.79.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Wed, 13 Mar 2019 21:11:23 +0000 Received: from CY4PR1101MB2215.namprd11.prod.outlook.com ([fe80::6db2:20d4:72ce:7d]) by CY4PR1101MB2215.namprd11.prod.outlook.com ([fe80::6db2:20d4:72ce:7d%6]) with mapi id 15.20.1686.021; Wed, 13 Mar 2019 21:11:23 +0000 From: "John Daley (johndale)" To: Thomas Monjalon , Ferruh Yigit , "Hyong Youb Kim (hyonkim)" CC: Andrew Rybchenko , Qi Zhang , "dev@dpdk.org" , Shahaf Shuler , Jerin Jacob , "David Marchand" , Maxime Coquelin , Konstantin Ananyev , Hemant Agrawal , Stephen Hemminger Thread-Topic: [PATCH v2] net/enic: add private API to set ingress VLAN rewrite mode Thread-Index: AQHU0yLMpEmGk+09d02eFATs3AXnsaYJ8BQAgAAia4CAAAKAcA== 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> In-Reply-To: <155267265.tCld3OmuaL@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=johndale@cisco.com; x-originating-ip: [128.107.241.178] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 76bab376-9f93-44d1-7c67-08d6a7f872a8 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:CY4PR1101MB2231; x-ms-traffictypediagnostic: CY4PR1101MB2231: x-ld-processed: 5ae1af62-9505-4097-a69a-c1553ef7840e,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 09752BC779 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(366004)(396003)(346002)(376002)(13464003)(189003)(199004)(71190400001)(7736002)(71200400001)(93886005)(68736007)(8936002)(7416002)(33656002)(6636002)(305945005)(74316002)(486006)(476003)(52536014)(99286004)(446003)(11346002)(106356001)(105586002)(5660300002)(102836004)(53546011)(6506007)(26005)(7696005)(76176011)(186003)(9686003)(97736004)(54906003)(110136005)(4326008)(25786009)(55016002)(3846002)(6246003)(86362001)(66066001)(2906002)(6116002)(53936002)(478600001)(81166006)(81156014)(256004)(229853002)(14454004)(6436002)(8676002)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1101MB2231; H:CY4PR1101MB2215.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: tCQUMvTYsb+dq7CSbxi+8WRiw9T+zg2D11Qa6XDjbO7wX6BXgb6JVVyt9G5h5aQG96sAHY2WU5DuCacCQeOmThZPd/slrfy1eCD1pmuHmOtC/3/3wsztHZtKshQVRfX+4Eu0Mu/o3g0+tONon6pAdOrYBaijOd6BEyV3P3jwdO5nOF/TvsnIFU0j1Hb66i5ktLtNAoVeUPH2Lqbp1/ki+gaKgCB6IhGw94vDM2NPo8FT2VgOpDAlBwsdnLXRqkZkvwHcEHozDmzKs90iUo7eV0XUrgIPK7sFgGxGW43zV8vfqfZZLY4qvmS8tw5KVlzVTL8AS7Xb0zG4qQrhkVpQ7jIOl1EDsNH83H5au70wbKGLoOtD1eIWI7yRRQJo1CSF8vp5i16AGl7ACKkpBwZdrKNFaqQkTtXGv+yzMkWVUc0= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 76bab376-9f93-44d1-7c67-08d6a7f872a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2019 21:11:23.5995 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2231 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 173.37.102.26, xch-rcd-016.cisco.com X-Outbound-Node: alln-core-4.cisco.com Subject: Re: [dpdk-dev] [PATCH v2] net/enic: add private API to set ingress VLAN rewrite mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Mar 2019 21:11:35 -0000 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. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 65769A0096 for ; Wed, 13 Mar 2019 22:11:37 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2205A374E; Wed, 13 Mar 2019 22:11:36 +0100 (CET) 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=2530; q=dns/txt; s=iport; t=1552511494; x=1553721094; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=mrrb8pRRjQdZ7V9HOU23uaIypX0Zjo1jXwIl7ShxwfY=; b=ViVY3jdJrTmrv8mwdCPFZ4+lEwnz119QkY4CJLQzp1ngES3mn6dGdvvC Md9RUTuB+4JWz6SA2Xakikbe3Ny7gWxRB0k0jVHv9wUhnpu+TncqRBmIt 0mPAtH4PH+sGwqim4mo6pqp8C6umb0eHjYDRl3rz0jDogeVpVBj7O0bpI w=; IronPort-PHdr: =?us-ascii?q?9a23=3AfX11IRWKY4mfivySp1ZIEzslDbvV8LGuZFwc94?= =?us-ascii?q?YnhrRSc6+q45XlOgnF6O5wiEPSA9yJ8OpK3uzRta2oGXcN55qMqjgjSNRNTF?= =?us-ascii?q?dE7KdehAk8GIiAAEz/IuTtank4G8REWFZh8lmwMFNeH4D1YFiB6nA=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0AEAAC5cYlc/4kNJK1kGQEBAQEBAQE?= =?us-ascii?q?BAQEBAQcBAQEBAQGBUQQBAQEBAQsBgTxQA4FcBAsnCodHA4RQildKgg2YLoE?= =?us-ascii?q?kA1QLAQEshEAChEYiNAkNAQEDAQEJAQMCbRwMhUoBAQEBAzoGAQE3AQsEAgE?= =?us-ascii?q?IEQQBAQEeEDIdCAIEAQ0FCIR4AxUBo10CihSCIIJ4AQEFhQ0YggwIgS8Biyw?= =?us-ascii?q?XgUA/gVeCTFmEKoM5giaKKoIAmBMJApM0gXuFZ4tlin2SYAIEAgQFAg4BAQW?= =?us-ascii?q?BRziBVnAVgyeCCoNuilNyAYEnjXoBgR4BAQ?= X-IronPort-AV: E=Sophos;i="5.58,475,1544486400"; d="scan'208";a="245190285" Received: from alln-core-4.cisco.com ([173.36.13.137]) by alln-iport-2.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 13 Mar 2019 21:11:26 +0000 Received: from XCH-RCD-016.cisco.com (xch-rcd-016.cisco.com [173.37.102.26]) by alln-core-4.cisco.com (8.15.2/8.15.2) with ESMTPS id x2DLBQ80015406 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=FAIL); Wed, 13 Mar 2019 21:11:26 GMT Received: from xhs-rtp-003.cisco.com (64.101.210.230) by XCH-RCD-016.cisco.com (173.37.102.26) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 13 Mar 2019 16:11:25 -0500 Received: from xhs-rcd-002.cisco.com (173.37.227.247) by xhs-rtp-003.cisco.com (64.101.210.230) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 13 Mar 2019 17:11:25 -0400 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (72.163.14.9) by xhs-rcd-002.cisco.com (173.37.227.247) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 13 Mar 2019 16:11:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector1-cisco-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mrrb8pRRjQdZ7V9HOU23uaIypX0Zjo1jXwIl7ShxwfY=; b=jK+DiOVoVnCOrqPQTtv/UCV1KgZYi9Ui4Vgbl8L48nS+CCR0iQFYUJ4LtPRioQhOKvvzVAA7/tK+EpqyXmIrK5ATCtYb3UbMNTDLtUgvpgKrR0zfRf68G/dhraVxAzGbuZ3KRCmFSgxFZ/C1ej5iCuoJvEQkgaXNu/rNdQrC3t8= Received: from CY4PR1101MB2215.namprd11.prod.outlook.com (10.174.52.141) by CY4PR1101MB2231.namprd11.prod.outlook.com (10.172.79.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1709.13; Wed, 13 Mar 2019 21:11:23 +0000 Received: from CY4PR1101MB2215.namprd11.prod.outlook.com ([fe80::6db2:20d4:72ce:7d]) by CY4PR1101MB2215.namprd11.prod.outlook.com ([fe80::6db2:20d4:72ce:7d%6]) with mapi id 15.20.1686.021; Wed, 13 Mar 2019 21:11:23 +0000 From: "John Daley (johndale)" To: Thomas Monjalon , Ferruh Yigit , "Hyong Youb Kim (hyonkim)" CC: Andrew Rybchenko , Qi Zhang , "dev@dpdk.org" , Shahaf Shuler , Jerin Jacob , "David Marchand" , Maxime Coquelin , Konstantin Ananyev , Hemant Agrawal , Stephen Hemminger Thread-Topic: [PATCH v2] net/enic: add private API to set ingress VLAN rewrite mode Thread-Index: AQHU0yLMpEmGk+09d02eFATs3AXnsaYJ8BQAgAAia4CAAAKAcA== 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> In-Reply-To: <155267265.tCld3OmuaL@xps> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=johndale@cisco.com; x-originating-ip: [128.107.241.178] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 76bab376-9f93-44d1-7c67-08d6a7f872a8 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600127)(711020)(4605104)(2017052603328)(7153060)(7193020); SRVR:CY4PR1101MB2231; x-ms-traffictypediagnostic: CY4PR1101MB2231: x-ld-processed: 5ae1af62-9505-4097-a69a-c1553ef7840e,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 09752BC779 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(366004)(396003)(346002)(376002)(13464003)(189003)(199004)(71190400001)(7736002)(71200400001)(93886005)(68736007)(8936002)(7416002)(33656002)(6636002)(305945005)(74316002)(486006)(476003)(52536014)(99286004)(446003)(11346002)(106356001)(105586002)(5660300002)(102836004)(53546011)(6506007)(26005)(7696005)(76176011)(186003)(9686003)(97736004)(54906003)(110136005)(4326008)(25786009)(55016002)(3846002)(6246003)(86362001)(66066001)(2906002)(6116002)(53936002)(478600001)(81166006)(81156014)(256004)(229853002)(14454004)(6436002)(8676002)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR1101MB2231; H:CY4PR1101MB2215.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: cisco.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: tCQUMvTYsb+dq7CSbxi+8WRiw9T+zg2D11Qa6XDjbO7wX6BXgb6JVVyt9G5h5aQG96sAHY2WU5DuCacCQeOmThZPd/slrfy1eCD1pmuHmOtC/3/3wsztHZtKshQVRfX+4Eu0Mu/o3g0+tONon6pAdOrYBaijOd6BEyV3P3jwdO5nOF/TvsnIFU0j1Hb66i5ktLtNAoVeUPH2Lqbp1/ki+gaKgCB6IhGw94vDM2NPo8FT2VgOpDAlBwsdnLXRqkZkvwHcEHozDmzKs90iUo7eV0XUrgIPK7sFgGxGW43zV8vfqfZZLY4qvmS8tw5KVlzVTL8AS7Xb0zG4qQrhkVpQ7jIOl1EDsNH83H5au70wbKGLoOtD1eIWI7yRRQJo1CSF8vp5i16AGl7ACKkpBwZdrKNFaqQkTtXGv+yzMkWVUc0= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 76bab376-9f93-44d1-7c67-08d6a7f872a8 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Mar 2019 21:11:23.5995 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR1101MB2231 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 173.37.102.26, xch-rcd-016.cisco.com X-Outbound-Node: alln-core-4.cisco.com Subject: Re: [dpdk-dev] [PATCH v2] net/enic: add private API to set ingress VLAN rewrite mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Message-ID: <20190313211123.OFNK_09YjNjYwBduJlwTlG9ia_N_6zkO7FDiNTe54jw@z> 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.