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 7998AA00E6 for ; Fri, 12 Jul 2019 13:02:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 53FA21BD52; Fri, 12 Jul 2019 13:02:17 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 649BB1BACA for ; Fri, 12 Jul 2019 13:02:15 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x6CB1bXU015573; Fri, 12 Jul 2019 04:02: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=4jRYZ7eVwRSrrNxAyewC6xKl8N+BKynZLpqhOjR2Lhk=; b=hwNLqhPPU7r65OM6CvUx3llDoiyO6Ngdjgkya6gQRWSOx9Zcv8Df8Zvme+kCe8W8GmBS KADLQxlFyWIqmow7M9LEGl7Vlh1gVw7u8+zE+fPht8N+A2pS3fEyMa7qZrKq2LQKQJP+ AseUccyPENelPJg5FuwjwV3Q9TIZ7cGQ3CA2ok6DCnxpZzNclkKidJvFSgzpZL7u3c+i hTyTgfDZ8KxI5OxTZnN/KXc3I8YLnv1QGqi5csKrFIZ4Zr0087pXYg3JnY5GZ8m+Ya7r nDvHxuDiuyhYJgJA5zYO+7nJ4zmE1hChH5sbCk+E2hhV7/So5gvRBCb31gNRHjhpGvoF 7w== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 2tpdc82gxq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Fri, 12 Jul 2019 04:02:13 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 12 Jul 2019 04:02:12 -0700 Received: from NAM05-BY2-obe.outbound.protection.outlook.com (104.47.50.55) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Fri, 12 Jul 2019 04:02:12 -0700 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=4jRYZ7eVwRSrrNxAyewC6xKl8N+BKynZLpqhOjR2Lhk=; b=ez3toPCE8LHypwyw6dRWCyTey1gl6PeJyMXtCrGt9pKx6MUrYYoanI/oudamGGrsfDhEl1lR4o/OxPOjN9a2K55ouiqxPBN8/i7dVQL2BWh3Rui8PqFnhozJVKhXOUN8CT2iIa0u1Sw3+MeR30akHgGkov23MJupnSKsUj31SXA= Received: from CH2PR18MB3381.namprd18.prod.outlook.com (52.132.246.204) by CH2PR18MB3159.namprd18.prod.outlook.com (52.132.245.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.19; Fri, 12 Jul 2019 11:02:10 +0000 Received: from CH2PR18MB3381.namprd18.prod.outlook.com ([fe80::189c:3889:b207:8922]) by CH2PR18MB3381.namprd18.prod.outlook.com ([fe80::189c:3889:b207:8922%5]) with mapi id 15.20.2052.019; Fri, 12 Jul 2019 11:02:10 +0000 From: Vamsi Krishna Attunuru To: Ferruh Yigit , "dev@dpdk.org" CC: "olivier.matz@6wind.com" , "arybchenko@solarflare.com" Thread-Topic: [EXT] Re: [dpdk-dev] [PATCH v6 2/4] lib/kni: add PCI related information Thread-Index: AQHVKwoVl2gLy2UraUy2Uy5WMDubz6bFs5AAgAE2laI= Date: Fri, 12 Jul 2019 11:02:09 +0000 Message-ID: References: <20190422061533.17538-1-kirankumark@marvell.com> <20190625035700.2953-1-vattunuru@marvell.com> <20190625035700.2953-3-vattunuru@marvell.com>, <46a052b9-9776-526e-5516-f15c22864bc4@intel.com> In-Reply-To: <46a052b9-9776-526e-5516-f15c22864bc4@intel.com> 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: eb25968b-1df9-4ea7-652b-08d706b862f7 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:CH2PR18MB3159; x-ms-traffictypediagnostic: CH2PR18MB3159: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 00963989E5 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(376002)(136003)(346002)(39860400002)(189003)(199004)(66556008)(6436002)(86362001)(66446008)(66476007)(64756008)(66946007)(5660300002)(2906002)(53936002)(76116006)(6606003)(99286004)(33656002)(11346002)(25786009)(6246003)(2501003)(71200400001)(55016002)(3846002)(54896002)(71190400001)(446003)(66066001)(6116002)(19627405001)(9686003)(68736007)(229853002)(186003)(6506007)(26005)(76176011)(476003)(486006)(7696005)(8936002)(53546011)(52536014)(14454004)(110136005)(74316002)(102836004)(8676002)(478600001)(54906003)(81166006)(55236004)(81156014)(7736002)(316002)(4326008)(256004); DIR:OUT; SFP:1101; SCL:1; SRVR:CH2PR18MB3159; 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: eJmOXt3IcJdZpsS5HSWBqLRZ6G5jxKYEjA8msbw6BJG1YD3Sx8g5mCuRQGJJCy6aeI22ioFt5C4MQmXrmU8cRK98af0Zv3Q3FAt95mWMn0RPjoH3pjVzD9yCW9yPCQd4qBVOQu6XNNAwXXs99A71z7Ki/Y3U6y4gjy6uycNGZKorjVVxV4zwIu4qhhLY9StLB1UT6ZXw0a01vm//ZtylYtszH4GFVdL/XJ76YpzumDzwKszukcz3rTqUyqP1L9/rqTVrdaEgGhfKmT6gaxkAuMCMb2GLbSXkpdgONoth89iqtwxEMEe/jgERM0s+iYp820anxwlTve7rib4c3e1pi9+D14D6q+heWWl3mGHvdkbqa+O0dchm6NcBI4j8IIkGK2bc50CjVzPhUxun9o5Pn5KIKHJxIDWjSdhMbW3xvSA= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: eb25968b-1df9-4ea7-652b-08d706b862f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Jul 2019 11:02:09.9584 (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: CH2PR18MB3159 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-07-12_03:, , 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: dev on behalf of Ferruh Yigit Sent: Thursday, July 11, 2019 9:52 PM To: Vamsi Krishna Attunuru; dev@dpdk.org Cc: olivier.matz@6wind.com; arybchenko@solarflare.com Subject: [EXT] Re: [dpdk-dev] [PATCH v6 2/4] lib/kni: add PCI related infor= mation External Email ---------------------------------------------------------------------- On 6/25/2019 4:56 AM, vattunuru@marvell.com 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/libr= te_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 thre= ad */ > > 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; Sample application part to set 'conf' values were also removed, need to add= them back too. Ack, adding in next version of patches. The device part was removed from KNI but I can see why this patch requires = it back. Yes, rte_kni_device_info is the only struct carries all required info to ke= rnel module, all these device info can be protected under the config check though.