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 6CD17A046B for ; Tue, 25 Jun 2019 19:41:42 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5F331B9C6; Tue, 25 Jun 2019 19:41:40 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 0BDC21B95C for ; Tue, 25 Jun 2019 19:41:38 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id 196so9308724pgc.6 for ; Tue, 25 Jun 2019 10:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7S2k03iLwCDeu1UVb9Mjcx4q/v0i4ekNDdJPgUTxiUQ=; b=P71HFwOp+Ml+6i8yeTiJ4mHRBRDeKzzAC2CeJnVQXH23AjKrpAknyMTp7EaukFg/Su XwX0qxs6y/1Ei7ic6aJbKtlbtst1kV4oDQSSWuJVMCbW25Y6pR+i//TdPI/fJOcvonel w99l1+om9OK8KsPSnZ+z+yxlGujCMXfGzAvoMDCNf5nwbWyxvRuTS+oVtC/lON/mlBsR CMdsyhZbkoJNQukICKLY96bstLMd8VSAW6G9gri5sjXIhh4yQv5cuJ39awQzxl4fFdXG nO/C7p+9U5RV876IwNCkqf5V7R99CS04Fn/Xn1EQkq7RkJkbccNDSU0XxTNxn+IGr5Bl VmHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7S2k03iLwCDeu1UVb9Mjcx4q/v0i4ekNDdJPgUTxiUQ=; b=HQm1Wro8ptDyI3ilNhgUH7YoNAwJlXZauwwlopfuqb7+aXwtYyW0AVXtPcT3mvpUQA 1teNZnDa4bN/Y9RiloJGJb7QHWAFezRk6jdiLPSWSE9hmwX5Y+wXKj/qtwkWLjKQraAj t57hWwxJZpDOVVn+kOfO+fhtuX8MJFCGpUPfZLidc/eQU6UWzKN2kV7LENIwE2Jxliwv BIiAnwWQwsWg4sJfCgXencFFtSDRTl3n35pNbkbcb1HZOUMVZFh+zCCh2lPiRbibx/uC 1OlUChbVRZq9pB68zUmiJ1/o5+M1ZgmjkO7kxrnyWOyNtSbk+QPqw6oGdcQj+Rm8KtkB +OVA== X-Gm-Message-State: APjAAAWGFbFJbMBbqdVyebKGDT5aeRq/lzp+5Ws5U7yhGZxbHtr1ZnvU 8B5EoGwBSH9GA7FSO9c/m43RrQ== X-Google-Smtp-Source: APXvYqwBAPKIPrGEvVaH2Iiu4iLvurlVEfGnsNKulClEKnnWFqTkiOyebyUeHltd6KeJI3JsNic0oA== X-Received: by 2002:a17:90a:1785:: with SMTP id q5mr10584pja.106.1561484497876; Tue, 25 Jun 2019 10:41:37 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id e188sm8723249pfh.99.2019.06.25.10.41.37 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 25 Jun 2019 10:41:37 -0700 (PDT) Date: Tue, 25 Jun 2019 10:41:30 -0700 From: Stephen Hemminger To: Cc: , , , Message-ID: <20190625104130.7e0c681e@hermes.lan> In-Reply-To: <20190625035700.2953-3-vattunuru@marvell.com> References: <20190422061533.17538-1-kirankumark@marvell.com> <20190625035700.2953-1-vattunuru@marvell.com> <20190625035700.2953-3-vattunuru@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [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" 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 = 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/librte_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 thread */ > > 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 = UINT16_MAX; > > memset(&dev_info, 0, sizeof(dev_info)); > + dev_info.bus = conf->addr.bus; > + dev_info.devid = conf->addr.devid; > + dev_info.function = conf->addr.function; > + dev_info.vendor_id = conf->id.vendor_id; > + dev_info.device_id = conf->id.device_id; > dev_info.core_id = conf->core_id; > dev_info.force_bind = conf->force_bind; > dev_info.group_id = conf->group_id; NAK Why is PCI info part of KNI. KNI can be used with non-PCI devices now