From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 275AAC4646B for ; Wed, 26 Jun 2019 03:48:23 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id A862D205ED for ; Wed, 26 Jun 2019 03:48:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="BGcqrWvk"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=marvell.onmicrosoft.com header.i=@marvell.onmicrosoft.com header.b="nSPDpGpz" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A862D205ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marvell.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 56C721B952; Wed, 26 Jun 2019 05:48:21 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id 5D0C32BB5 for ; Wed, 26 Jun 2019 05:48:20 +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 x5Q3ikb2021945; Tue, 25 Jun 2019 20:48:18 -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=8mjPatSnXZIV8SlY0uXSnprUHI6CrlD84IOk35c0irQ=; b=BGcqrWvkCXEMXEhmAjML5Ar7UQp9zx+YdqZRE0yhfXZlNvzsYYTiNhDOIygEsMXI+iHu DprHktu5nmLTkr4xA/6F4IYjcH6gQRop0N0yNs2yziYDBsHa0OI2hXNlgYooEzZA950J 1E7Zu4xVxdYblPVyRLWz4Kk70Hnj4d+vuGTMxv0wiWlyF+OFJ9bv5Q2c/MXnPsLMTk/I 92a/81+NPxN5m8nb/IeQ7ttGL8lF2KxhScLCHN+UMbltxszpWtxEmg8dRNrk8CTAmEMp /uB1bb2DA4jEMYUnUyAhCsD7nOP4EZLFKT7iZpLfP8ut3T/F9xjSSJ/WvzY+YDZoly19 rw== Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0a-0016f401.pphosted.com with ESMTP id 2tbrte23m1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 25 Jun 2019 20:48:18 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 25 Jun 2019 20:48:17 -0700 Received: from NAM05-CO1-obe.outbound.protection.outlook.com (104.47.48.58) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1367.3 via Frontend Transport; Tue, 25 Jun 2019 20:48:17 -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=8mjPatSnXZIV8SlY0uXSnprUHI6CrlD84IOk35c0irQ=; b=nSPDpGpzcjEoNiroDJlgCxh4nZom6N/9AOl+wcHGJWH2+qANkqIQVh5vxstVyJ99GX/G7HLGXw7/q8whUXoFZ+DA8x/fyPGNBhh4F+SgfB0v2oFgogv8FUtVf6Nsum6Q5u5IaRHND+4rHcRZrr4NAk3zVSFVrY8Ez1ZeB6F9o+I= Received: from CH2PR18MB3381.namprd18.prod.outlook.com (52.132.246.204) by CH2PR18MB3127.namprd18.prod.outlook.com (52.132.244.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16; Wed, 26 Jun 2019 03:48:12 +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.017; Wed, 26 Jun 2019 03:48:12 +0000 From: Vamsi Krishna Attunuru To: Stephen Hemminger CC: "dev@dpdk.org" , "ferruh.yigit@intel.com" , "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: AQHVKwoVl2gLy2UraUy2Uy5WMDubz6aspF0AgACnAQk= Date: Wed, 26 Jun 2019 03:48:12 +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> In-Reply-To: <20190625104130.7e0c681e@hermes.lan> 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: b242b21c-458e-4ddb-a647-08d6f9e91cf8 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:CH2PR18MB3127; x-ms-traffictypediagnostic: CH2PR18MB3127: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 00808B16F3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(346002)(39860400002)(376002)(366004)(396003)(189003)(199004)(6246003)(25786009)(4326008)(54906003)(3846002)(486006)(446003)(33656002)(53936002)(186003)(476003)(229853002)(86362001)(6116002)(11346002)(52536014)(6436002)(6916009)(316002)(26005)(5660300002)(68736007)(19627405001)(6506007)(7696005)(73956011)(478600001)(81166006)(7736002)(81156014)(66476007)(64756008)(55236004)(66556008)(66946007)(74316002)(53546011)(76116006)(66066001)(66446008)(8936002)(2906002)(76176011)(54896002)(14454004)(6606003)(99286004)(9686003)(256004)(102836004)(55016002)(71190400001)(8676002)(71200400001); DIR:OUT; SFP:1101; SCL:1; SRVR:CH2PR18MB3127; 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: MX0sAVMhfGWxIBRi3DN5rTFwe+CNRXC/ZtXKgT3FeJeQGMT8xIkiNKjls7W34HVrK8yqGZpDUv2Ka7txPzUWkB6EOncI7EusCVYz5nSOlhAw4+uKOuLuil/yeGyqibrcQDqPXSpOFvETJgRfDJylBl5UT4ZAqATwg0smQcUg0KNNgZLwU+ltSY5CJKu7E9/nHEd7q8XyNNi2FNFpxO+va5bvtbrgx00dKUV5zLEubw33XOfrohQdfIdlcC2pTlheY8n82jPrfQWjK2ro+pglmYEej0wDb2zEhUZtTINulX/lhPPqalkqbSGy+6pvikNJ4OCMNbyFI/HLfF6MXzPAKEqr6yxYKP1hxJbbv5YKM4u/Y+TYjybPwwzhVaMpsSsSJVT9XeBpJr0+CLpQD5FzCf/UM8W55uuadUmAHjCm5CE= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: b242b21c-458e-4ddb-a647-08d6f9e91cf8 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jun 2019 03:48:12.6288 (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: CH2PR18MB3127 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-06-26_02:, , 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: Tuesday, June 25, 2019 11:11 PM To: Vamsi Krishna Attunuru Cc: dev@dpdk.org; ferruh.yigit@intel.com; olivier.matz@6wind.com; arybchenk= o@solarflare.com Subject: [EXT] Re: [dpdk-dev] [PATCH v6 2/4] lib/kni: add PCI related infor= mation 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/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; > 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 d= omain details to work with IOVA=3DVA mode and the struct rte_kni_device_inf= o only carries KNI device info to the kernel module, if not here, where do = you suggest me to put this info.