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 1DC72A046B for ; Thu, 27 Jun 2019 11:46:19 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 86AA81E2F; Thu, 27 Jun 2019 11:46:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 71A6EF64 for ; Thu, 27 Jun 2019 11:46:15 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x5R9jvsq023635; Thu, 27 Jun 2019 02:46:14 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : mime-version; s=pfpt0818; bh=HGJ9BKg0kYRONKF6TcpR0QAC/TtbbmITxpWvZ7zlSVc=; b=EmsSaxGBGPCRlI2A+dswF0AVoNi6vQggqNBSZswC+1qUP1mK5cTv4amxb533XsB5PUZk 7cC5jXbgoS0eFp37EhY5D5fOOlJxhnuiNWsU5LvruRtvsVXJyLiqt1BzI6P2YC7ivPPk cJX6rFTKb89axXHXz9dXeD1wHhXp8CYVYJX/zSOI2wZZNlfZw7SLD5Y6FHf5UTQdCRdY XdUKlb8QKb4El/Ay0V6FamFrtz9IyUm3D6pgYG0D3HAjnrucY49+pIls/+rtEOPIVSUt 3P7RJPeIuBq2o9B3XCjaUAXRg14t5eyzCbJvgF2Mb7XhyEGZ7g/kamNvWlvptlxioKpD 6w== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2tch69acq7-11 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Thu, 27 Jun 2019 02:46:13 -0700 Received: from SC-EXCH04.marvell.com (10.93.176.84) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Thu, 27 Jun 2019 02:44:04 -0700 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (104.47.48.54) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Thu, 27 Jun 2019 02:44:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=testarcselector01; d=microsoft.com; cv=none; b=bSpowA0gLORi4L36i4iTU0JZ8lez7RmyHgj3EKN8iwqPS89xQyygI1UTSH8hZfJIRKB0s1kXu4xaphxlD5fog2VYK+6IR/N9lQJJ2g+IPmJmRzr0utKqNVsV5/Cc/uIEx+PpTNFHCcaLGKy3fjDFFIvT1g167gCFHV5mh97OO5E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=testarcselector01; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HGJ9BKg0kYRONKF6TcpR0QAC/TtbbmITxpWvZ7zlSVc=; b=iquM5ZOzbKDsZ9U75DdnJ3dwPuHsDDRmZlR4q7eiC9zmMDATlp+AKWFUCZO0wxd0j6q9PosZm5s+IsHpvOGTkK9gL6Hzhik3JfwWZ1R7LrHRKYFYVqP3nS3uZXwgOYGHiXij1BQXDSYtZZac1kEXwk1pSNWBsG+V0jHWs35CTMo= ARC-Authentication-Results: i=1; test.office365.com 1;spf=none;dmarc=none;dkim=none;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=HGJ9BKg0kYRONKF6TcpR0QAC/TtbbmITxpWvZ7zlSVc=; b=oYGIw+b9KHQkw/98C7hAH5xUYH7HQ9L0qyqa9/jrTLmCHUog1JcwB9pOYjLVT2mMHH6eNADSyZ1yaKMvqsZJBK/mhiuPTmmk0wzQFyWA+ZIBv0S0w5dbDB6TGFCqJXrh/B/6ZMwXcX/4yBT/LmxlwNgS+leuGwD97eaE8blQIHQ= Received: from CH2PR18MB3381.namprd18.prod.outlook.com (52.132.246.204) by CH2PR18MB3240.namprd18.prod.outlook.com (52.132.245.78) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Thu, 27 Jun 2019 09:43:59 +0000 Received: from CH2PR18MB3381.namprd18.prod.outlook.com ([fe80::f142:410a:f977:1908]) by CH2PR18MB3381.namprd18.prod.outlook.com ([fe80::f142:410a:f977:1908%3]) with mapi id 15.20.2008.018; Thu, 27 Jun 2019 09:43:59 +0000 From: Vamsi Krishna Attunuru To: Stephen Hemminger CC: "dev@dpdk.org" , "ferruh.yigit@intel.com" , "olivier.matz@6wind.com" , "arybchenko@solarflare.com" , "Jerin Jacob Kollanukkaran" , Kiran Kumar Kokkilagadda Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v6 2/4] lib/kni: add PCI related information Thread-Index: AQHVKwoVl2gLy2UraUy2Uy5WMDubz6aspF0AgACnAQmAAL3XAIABNyaV Date: Thu, 27 Jun 2019 09:43:59 +0000 Message-ID: References: <20190422061533.17538-1-kirankumark@marvell.com> <20190625035700.2953-1-vattunuru@marvell.com> <20190625035700.2953-3-vattunuru@marvell.com> <20190625104130.7e0c681e@hermes.lan> , <20190626075842.169982f1@hermes.lan> In-Reply-To: <20190626075842.169982f1@hermes.lan> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [2409:4070:248d:e82b:6042:c650:33fb:97f8] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 4a1dd1a0-76f5-472b-ba91-08d6fae3fad5 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328)(7193020); SRVR:CH2PR18MB3240; x-ms-traffictypediagnostic: CH2PR18MB3240: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 008184426E x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(366004)(346002)(376002)(39850400004)(396003)(136003)(189003)(199004)(316002)(76116006)(486006)(53936002)(11346002)(25786009)(256004)(7736002)(54906003)(7696005)(229853002)(476003)(99286004)(73956011)(76176011)(6436002)(446003)(6246003)(86362001)(74316002)(107886003)(55016002)(4326008)(9686003)(46003)(2906002)(14454004)(54896002)(8676002)(81156014)(6916009)(6606003)(66946007)(71200400001)(186003)(71190400001)(8936002)(5660300002)(81166006)(64756008)(66556008)(66476007)(102836004)(53546011)(66446008)(19627405001)(33656002)(68736007)(6116002)(6506007)(478600001)(52536014); DIR:OUT; SFP:1101; SCL:1; SRVR:CH2PR18MB3240; H:CH2PR18MB3381.namprd18.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: Q97F8dLKOfqfksJV2XQkUYsJwnVmOqBNxJTvsV3iwyLcB+r531fvEx8EUkk04NTfqOaZl8zxLelwBIRMiiFtM4rNQi1nkMUvzjic/lY+CmsHHMgLEfI2vkPQBnA85XtHWLDnTqXn4+gtmyAjDr/r0/H2zMs6ihtAt0aRDi5N/NhHf6AMUhyv2wvdQSk4AnenrB216ud7Lg5ybYQ9a8BOAeinO75d93cIHiR42sWCPIPzRR0uKjkKmNTG/+bx6Yj2XROFp0Fuw3ZQkMQ/1BdyyFuUyjSqJaoW20zgjEREgor9zyQ4la0JfEcTKK4mv+L0IoFlIrLFfynAaHD00aeFvcLBpXmSsOsSgRPysrLFAn//uLVOWRGyTzYFptZuL7x3xuYdskrrr2qnhkIaLqS3cMeHU1sGa401k82N44pvXMY= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 4a1dd1a0-76f5-472b-ba91-08d6fae3fad5 X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Jun 2019 09:43:59.0785 (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: vattunuru@marvell.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR18MB3240 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-27_04:, , signatures=0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [EXT] Re: [PATCH v6 2/4] lib/kni: add PCI related information 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" ________________________________ From: Stephen Hemminger Sent: Wednesday, June 26, 2019 8:28 PM To: Vamsi Krishna Attunuru Cc: dev@dpdk.org; ferruh.yigit@intel.com; olivier.matz@6wind.com; arybchenk= o@solarflare.com Subject: Re: [EXT] Re: [dpdk-dev] [PATCH v6 2/4] lib/kni: add PCI related i= nformation On Wed, 26 Jun 2019 03:48:12 +0000 Vamsi Krishna Attunuru wrote: > ________________________________ > From: Stephen Hemminger > Sent: Tuesday, June 25, 2019 11:11 PM > To: Vamsi Krishna Attunuru > Cc: dev@dpdk.org; ferruh.yigit@intel.com; olivier.matz@6wind.com; arybche= nko@solarflare.com > Subject: [EXT] Re: [dpdk-dev] [PATCH v6 2/4] lib/kni: add PCI related inf= ormation > > External Email > > ---------------------------------------------------------------------- > On Tue, 25 Jun 2019 09:26:58 +0530 > wrote: > > > From: Vamsi Attunuru > > > > PCI related information is needed in KNI kernel module, > > since it requires iommu domain info for address > > translations(using iommu_iova_to_phys() call) when > > KNI runs in IOVA =3D VA mode. > > > > Signed-off-by: Vamsi Attunuru > > --- > > lib/librte_eal/linux/eal/include/rte_kni_common.h | 7 +++++++ > > lib/librte_kni/rte_kni.c | 5 +++++ > > 2 files changed, 12 insertions(+) > > > > diff --git a/lib/librte_eal/linux/eal/include/rte_kni_common.h b/lib/li= brte_eal/linux/eal/include/rte_kni_common.h > > index 91a1c14..5db5a13 100644 > > --- a/lib/librte_eal/linux/eal/include/rte_kni_common.h > > +++ b/lib/librte_eal/linux/eal/include/rte_kni_common.h > > @@ -111,6 +111,13 @@ struct rte_kni_device_info { > > void * mbuf_va; > > phys_addr_t mbuf_phys; > > > > + /* PCI info */ > > + uint16_t vendor_id; /**< Vendor ID or PCI_ANY_ID. */ > > + uint16_t device_id; /**< Device ID or PCI_ANY_ID. */ > > + uint8_t bus; /**< Device bus */ > > + uint8_t devid; /**< Device ID */ > > + uint8_t function; /**< Device function. */ > > + > > uint16_t group_id; /**< Group ID */ > > uint32_t core_id; /**< core ID to bind for kernel th= read */ > > > > diff --git a/lib/librte_kni/rte_kni.c b/lib/librte_kni/rte_kni.c > > index e29d0cc..99c4bf5 100644 > > --- a/lib/librte_kni/rte_kni.c > > +++ b/lib/librte_kni/rte_kni.c > > @@ -242,6 +242,11 @@ rte_kni_alloc(struct rte_mempool *pktmbuf_pool, > > kni->ops.port_id =3D UINT16_MAX; > > > > memset(&dev_info, 0, sizeof(dev_info)); > > + dev_info.bus =3D conf->addr.bus; > > + dev_info.devid =3D conf->addr.devid; > > + dev_info.function =3D conf->addr.function; > > + dev_info.vendor_id =3D conf->id.vendor_id; > > + dev_info.device_id =3D conf->id.device_id; > > dev_info.core_id =3D conf->core_id; > > dev_info.force_bind =3D conf->force_bind; > > dev_info.group_id =3D conf->group_id; > > > NAK > > Why is PCI info part of KNI. KNI can be used with non-PCI devices now > > Kernel KNI module needs device info(PCI in this case) to figure out iommu= domain details to work with IOVA=3DVA mode and the struct rte_kni_device_i= nfo only carries KNI device info to the kernel module, if not here, where d= o you suggest me to put this info. The kernel KNI driver works as is with netvsc PMD (which is vmbus). Your code may break that. If needs to work for both. Vamsi > I do not think this changes would break any existing functionality= , as it can still operate in PA mode if any PMD or application requires so,= same for netvsc as well right. Please correct me if am missing any assumpt= ions here.