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 AC101A04DB; Mon, 28 Sep 2020 18:29:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 073691D5F3; Mon, 28 Sep 2020 18:29:33 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 2205C1B81B for ; Mon, 28 Sep 2020 18:29:30 +0200 (CEST) IronPort-SDR: YE1b7z9UgTKNnJ5jSlbHd5BXiwemeCY1W9EXpPoUMW5JKGgokHNGnthA3Wyy4ygYc+NKmX5WXF 5Qg/esesg+tg== X-IronPort-AV: E=McAfee;i="6000,8403,9758"; a="162904563" X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="162904563" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Sep 2020 09:29:27 -0700 IronPort-SDR: bdfh8giIVrB2W4oxBExscyTqQAZRflThsuFSiI7FmN6tncoEZ9qmARcVQ9CO7VAleci7fF2GDz tfdBWIrKsPhw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,313,1596524400"; d="scan'208";a="340480514" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga008.jf.intel.com with ESMTP; 28 Sep 2020 09:29:27 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 28 Sep 2020 09:29:27 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 28 Sep 2020 09:29:27 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Mon, 28 Sep 2020 09:29:27 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.170) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 28 Sep 2020 09:29:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D30mzohYTRDv7FUlcpCmcjdRPkHqeVp98dywVtcVX5+j/K3rDfypQpzzVvGSyNcID0/Dhs3v4hZoI2suJLeEtye9mearJbW+2XQSg83T7X2d2wFM4dLg60+C9OXCA71yAw/XuXYXjva7iyhS5nS/QQsQcnYFV2v+NXz9JdMUGapS5TE3/0FEgS+mBjXR+XDD9v86CxJOpqx7tjW34GGwUma1XJG4JfK/p1AGWdKAwv/hQn+fb7iXulRctuNQeFtZQoUH0qxDh8z5LcqHCrZiZGIg28OV0kaUPE3Oi+pcTegUJmQTW6Yq02k8VJqBRPf8acIVK6J+ywulOiW0m3P4uA== 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=HOoUViDrAQDGsu/tNqj9C2Z/1mdDbEa6Qa5UEVP2UCw=; b=cjMiQ8L4050S/Cz7dW6366/qPgY/M5rbXHMScrqBdsEhv+5/t0HfUdo6Zf7SjxdV6QwV9SQs9eWBvGbVkzhmPn9FXNuTANEjcqHcukRNEqcECCa9hoz9Y/2iRzbgZPrNKHBKmEvymQLsmKxa/lSGfDrrmdcH+0/vbaZenrCR+j5cAd4kXcjKpFnzXC065mxQLDJmgHjFoYVVJ2lhlGrN4jIX51iWbp70n/NpS1jtXT51vugsibiuQhaBthtfxqzhdNBA+U6qFE+ptLIEvqsiccj0mLKUCu6ZrW/6ml5yI+HxYMSvkjepZoJTJtYW/zuBULlD+r+yurLpVK76ewzB9A== 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=HOoUViDrAQDGsu/tNqj9C2Z/1mdDbEa6Qa5UEVP2UCw=; b=ZtyzPe3ncY2y9wALq4gU6BjqnNdy56XJ2oMcYrvvb/Eu7LZ9xh2N05ZIdF+Cmdrta+CK5K/sdmxgqUgFwhpMNLFv3SMyxLmV9MsnwhoHDoBLB6dwKaLsyF35g28yq3bhqN9iBtzTIhb3YQ9Z1w1daioYsQCnUVAvA1iM1eU+EgE= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN8PR11MB3794.namprd11.prod.outlook.com (2603:10b6:408:8f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.25; Mon, 28 Sep 2020 16:29:22 +0000 Received: from BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::e4a8:91ab:e032:b8ae]) by BN8PR11MB3795.namprd11.prod.outlook.com ([fe80::e4a8:91ab:e032:b8ae%5]) with mapi id 15.20.3412.029; Mon, 28 Sep 2020 16:29:22 +0000 From: "Wang, Haiyue" To: "Richardson, Bruce" CC: "Yigit, Ferruh" , "Guo, Jia" , "Wu, Jingjing" , "Zhang, Qi Z" , "Xing, Beilei" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v6] net/iavf: support flex desc metadata extraction Thread-Index: AQHWlHPC+15b9fAqI0Orzle0G8ufM6l+N+SAgAAEW+CAAAGxAIAAAYLQ Date: Mon, 28 Sep 2020 16:29:21 +0000 Message-ID: References: <20200909025415.6185-1-jia.guo@intel.com> <20200927020859.69387-1-jia.guo@intel.com> <20200928162130.GF951@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20200928162130.GF951@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 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.198.147.205] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3fe15939-d66e-49f6-d301-08d863cba80c x-ms-traffictypediagnostic: BN8PR11MB3794: 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:534; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: if1/b1DPfnP4lqMpP1S171LsffBcJj+DDvt4cl+PVVAGmfrP3Jo3MJZFlHlrS/B7OJG/VD7DVWJtZuweUvxYJO3k+8BQ2pAjMXykeCgm4c0cdSrcbGMWZdxxPi9ZxwGJk5FnfwdpUv804hNLiMEq2XSXKeKqPw/USufRPEgN733vQDSIS9Kx3mwNf9MGlSr8xcEXmVuc3XdQUS8/OoE6+Q2YEWZTsRQITkKVI0Bja9imlIo+eNEnBsr2GfgZgfu/Mq+OmzFjg1Wcf4DCnMiZ+RRVBWlV50igSLfMOS/NAO0sACa1j7kP8SfJaZxfUyGNId7S3UIQKWk8XxPKDwb5VhebEDTAZqqY422kGP7afuNLQURE0L83hZP3d6yKUo3+ZWgTRMyj5EVfnHuAPcZIAEyuOSOK65R1z5bRr2rKZ5PlvT6yBAwPGlcKpwtHFm+XrGniYVRjFlRHgQLEq82lUQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN8PR11MB3795.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(136003)(376002)(346002)(39860400002)(366004)(7696005)(53546011)(6506007)(316002)(26005)(478600001)(6636002)(186003)(83380400001)(55016002)(86362001)(2906002)(71200400001)(52536014)(8936002)(5660300002)(9686003)(33656002)(76116006)(966005)(19627235002)(6862004)(66946007)(66446008)(64756008)(66556008)(66476007)(8676002)(54906003)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: xbvb/z/JkJqNUH3NrCWE31WQ0XmXB118GzMatzhWRT/rgqtQbm8knNRw29tTpWv+GqMye9l3KI0z4L4vvTkwLTVqWNleIda7mc8fAzVD1T44fnC5xJmolyexzWlZ17Aj5vsCmzm/AQxQvJ0GF7koEpn4+ejnFCxsazrAGRMd98yZRwAeEVauE0m/oZSfvMXkhm9NU5PwWeomry82wSOpUncM6zuHB0aYoEtjhQmTXfoOqSBJCBRMu4qmhM/TQSdTRvWNWGZWGVABheQMe8DsvhF+TXbg7rtLVUTpMPA+L9YY6P4g393YRx65NcO4+4aP44fnt3SDBNzD8ydbi/BJmEtgLvSCiqysq2CdCPKoibYfR/x475G6yvqD8SwghBXTT/YfAYI8X7K7B020cPmPp+lW76m32tt22jAEae8zcw+ukP2TcG42K8cltGKh8NogBqkonpgO2c2Lz2QX56q31sVgISSh6f3JR0gNlG04nEowe9s2PYQOH8kGLMPl3J3d+k3vHAief/EJa6AiG2/xPajYB6N853YPHnnpa5AioKbdVXLHWOEbTA26XaHhNhtvkKL9kaSja6kHn/eccp7XcAq66P5XzkI+W1/AfU/TbARolyC5KPRMOzKX3wF8Uhh10VQ2vla7yVRcjHageNHmXg== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3795.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3fe15939-d66e-49f6-d301-08d863cba80c X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2020 16:29:21.9280 (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: 3L/tSkDf2ZIUhlu8cHwQ/2rEyJ5CPDuclqil2UAqoXJfAg2HYh8frK3Nt7mXfQjqFSHEI4PI8q7uvHpK+kVQuw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN8PR11MB3794 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v6] net/iavf: support flex desc metadata extraction 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: Bruce Richardson > Sent: Tuesday, September 29, 2020 00:22 > To: Wang, Haiyue > Cc: Yigit, Ferruh ; Guo, Jia ;= Wu, Jingjing > ; Zhang, Qi Z ; Xing, Beilei= ; > dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v6] net/iavf: support flex desc metadata e= xtraction >=20 > On Mon, Sep 28, 2020 at 05:17:24PM +0100, Wang, Haiyue wrote: > > + Bruce > > > > > -----Original Message----- > > > From: Ferruh Yigit > > > Sent: Tuesday, September 29, 2020 00:00 > > > To: Guo, Jia ; Wu, Jingjing ; Zhang, Qi Z > > > ; Xing, Beilei > > > Cc: dev@dpdk.org; Wang, Haiyue > > > Subject: Re: [dpdk-dev] [PATCH v6] net/iavf: support flex desc metada= ta extraction > > > > > > On 9/27/2020 3:08 AM, Jeff Guo wrote: > > > > Enable metadata extraction for flexible descriptors in AVF, that wo= uld > > > > allow network function directly get metadata without additional par= sing > > > > which would reduce the CPU cost for VFs. The enabling metadata > > > > extractions involve the metadata of VLAN/IPv4/IPv6/IPv6-FLOW/TCP/MP= LS > > > > flexible descriptors, and the VF could negotiate the capability of > > > > the flexible descriptor with PF and correspondingly configure the > > > > specific offload at receiving queues. > > > > > > > > Signed-off-by: Jeff Guo > > > > Acked-by: Haiyue Wang > > > > > > <...> > > > > > > > +/* Rx L3/L4 checksum */ > > > > +static inline uint64_t > > > > +iavf_rxd_error_to_pkt_flags(uint16_t stat_err0) > > > > +{ > > > > +uint64_t flags =3D 0; > > > > + > > > > +/* check if HW has decoded the packet and checksum */ > > > > +if (unlikely(!(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_L3L4P_S= )))) > > > > +return 0; > > > > + > > > > +if (likely(!(stat_err0 & IAVF_RX_FLEX_ERR0_BITS))) { > > > > +flags |=3D (PKT_RX_IP_CKSUM_GOOD | PKT_RX_L4_CKSUM_GOOD); > > > > +return flags; > > > > +} > > > > + > > > > +if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_IPE_= S))) > > > > +flags |=3D PKT_RX_IP_CKSUM_BAD; > > > > +else > > > > +flags |=3D PKT_RX_IP_CKSUM_GOOD; > > > > + > > > > +if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_L4E_= S))) > > > > +flags |=3D PKT_RX_L4_CKSUM_BAD; > > > > +else > > > > +flags |=3D PKT_RX_L4_CKSUM_GOOD; > > > > + > > > > +if (unlikely(stat_err0 & (1 << IAVF_RX_FLEX_DESC_STATUS0_XSUM_EIPE= _S))) > > > > +flags |=3D PKT_RX_EIP_CKSUM_BAD; > > > > + > > > > +return flags; > > > > +} > > > > > > Is this static inline function used anywhere? If not can we delete it= ? > > > > > > > The same function as iavf_flex_rxd_error_to_pkt_flags. > > > > Looks like meson/gcc missed this [-Werror,-Wunused-function] capturing. > > http://mails.dpdk.org/archives/test-report/2020-September/154839.html > > > AFAIK, unused static functions get a warning about being unused, static i= nline > functions don't. Unless you are defining a function in a header files, I'= d > recommend omitting the "inline" part so you do get unused function errors= . >=20 Thanks, Bruce Yes, after removing the 'inline' keyword, got the warning message: [1315/2332] Compiling C object 'drivers/drivers@@tmp_rte_pmd_iavf@sta/net_i= avf_iavf_rxtx.c.o'. ../drivers/net/iavf/iavf_rxtx.c:916:1: warning: 'iavf_rxd_error_to_pkt_flag= s' defined but not used [-Wunused-function] 916 | iavf_rxd_error_to_pkt_flags(uint16_t stat_err0) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ Not sure how does clang handle 'static inline' as 'static'. Anyway, code re= view needs to be enhanced.;-) > /Bruce