From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 94375A0471 for ; Fri, 16 Aug 2019 07:16:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 740361BEA2; Fri, 16 Aug 2019 07:16:22 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 129E81BC24 for ; Fri, 16 Aug 2019 07:16:20 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7G5FAii030230; Thu, 15 Aug 2019 22:16:17 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : content-type : content-transfer-encoding : mime-version; s=pfpt0818; bh=geycBEjdqGXqiz/VzM5l/cjNM6xYc7RfKQJgfSHM3xQ=; b=Jvgb5l79xNM978xrEEiIzVuUZ4PfbkmAdtS89+wC9z/DIawtj1EgQh1V4r1Wnzd25Hs8 ap4gifmyCgTv1SLhfDpY5oZNrl2KI6syeC7zcXmmpl/rqN2MgUe7gz5eZoLX/B9lranA 7tZLv3IHs0jugiexSvUmix35mM0pTNWwIF3dMHQRFkWEZWDwQrzoj7HI1p+ZnYYktqNL 1JVsNn5RlKwhUYlo/J2+5N6Gh8GCg5vrlMT3HrexT7DB170Phoru3aFfFX59LeNYofos sJE8v0kqxQpBkP5rW5NPVi2BuQyV7IbRWZlnH/hk/51OF6NpDSldGwpzBbAMmxIRk6sE qg== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2ubfad7sun-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 15 Aug 2019 22:16:17 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 15 Aug 2019 22:16:16 -0700 Received: from NAM03-DM3-obe.outbound.protection.outlook.com (104.47.41.58) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 15 Aug 2019 22:16:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WwlFoxi7b/FD0OhC0PU7ByRtbT+gZhFmVMLOgLe4i32HafgzlLebzW2crd1bMHimntPMKjuysI+e+S67TEZrxnIb1o3sTte3+3x1Vkv5GGBqywS1SY1MyO2HJI9aiDgQKqbZ1x+M6by/otsOlErILoE+LLYVbmHnD+nAEdKNBgn5U+XVoeaVg6izuzd2JnbgfZvwojBlwn97Uv2L+HJVhHIn7VX49/mG+uwtRntl3RExo8dQakOMAD7G+nWXKbm7HZhwB4RQPXVtHvPRi2YnkqupC/NYOg2ISFA9qRRYzXvpy4WBwsrjXuypU5FAvUZnCEBsdQmAuK5/eY7SbikQjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=geycBEjdqGXqiz/VzM5l/cjNM6xYc7RfKQJgfSHM3xQ=; b=Ru74+0NuGX5FY7ZU5MYfymWGhIiXJ3y5SEI+/fHr4GqBdjzSTHakFnXpVyRy6eKDgAxi/HdQ7xFThDQ/XZ+koWFR35vQ/Ct+t+3pCihLstV7mnxRwNS4jJVOCPk9f0agAIdNWGgA5aoJiKunDhw/t+he5H5BeoXnGFRzXACDQfaErWhMiKPKCXtDFWS8FUN0Yu/Vy8p3m2u4qZAIaUIvXnEljs6QUhton4cmBGU0YdefaCR7G33wuj+j1eESosyKQyW/2Twrd5ENyInnJWIUw8362ntIDw99YippEnt1pWvjD331LyPjkf4etK/tNS/xQvr2ziuNrPTT7+bEWTcf2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector2-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=geycBEjdqGXqiz/VzM5l/cjNM6xYc7RfKQJgfSHM3xQ=; b=uYGc6SMeyxfm0AxvssSazl+RfsyzYDmcjgwApz0tisqNIu27CRkbiLkkx01U4wVFuq6aTMD+9uAq7aIx4FUnv6KE+buR/CfWsWdNylHFZMe2v4KT+Orc5euXRyPgkCdHyaV8f0Hl74MrTectTT+ZJET2hL95lYCYbBPNcBlZCPw= Received: from BYAPR18MB2424.namprd18.prod.outlook.com (20.179.91.149) by BYAPR18MB2839.namprd18.prod.outlook.com (20.179.58.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2157.23; Fri, 16 Aug 2019 05:16:12 +0000 Received: from BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::5877:72b7:40cf:2013]) by BYAPR18MB2424.namprd18.prod.outlook.com ([fe80::5877:72b7:40cf:2013%3]) with mapi id 15.20.2157.022; Fri, 16 Aug 2019 05:16:12 +0000 From: Jerin Jacob Kollanukkaran To: Thomas Monjalon CC: Ferruh Yigit , Andrew Rybchenko , "dev@dpdk.org" , Bernard Iremonger , Shahaf Shuler , "E. Scott Daniels" , Wenzhuo Lu , Alex Zelezniak , Ajit Khaparde , Declan Doherty Thread-Topic: [dpdk-dev] [RFC] ethdev: configure SR-IOV VF from host Thread-Index: AdVT8Xx93yqNKwDtQaiIX9/ixJSXEg== Date: Fri, 16 Aug 2019 05:16:11 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [14.140.231.66] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c5507d4b-8fa1-45dd-2461-08d72208dada x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:BYAPR18MB2839; x-ms-traffictypediagnostic: BYAPR18MB2839: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 0131D22242 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(136003)(396003)(39860400002)(346002)(366004)(376002)(13464003)(199004)(189003)(55236004)(6916009)(561944003)(476003)(33656002)(76116006)(66476007)(2906002)(81156014)(64756008)(102836004)(66946007)(486006)(81166006)(66446008)(6506007)(53546011)(66556008)(7416002)(14454004)(4326008)(186003)(305945005)(74316002)(478600001)(6246003)(7736002)(316002)(7696005)(25786009)(26005)(52536014)(71200400001)(53936002)(8936002)(256004)(6116002)(99286004)(6436002)(66066001)(71190400001)(9686003)(14444005)(3846002)(55016002)(86362001)(54906003)(5660300002)(229853002)(8676002); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR18MB2839; H:BYAPR18MB2424.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: marvell.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: eEXxftgicpKOzz9wdq3ODyptfo1iTPPzmMyaZ++dsQR6NYzUOFUEACSko5KLwv9EjQpEduphw5Rjhl5F2+4sTcaSfrb3fhRpQVX8SDXwe1VpEppqOjI4jOhm8wkjC460PE61DStnE6tBK9Sz+IHyDicq3vmmWfNEbnGV/hAPUv6cmHLZUO0WZmcX2RyKrcpkfxz2a8lg4/BJIkL+11EWV/M1lS3l6Aevd8MACyWlTvNRj7Vl+6LfemGUoBfJIoOrl1qQzG57NRVfNLQiOrSfgOVekGn3dVku6rwnF7Y2zfhHtfLaUeBVK45W7t1di9Q3uaVlk5XagRlZL0QVWnXhu5WeqJqUCZQsOuAim0Jg6ZEQTbKeEznWhlAhee1EqnZJJX2Su2xrxkU+0CcthCoEqYRXhWhwDliGaKpIy1AGVgY= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: c5507d4b-8fa1-45dd-2461-08d72208dada X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2019 05:16:11.9988 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Ai+vAI60r7uXo2v6frPUedEFGEwo6LfrXaoILwnV8DpdfxyFyvfF88G0sE0wbs6St+AsNJviJy8ell9wIJJC3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR18MB2839 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-16_03:2019-08-14,2019-08-16 signatures=0 Subject: Re: [dpdk-dev] [RFC] ethdev: configure SR-IOV VF from host 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" > -----Original Message----- > From: Thomas Monjalon > Sent: Thursday, August 15, 2019 11:29 PM > To: Jerin Jacob Kollanukkaran > Cc: Ferruh Yigit ; Andrew Rybchenko > ; dev@dpdk.org; Bernard Iremonger > ; Shahaf Shuler ; > E. Scott Daniels ; Wenzhuo Lu > ; Alex Zelezniak ; Ajit Khaparde > ; Declan Doherty > > Subject: [EXT] Re: [dpdk-dev] [RFC] ethdev: configure SR-IOV VF from host >=20 > External Email >=20 > ---------------------------------------------------------------------- > 15/08/2019 17:34, Jerin Jacob Kollanukkaran: > > From: Thomas Monjalon > > > > > > In a virtual environment, the network controller may have to > > > configure some SR-IOV VF parameters for security reasons. > > > > > > When the PF (host port) is drived by DPDK (OVS-DPDK case), we face > > > two different cases: > > > - driver is bifurcated (Mellanox case), > > > so the VF can be configured via the kernel. > > > - driver is on top of UIO or VFIO, so DPDK API is required. > > > > > > This RFC proposes to use generic DPDK API for VF configuration. > > > The impacted functions are (can be extended): > > > > > > - rte_eth_dev_is_valid_port > > > - rte_eth_promiscuous_enable > > > - rte_eth_promiscuous_disable > > > - rte_eth_promiscuous_get > > > - rte_eth_allmulticast_enable > > > - rte_eth_allmulticast_disable > > > - rte_eth_allmulticast_get > > > - rte_eth_dev_set_mc_addr_list > > > - rte_eth_dev_default_mac_addr_set > > > - rte_eth_macaddr_get > > > - rte_eth_dev_mac_addr_add > > > - rte_eth_dev_mac_addr_remove > > > - rte_eth_dev_vlan_filter > > > - rte_eth_dev_get_mtu > > > - rte_eth_dev_set_mtu > > > > > > In order to target these functions to a VF (which has no port id in > > > the host), the higher bit of port id is reserved: > > > > > > #define RTE_ETH_VF_PORT_FLAG (1 << 15) > > > > Instead of changing the port number behavior, How about adding a bit > > field/ I think, There is no ABI breakage as the parent type of bit > > field is uint8_t and there is still more room. > > > > --- a/lib/librte_ethdev/rte_ethdev_core.h > > +++ b/lib/librte_ethdev/rte_ethdev_core.h > > @@ -621,6 +621,7 @@ struct rte_eth_dev_data { > > all_multicast : 1, /**< RX all multicast mode ON(1) / O= FF(0). */ > > dev_started : 1, /**< Device state: STARTED(1) / STOP= PED(0). */ > > lro : 1; /**< RX LRO is ON(1) / OFF(0) */ > > + vf : 1; /**< SR-IOV VF device */ > > uint8_t rx_queue_state[RTE_MAX_QUEUES_PER_PORT]; > > /**< Queues state: STARTED(1) / STOPPED(0). */ > > uint8_t tx_queue_state[RTE_MAX_QUEUES_PER_PORT]; >=20 > Sorry I don't understand how it can help. > We need to specify which VF we want to configure. >=20 > My proposal is to use the representor port, which is connected to a VF. I got confused with non-representor case. Yes, My comment is not valid for port representor case. > We distinguish the representor and the VF with a flag in the port id > parameter passed to the functions. >=20