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 49BCDA04E1; Tue, 22 Sep 2020 08:24:06 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2F9F01D6FA; Tue, 22 Sep 2020 08:24:06 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 986DE1D6F7 for ; Tue, 22 Sep 2020 08:24:04 +0200 (CEST) IronPort-SDR: dfJWcf0o4PopYVSHFgdd2Q+ONjZcScbxVmLlIX1hoipXmzT2Ksz/DTxTE4SesDRuLmHThlqVbo g/AjPijArWVQ== X-IronPort-AV: E=McAfee;i="6000,8403,9751"; a="148295660" X-IronPort-AV: E=Sophos;i="5.77,289,1596524400"; d="scan'208";a="148295660" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Sep 2020 23:24:03 -0700 IronPort-SDR: l3pCX9+A41OYNTyryni8Dd/dZEKGRcq/Tp5oq4kOQUT77x/UOFr4wuFh8fTGZwPHg8MEGq+m6G qcfuKV+6KFDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,289,1596524400"; d="scan'208";a="348369768" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga007.jf.intel.com with ESMTP; 21 Sep 2020 23:24:03 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Mon, 21 Sep 2020 23:24:03 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) 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 via Frontend Transport; Mon, 21 Sep 2020 23:24:03 -0700 Received: from NAM02-BL2-obe.outbound.protection.outlook.com (104.47.38.59) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Mon, 21 Sep 2020 23:24:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LuOHrlBJrWB1abUWM+IozwiLXr86wcn/n7N/cEBsr3qSs99H0WC4bofKCY+dLf6zMsfsJi+crOEu+WmaAlvRCiZRBetAVdu7L0Fa9UYpwMSOXbR0PR+Pi1y+9TNbtwK+6vfSqDvpD3Tfu/F67jBmTFzMaRMgrBS6SSxnXxEsLsDJyJxQ+hfUz1eTg5Bw8vYfu3aZ0bTEp2fbko3kEiniL/H6cAPkNanLivFY57Ex8capUG1iv/sBe1esfgIwoPCHCpRdJ34w5PQ+MFbLRsevcVs2PQnM8TsybZntb7CjOzNHviKal+J7rfD4wHsnBMr+izgnaBXBQQWc0a/EU/svsw== 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=H1JTjYAodbq/gdcdszIJujy8xm4KD6yRq4a144SD5cM=; b=E19Jj95g1pqcNzRkeTgJeqKChR5wAkNN8Rct5u0N9fCLRmpEy0np+4auCHb6GvmZ2IhpUeJHCF4umbGjrPXRQZTHsU3hjvIg912Xslge/Zxb2mJYp8PJXx9/ouWyLndgDNPSqrNuHqC09nKMNb3OpRvrqOhvqqsA/phUk59pdfN2u2V31XeyulGcZQ6l2QrF0bD8c0YK4xOntxsWBP6QEhhzWDzmdnuaygeMJvGH5Q0MQIcL+QfkXS/sdFxpxoKPiIHI4dd1gNW04CbKPi0hxTReQci10L3zuXiwpyKTpQKb3jxloWo49mTpMuEu3tiAjya11YAW9VjMcgR8ZgkP5w== 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=H1JTjYAodbq/gdcdszIJujy8xm4KD6yRq4a144SD5cM=; b=KR8DnFA4izNPSTnBzvTAMbYvdug9k/dpEE7cDYgTQ74j6+oNy76iu7rru7ur285DCSoslE1dcft9zYNrTtkzJBpZWknoOEFsPkDyfq8QhkBd4L8SNWu85EJxUylKiHWTpFrbkHAqkFf/Cq6X1wyUl+e6z2m9lhMa3Q5X8v9k1Xg= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN6PR1101MB2113.namprd11.prod.outlook.com (2603:10b6:405:51::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.23; Tue, 22 Sep 2020 06:23:57 +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.3391.024; Tue, 22 Sep 2020 06:23:57 +0000 From: "Wang, Haiyue" To: "Guo, Jia" , "dev@dpdk.org" CC: "Zhang, Qi Z" , "Jiang, JunyuX" , "Rong, Leyi" , "Yang, Qiming" , "Sun, GuinanX" , "Guo, Junfeng" Thread-Topic: [PATCH v3] net/ice: refactor the Rx FlexiMD handling Thread-Index: AQHWjVqODQZiBCMujEmaKI484vIaQ6l0KZMAgAAAVVCAAAQDgIAAAO5AgAAFzwCAAABQQA== Date: Tue, 22 Sep 2020 06:23:57 +0000 Message-ID: References: <20200917115332.45663-1-haiyue.wang@intel.com> <20200918010535.27089-1-haiyue.wang@intel.com> In-Reply-To: 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.55.46.46] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 19e49626-2256-467a-f224-08d85ec0165c x-ms-traffictypediagnostic: BN6PR1101MB2113: 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:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IiAquEG7qazvTBdL04aqokOq6YEunTcjX/welRdA8qYAL17wC0D5wZrOMJvQDkUV7G+ZOSeJMo84I2um8ZgAcmmvwR9wtY4dKqJM3L/w8SL24f5ckMTQFqbxeeqqfxCC1jOwpnvjlue+2HSwPG3Op+qnKj2tYYN11RTiZ/QtK4alHDGizw/XSexf6i8A5zP07TtqNCApBb+l8dyVG30/ZcwYzOUhmt3e46LjrVUWqsRsBj+nx380aAfqSbClb/+HdfWm22y5P8QVKBYLyt8+YLEGqfkBEnmoV6EiAQo2fFe+7hFiiKEvDqLFw2pq/r4P 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)(136003)(346002)(376002)(396003)(366004)(39860400002)(8676002)(7696005)(66446008)(64756008)(83380400001)(66946007)(76116006)(66556008)(66476007)(8936002)(6506007)(52536014)(86362001)(5660300002)(33656002)(2906002)(9686003)(26005)(186003)(478600001)(53546011)(55016002)(110136005)(4326008)(316002)(54906003)(71200400001)(107886003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: GF+fDsjUZziPEL7xB9BrG15wKQUXznHkFxny+3yMYgnYcIJHRtB1TUxEHbeU1rxuQOqfP5jhy+4tDT5lywpcexdyXBFkktoGrBjsdYT57Bmx0HsRGRiZoy0BVw3ivJlEq9+2HX4BBo06gl0voIrOfVB+RQge++jIXBSAGiJJodezv5C3GMNJl59TgXg8Qfg29Ry+qKUS83j05qij1DtUhgVcpAU8fcRi4kE94i3J8YqezSXt2sRYYaL+P4Ctz+redKExjX4o2VToReVES9HDhDjlAQPYpoGr+2tyDAye4cfRtKuti4Yox1EAE/dSWzQwnZNy6Csd+4ibsz8OcgC4lVGxmr/G0MuT20UdoiP/eX/bwq4ukQnsD+FTW4vK4Sat0XmkX1hWjlQrkmn5kavpeAs3A36MveIbx1OqZR4bXo2XdFYwCeoVBVrrPXDd7KtZ12Sf52F0Ua771rwVrkib9njfmJ/iUETGcxAQOdfVvsBoK6AHKCmHBJR9SUYa8k8K+pOjQ7TCuFgxW/GoEyU/i4Bjpwvm0fq9B0xyjLuD4cWw9S+sFzoFDlWa68IZ9Lm/3J8w6Z4vFj6Xm7mpc1HcNIMXCP7Ir+ypDKw3TaJHHGabEpQ+gQV/0OhkxnT+r6YRyrxsgOYiezUOXSnxxowl0A== 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: 19e49626-2256-467a-f224-08d85ec0165c X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2020 06:23:57.2148 (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: lfECbgsVZfn6+LDLeQiohkJPvMpd4Q0VrJkItckT2unZBjnfojPcygPJIhw4uqLi0rzFxX7GfZSJn2c3tpTJhw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1101MB2113 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3] net/ice: refactor the Rx FlexiMD handling 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: Guo, Jia > Sent: Tuesday, September 22, 2020 14:15 > To: Wang, Haiyue ; dev@dpdk.org > Cc: Zhang, Qi Z ; Jiang, JunyuX ; Rong, Leyi > ; Yang, Qiming ; Sun, GuinanX= ; Guo, > Junfeng > Subject: RE: [PATCH v3] net/ice: refactor the Rx FlexiMD handling >=20 >=20 > > -----Original Message----- > > From: Wang, Haiyue > > Sent: Tuesday, September 22, 2020 2:09 PM > > To: Guo, Jia ; dev@dpdk.org > > Cc: Zhang, Qi Z ; Jiang, JunyuX > > ; Rong, Leyi ; Yang, Qimin= g > > ; Sun, GuinanX ; Guo, > > Junfeng > > Subject: RE: [PATCH v3] net/ice: refactor the Rx FlexiMD handling > > > > > -----Original Message----- > > > From: Guo, Jia > > > Sent: Tuesday, September 22, 2020 13:51 > > > To: Wang, Haiyue ; dev@dpdk.org > > > Cc: Zhang, Qi Z ; Jiang, JunyuX > > > ; Rong, Leyi ; Yang, > > > Qiming ; Sun, GuinanX ; > > > Guo, Junfeng > > > Subject: RE: [PATCH v3] net/ice: refactor the Rx FlexiMD handling > > > > > > > > > > -----Original Message----- > > > > From: Wang, Haiyue > > > > Sent: Tuesday, September 22, 2020 1:42 PM > > > > To: Guo, Jia ; dev@dpdk.org > > > > Cc: Zhang, Qi Z ; Jiang, JunyuX > > > > ; Rong, Leyi ; Yang, > > > > Qiming ; Sun, GuinanX > > > > ; Guo, Junfeng > > > > Subject: RE: [PATCH v3] net/ice: refactor the Rx FlexiMD handling > > > > > > > > Hi Jeff, > > > > > > > > > -----Original Message----- > > > > > From: Guo, Jia > > > > > Sent: Tuesday, September 22, 2020 13:35 > > > > > To: Wang, Haiyue ; dev@dpdk.org > > > > > Cc: Zhang, Qi Z ; Jiang, JunyuX > > > > > ; Rong, Leyi ; Yang, > > > > > Qiming ; Sun, GuinanX > > > > > ; Guo, Junfeng > > > > > Subject: RE: [PATCH v3] net/ice: refactor the Rx FlexiMD handling > > > > > > > > > > Hi, haiyue > > > > > > > > > > > > > + struct rte_mbuf *mb, > > > > > > + volatile union ice_rx_flex_desc *rxdp) { volatile struct > > > > > > +ice_32b_rx_flex_desc_comms_ovs *desc =3D (volatile struct > > > > > > +ice_32b_rx_flex_desc_comms_ovs > > > > > > *)rxdp; #ifndef > > > > > > +RTE_LIBRTE_ICE_16BYTE_RX_DESC > > > > > > +uint16_t stat_err; > > > > > > +#endif > > > > > > > > > > This #ifndef could be better combine with below #ifndef. > > > > > > > > > > > > > I changed it to according to the different offsets, like ovs has rs= s > > > > hash in Qword 3, which is after flow Id Qword 1, others are > > > > opposite. So that this handling order can reflect the offset > > > > difference, although, it MAY looks not so beautiful. What do you > > > > think ? :) > > > > > > > > > > I am not sure I got you point about the order reason, but I think in > > > or out #ifndef should be clear show the offset difference, > > > > You mean below ? If so, 'uint16_t stat_err;' is not so good in the midd= le of > > two code blocks. > > > > #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC > > uint16_t stat_err; > > > > stat_err =3D rte_le_to_cpu_16(desc->status_error0); > > if (likely(stat_err & (1 << ICE_RX_FLEX_DESC_STATUS0_RSS_VALID_S))) { > > mb->ol_flags |=3D PKT_RX_RSS_HASH; > > mb->hash.rss =3D rte_le_to_cpu_32(desc->rss_hash); > > } > > #endif > > >=20 > Sorry, let me show clear as below >=20 > #ifndef RTE_LIBRTE_ICE_16BYTE_RX_DESC > uint16_t stat_err; >=20 > stat_err =3D rte_le_to_cpu_16(desc->status_error0); > if (likely(stat_err & (1 << ICE_RX_FLEX_DESC_STATUS0_RSS_VALID_S))) { > mb->ol_flags |=3D PKT_RX_RSS_HASH; > mb->hash.rss =3D rte_le_to_cpu_32(desc->rss_hash); > } > #endif >=20 > if (desc->flow_id !=3D 0xFFFFFFFF) { > mb->ol_flags |=3D PKT_RX_FDIR | PKT_RX_FDIR_ID; > mb->hash.fdir.hi =3D rte_le_to_cpu_32(desc->flow_id); > } >=20 That's what I said about the order, you can check "ice_rxd_to_pkt_fields_by= _comms_ovs" vs "ice_rxd_to_pkt_fields_by_comms_aux_v1" about "desc->flow_id" and "desc-= >rss_hash" handling order: offset first, handle it firstly. > > > > > > +uint64_t xtr_ol_flag; /* Protocol extraction offload flag */ > > > > > > +ice_rxd_to_pkt_fields_t rxd_to_pkt_fields; > > > > > > > > > > If create a function pointer here in .h, it is better add some do= c. > > > > C comments: /* .... */ ? > > >=20 > Yes. OK. >=20 > > > > > > > > > > > ice_rx_release_mbufs_t rx_rel_mbufs; }; > > > > > > > > > > > > -- > > > > > > 2.28.0 > > > > > > > > > > > > > > >=20