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 57C73A04A5; Thu, 18 Jun 2020 08:45:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 907971B91B; Thu, 18 Jun 2020 08:45:02 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id E718014583 for ; Thu, 18 Jun 2020 08:44:59 +0200 (CEST) IronPort-SDR: WFm4AB937lFmwIkj1wFjgNkA0L5hoFKzJ7oMSJDrV9MU7gjdK1JnEQ0Lqro5eGkV0oeS0ds96/ HhlMxv5UcNvQ== X-IronPort-AV: E=McAfee;i="6000,8403,9655"; a="227165702" X-IronPort-AV: E=Sophos;i="5.73,525,1583222400"; d="scan'208";a="227165702" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2020 23:44:58 -0700 IronPort-SDR: Gw2v026mu/SVX2ypng90uHi4A0fzA1Hy75pMv+yI5rgdHNxynsJ2uiqwaMyuw33B8BHc9ZNIuq l9hykBragXDA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,525,1583222400"; d="scan'208";a="277525471" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga006.jf.intel.com with ESMTP; 17 Jun 2020 23:44:58 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 23:44:57 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Wed, 17 Jun 2020 23:44:57 -0700 Received: from FMSEDG001.ED.cps.intel.com (10.1.192.133) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Wed, 17 Jun 2020 23:44:57 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 17 Jun 2020 23:44:54 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OfPKzTL74jZybPnmhw9qm+T9acZM5yYfnBMy/YpX9coTaSPvpFjP+hdZNvUo5ygHQnZrv23jfsOVFiGt1eNZLAnb3h6cOR2VameM2y8tRcgpJt9JlKeLcSSFaZGA7FpuAy9vIQ6rY302M2XNOScsoZ0GfBqzp1zoMVLwR/O00gxSPFcDQdPN5sTOoYBrfATOoUM5a9bgLij9+Ya0a1sv7gtLQV4MAoiS7Pa2xmRKE2nR+0stZSKBncXXIFnsy0pfd8T1Ln3hqaoorzdDcbwvOTjUuspi/lo2MxyjIHmdFh1fBNXsvMuCVqVArHM0A+l31uZhg86qo9QA+0GcF6hhBg== 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=qCAjTzMg/h7j6wN5CtwTBQe1I7Pfc6EPKK25m1mi7xE=; b=L5RIaPmowTzR4TdOKN94U4/H1FuyDnEVM691Md2Y4U76gLGFwl2Wi42Z3auKX0vhz1Ql/Ck6iWltw7vgK69i8AGf065wf1/KvXzJzyyS3gMEJOIW02mNyrnNlk4T40vMosame5pyad7EObBnvlOw1gGE9tq19L/rKvbT6qUEU18xFz0xnyJ2c3GDg+RpP959iNeKeBQkxsWUJ2jB19LkxMLbB7YewXuAR8G29S3Mb2wOEFt0osVf/R34YEpJwzwOwpPMMnsSdgRSm7lSGdPP0tcoZSDAfUq1zj4UNwg2i+RdUJsR632cdQ55oYod0xq+rreka76mzyglUczsV+QTcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qCAjTzMg/h7j6wN5CtwTBQe1I7Pfc6EPKK25m1mi7xE=; b=COQfsD144jtc71NmJsYW8i4zX1pCVoFd5QJeDXmfNBvoTpmm50cZjWTAOOm2cscefTCrI1wmMQ+E46xUBuakSwOgUecGGfHMQFLhEdPtM0dLv2mV9xNzKztzWySWURU/Nd4ebOColhyqsOQZ9ePkp3e7+mGfRXivV9VnQWI/mwU= Received: from BN6PR11MB0017.namprd11.prod.outlook.com (2603:10b6:405:6c::34) by BN6PR11MB1922.namprd11.prod.outlook.com (2603:10b6:404:100::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3088.24; Thu, 18 Jun 2020 06:44:51 +0000 Received: from BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120]) by BN6PR11MB0017.namprd11.prod.outlook.com ([fe80::c8eb:f4c9:5b58:3120%6]) with mapi id 15.20.3088.025; Thu, 18 Jun 2020 06:44:51 +0000 From: "Yang, Qiming" To: "Xu, Ting" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" , "Kovacevic, Marko" , "Mcnamara, John" , "Ye, Xiaolong" Thread-Topic: [PATCH v3 02/12] net/ice: complete device info get in DCF Thread-Index: AQHWQ5iY0vBcsi8iRE624D5BGOBIoqjd8GDQ Date: Thu, 18 Jun 2020 06:44:51 +0000 Message-ID: References: <20200616124112.108014-1-ting.xu@intel.com> <20200616124112.108014-3-ting.xu@intel.com> In-Reply-To: <20200616124112.108014-3-ting.xu@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.55.46.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1e46ab19-e227-4cf0-5667-08d813531a56 x-ms-traffictypediagnostic: BN6PR11MB1922: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2803; x-forefront-prvs: 0438F90F17 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6u7nyo4wEe9rDegaufhhbWisVY1ltxOVuJJY4R6h7uXQF5iYhM5+qwH64J/oePCoo2Eb0PQ58Hhzxi+mFS2ld03O8S3ObBPJja1bctK3M0yeCsr9PS7qNV0uD2RXZJeksO+1zaOx4tBoFv8+5WfXk1mJsMhRCydNZLpAo9xdw9csMXkjOHdh3eRW0Nqc4C4kXvcNsSn8CsnUAUHYc9L7PyF6YPKrOyoKeoQsCYgz/9pWh/ljWYdP954GJQj+Y4M7Yud8v5rLxLzPis9qc+tet7sC/WdBQIg51uYUa1jcbLh41mUjIOfxxq3UjVEmTE5JkeT0MC3cz8ACPhFhlNmE4w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN6PR11MB0017.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(136003)(366004)(39860400002)(396003)(346002)(376002)(53546011)(6506007)(7696005)(107886003)(83380400001)(52536014)(71200400001)(8936002)(66946007)(66476007)(110136005)(26005)(64756008)(66446008)(66556008)(9686003)(5660300002)(86362001)(186003)(54906003)(76116006)(316002)(55016002)(8676002)(33656002)(478600001)(2906002)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: ybZlRlCDsUMzdpuR5jaZLUdjuTNVMB9pX0vleZxTeIvNKNfIZMK3B16Qb0TjRDFeCVOZW7DNC8whZf71Dk9gdIeNq7gBc5bSBVss0NkMMG4nPdk/4rFNP30jC3gCATetm/3CnOMnSHjyCSlJZ98w0Jmz558x7YYsDLSU9GRYA9wDABSci0qX6EyQlV9a10c9/gQaB3rMAluoBcmkJHHMDTPWC6zRJqAY3rpIBvEBNTISj4xOOsL1zGmvwkKAojNW1SNy8MJuNx1tLz0V8HnkpK8GrFAepyoyEjleu9VjHHv2wJnXdHB1HqeFtfx5trNBevULYtMd+SBPll+nLzHr84hp2B3NAjbXvZsXFZXuSnv1OrfUzZaLnNeF4SpqkDM3W8yDOVvvs+S30+8ea7vQ1MgRMWAzDGjq4eHYJ+V/YWvXe5QA7D5EESpSBzADzJQy5GTZ8KlgDNvuVgjuQZM0jMz6buzA2s19aXueBxlpSb8= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 1e46ab19-e227-4cf0-5667-08d813531a56 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Jun 2020 06:44:51.6005 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: biMktLr5Jh5G4xJTza3NdW7NyQzFFGDvP+S5Iec/HXKJAzvtBL4NKjmUa+gb9bSPb23XJO8FBZ8YwTJZFuLexg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1922 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 02/12] net/ice: complete device info get in DCF 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: Xu, Ting > Sent: Tuesday, June 16, 2020 20:41 > To: dev@dpdk.org > Cc: Zhang, Qi Z ; Yang, Qiming > ; Wu, Jingjing ; Xing, Beil= ei > ; Kovacevic, Marko ; > Mcnamara, John ; Ye, Xiaolong > > Subject: [PATCH v3 02/12] net/ice: complete device info get in DCF >=20 > From: Qi Zhang >=20 > Add support to get complete device information for DCF, including Rx/Tx > offload capabilities and default configuration. >=20 > Signed-off-by: Qi Zhang > Signed-off-by: Ting Xu > --- > drivers/net/ice/ice_dcf_ethdev.c | 72 > ++++++++++++++++++++++++++++++-- > 1 file changed, 69 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/ice/ice_dcf_ethdev.c > b/drivers/net/ice/ice_dcf_ethdev.c > index e5ba1a61f..7f24ef81a 100644 > --- a/drivers/net/ice/ice_dcf_ethdev.c > +++ b/drivers/net/ice/ice_dcf_ethdev.c > @@ -24,6 +24,7 @@ >=20 > #include "ice_generic_flow.h" > #include "ice_dcf_ethdev.h" > +#include "ice_rxtx.h" >=20 > static uint16_t > ice_dcf_recv_pkts(__rte_unused void *rx_queue, @@ -66,11 +67,76 @@ > ice_dcf_dev_info_get(struct rte_eth_dev *dev, > struct rte_eth_dev_info *dev_info) { > struct ice_dcf_adapter *adapter =3D dev->data->dev_private; > + struct ice_dcf_hw *hw =3D &adapter->real_hw; >=20 > dev_info->max_mac_addrs =3D 1; > - dev_info->max_rx_pktlen =3D (uint32_t)-1; > - dev_info->max_rx_queues =3D RTE_DIM(adapter->rxqs); > - dev_info->max_tx_queues =3D RTE_DIM(adapter->txqs); > + dev_info->max_rx_queues =3D hw->vsi_res->num_queue_pairs; > + dev_info->max_tx_queues =3D hw->vsi_res->num_queue_pairs; > + dev_info->min_rx_bufsize =3D ICE_BUF_SIZE_MIN; > + dev_info->max_rx_pktlen =3D ICE_FRAME_SIZE_MAX; > + dev_info->hash_key_size =3D hw->vf_res->rss_key_size; > + dev_info->reta_size =3D hw->vf_res->rss_lut_size; > + dev_info->flow_type_rss_offloads =3D ICE_RSS_OFFLOAD_ALL; > + > + dev_info->rx_offload_capa =3D > + DEV_RX_OFFLOAD_VLAN_STRIP | > + DEV_RX_OFFLOAD_QINQ_STRIP | Do we support QINQ in DCF now? > + DEV_RX_OFFLOAD_IPV4_CKSUM | > + DEV_RX_OFFLOAD_UDP_CKSUM | > + DEV_RX_OFFLOAD_TCP_CKSUM | > + DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM | > + DEV_RX_OFFLOAD_SCATTER | > + DEV_RX_OFFLOAD_JUMBO_FRAME | > + DEV_RX_OFFLOAD_VLAN_FILTER | > + DEV_RX_OFFLOAD_RSS_HASH; > + dev_info->tx_offload_capa =3D > + DEV_TX_OFFLOAD_VLAN_INSERT | > + DEV_TX_OFFLOAD_QINQ_INSERT | Same as above > + DEV_TX_OFFLOAD_IPV4_CKSUM | > + DEV_TX_OFFLOAD_UDP_CKSUM | > + DEV_TX_OFFLOAD_TCP_CKSUM | > + DEV_TX_OFFLOAD_SCTP_CKSUM | > + DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM | > + DEV_TX_OFFLOAD_TCP_TSO | > + DEV_TX_OFFLOAD_VXLAN_TNL_TSO | > + DEV_TX_OFFLOAD_GRE_TNL_TSO | > + DEV_TX_OFFLOAD_IPIP_TNL_TSO | > + DEV_TX_OFFLOAD_GENEVE_TNL_TSO | > + DEV_TX_OFFLOAD_MULTI_SEGS; > + > + dev_info->default_rxconf =3D (struct rte_eth_rxconf) { > + .rx_thresh =3D { > + .pthresh =3D ICE_DEFAULT_RX_PTHRESH, > + .hthresh =3D ICE_DEFAULT_RX_HTHRESH, > + .wthresh =3D ICE_DEFAULT_RX_WTHRESH, > + }, > + .rx_free_thresh =3D ICE_DEFAULT_RX_FREE_THRESH, > + .rx_drop_en =3D 0, > + .offloads =3D 0, > + }; > + > + dev_info->default_txconf =3D (struct rte_eth_txconf) { > + .tx_thresh =3D { > + .pthresh =3D ICE_DEFAULT_TX_PTHRESH, > + .hthresh =3D ICE_DEFAULT_TX_HTHRESH, > + .wthresh =3D ICE_DEFAULT_TX_WTHRESH, > + }, > + .tx_free_thresh =3D ICE_DEFAULT_TX_FREE_THRESH, > + .tx_rs_thresh =3D ICE_DEFAULT_TX_RSBIT_THRESH, > + .offloads =3D 0, > + }; > + > + dev_info->rx_desc_lim =3D (struct rte_eth_desc_lim) { > + .nb_max =3D ICE_MAX_RING_DESC, > + .nb_min =3D ICE_MIN_RING_DESC, > + .nb_align =3D ICE_ALIGN_RING_DESC, > + }; > + > + dev_info->tx_desc_lim =3D (struct rte_eth_desc_lim) { > + .nb_max =3D ICE_MAX_RING_DESC, > + .nb_min =3D ICE_MIN_RING_DESC, > + .nb_align =3D ICE_ALIGN_RING_DESC, > + }; >=20 > return 0; > } > -- > 2.17.1