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 2ECF3A04BC; Thu, 8 Oct 2020 17:05:56 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 03BF21C196; Thu, 8 Oct 2020 17:05:55 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 47E791C195 for ; Thu, 8 Oct 2020 17:05:52 +0200 (CEST) IronPort-SDR: 6yfnfgTPVLiGYO+xr+HREVImoafU8pCOfV4oAt/z7/N+ekZRICIAuxccwqWFZb2FrLC7xOZhdV Fn4a4n3tfhCA== X-IronPort-AV: E=McAfee;i="6000,8403,9768"; a="152266417" X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="152266417" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2020 08:05:48 -0700 IronPort-SDR: pYTH4hzK1ZbVmIzN+XHbwaM/f7juXla2aoQ/pBe9WlupPDdf7S9th7C5mH/3ww3koTGbUowZcg oyHjD5odYBug== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,351,1596524400"; d="scan'208";a="355412460" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga007.jf.intel.com with ESMTP; 08 Oct 2020 08:05:48 -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; Thu, 8 Oct 2020 08:05:48 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) 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; Thu, 8 Oct 2020 08:05:48 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 8 Oct 2020 08:05:48 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) 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; Thu, 8 Oct 2020 08:05:47 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g9HNiwmY1FXhl9cICAEhaTYwP5VBKqdA93VH0ztxRuSVQhbxBHzdStkbthBINjJ4ia7sppj8oo4MIkE9FNC3hjkL2wSqgwc5eXEgJO02h/LwIuiO/2JJWcsoP9IDsLcuNIm54h5AAwC7HRlcnLdkplisTrquLIdtE955uA+L2gDKOyr6Y5tGaSpxnMeLPORvNbvZuqQ9dHNFsXvnpgA+bsfXpvm9roqbFckiUo0tkMXBfvht15cGzmxNoxd3wIPad9tP5SzWfJ4IguWbGlcdeKBFdCe7Im/NtF5quJFW0JqJwovLREiYd00Tq56t7KsxHk7juVKCBNOO5a2oP65MxQ== 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=JPcr/g5+3o+LmffN5YCjU0Wi3qoRfcrpf/KrO82TOLA=; b=nxCSblVYWvI6xjv+ZZ7C6POurVMwbjxQ7ypVZo7U5bSvAx5ml7TB5MTwETqrh1Nwcy+TCRTefseCCMDhmSncMo4MUWy+WDQSAKjd/TdIFWbYO8HSTISLpUD10BTYWsYO9qB4vGjvbDjaTlbqoyFql45FT5RZsNP4OvVBxVw3ovQ8BGrIHAmdOqPgIaCZVxEINVtURm14SjEz8oEIPn3DlMgi+HeUwVWAEt04efDZTtA11K3j/d1p7uzpVwywdwmysY7L1jwydH9vJmdpG7OG1u2T5aTsbXs0+pXcQeIs/zWFreyY830KwJrUcdak/C8MyXhhoQzFCilpDdtm1BXF/w== 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=JPcr/g5+3o+LmffN5YCjU0Wi3qoRfcrpf/KrO82TOLA=; b=B8wTdvvaOnxroCQ9+cyS2GQF34CwCVv6LA1iLTvfsPn5JS+vO6NHGWc7tLwgMUHdHoEw+z6eboc9zAUYY/2O80Zl5+GXcC08TfGAvQYxMiY54Ip84xsDGzr+L+SDFpE3qnftrBV8MYaX1loXt3gJSpEEA8IrcZ89MBWStP9kD0Q= Received: from BYAPR11MB3301.namprd11.prod.outlook.com (2603:10b6:a03:7f::26) by BY5PR11MB4182.namprd11.prod.outlook.com (2603:10b6:a03:183::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.23; Thu, 8 Oct 2020 15:05:44 +0000 Received: from BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f5a4:3f6b:ade3:296b]) by BYAPR11MB3301.namprd11.prod.outlook.com ([fe80::f5a4:3f6b:ade3:296b%3]) with mapi id 15.20.3455.023; Thu, 8 Oct 2020 15:05:44 +0000 From: "Ananyev, Konstantin" To: "Power, Ciara" , "dev@dpdk.org" CC: "Power, Ciara" , "Zhao1, Wei" , "Guo, Jia" , "Wang, Haiyue" Thread-Topic: [dpdk-dev] [PATCH v3 11/18] net/ixgbe: add checks for max SIMD bitwidth Thread-Index: AQHWlytXa1Q5t+jR/k6qBrParraLf6mN2ijg Date: Thu, 8 Oct 2020 15:05:44 +0000 Message-ID: References: <20200807155859.63888-1-ciara.power@intel.com> <20200930130415.11211-1-ciara.power@intel.com> <20200930130415.11211-12-ciara.power@intel.com> In-Reply-To: <20200930130415.11211-12-ciara.power@intel.com> Accept-Language: en-GB, 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: [46.7.39.127] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: d93bd7dd-62c2-48ef-6a01-08d86b9ba188 x-ms-traffictypediagnostic: BY5PR11MB4182: 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:5797; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KGPJRe6mq9ziwFpl75PvZKgFhLRr9dsa/AtPMTUUds9NjLFp2JYcNwp8xwRlkDXadz6SO+JTxlaTvhC32OIg7DokTvXkK6+y8hsIudlYjxOuHdLMe1I7ypAy4HeCiFrGontvrRI/VIayK+mISwNqkk+4bH5D/tDkMm2i8uUFSjXUlGv4C3jR/qichZ/BXpQuyXJ8YeC2U0MO9RFc9o1eiRdt+18mj87dwBMrXQFZXv7EwCyQmX1UOp3WnNlgmLLYSXcnYd7VDC/q/2rPbOBMYQc0wbAQ96i8Z9qMkS16zcn6UrHc+eajuBHLyWQ5YC54MwHdrdwayI8O4K4wd2a2cw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3301.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(376002)(396003)(136003)(346002)(366004)(478600001)(66476007)(64756008)(76116006)(66946007)(66556008)(8936002)(5660300002)(52536014)(55016002)(83380400001)(186003)(26005)(71200400001)(86362001)(316002)(7696005)(110136005)(54906003)(33656002)(2906002)(66446008)(9686003)(107886003)(6506007)(4326008); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 3MVYoX8Yb/Ax4YRIoCQCS3dmxwZL7h9eBpv477n3uyYZFhVBKR2I2FGmJE/D8SvOJ1EIECbXahOAp+66m2QEuRz8qbTqxpqKg3G4tQ6c129mcgPjz0wDJnTzbGiABKuHAaUgrAfDSa0qKH2MaS5z3Mtj88vDyjKfZlG9JR4t2d2b6ePElhaSgHEryB0IoXj8zcXskzMFGlnAdMnpYhom6kJOZgVv4ajP1SKOR4apIY3NuQNcWnRIcnnAnVksqh/Vj0NX7ObE4tLWBMLM4whaJ0swQwPWzleprf1fSYYh17+giaAMSbaYRHnyZLmfTnkK8UV6JKg+gm5f9lqi55CD7XY4dM7JYQ23Lnr1o0XqcbDqUUZhri1vod7diVZmzbZzBRszPmFI7CTwh8YUZ/6+K78go/TRcHT1t/RzZBvNqJIPLWLul9pdWLz+ikVEjKe0r88ECSLqD7uQ6FvZCTvzi8LMqka0Ggnfrr5VrO5fvANH2hO0QbD6N36a845qLHCuXClC4CX/rQY4Kw1J4dw78+HgJFCkRNYrQYDcIEjsBzVtmYYhbZ8KauiyV0/RrdljDZADqAoZtcM5ER02mGa9bgc4+ichuDrbGhMdhIM6YBGJSzPhizF9TYFmu9sE/m0WdjZoCaU3Ay/TEfx5Z/pFFw== 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: BYAPR11MB3301.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d93bd7dd-62c2-48ef-6a01-08d86b9ba188 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Oct 2020 15:05:44.5240 (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: kH3bfRGPN0/pqo79A1OB05KYG7Y/zXE6LTmNLqMza/g7iHaeSpB/P1d9apQIFxHkUef6uP/Egt4xrpsTleKK6moCBV8AJ+sYnISTs3mqENw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4182 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 11/18] net/ixgbe: add checks for max SIMD bitwidth 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" >=20 > When choosing a vector path to take, an extra condition must be > satisfied to ensure the max SIMD bitwidth allows for the CPU enabled > path. >=20 > Cc: Wei Zhao > Cc: Jeff Guo >=20 > Signed-off-by: Ciara Power > --- > drivers/net/ixgbe/ixgbe_rxtx.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxt= x.c > index 977ecf5137..eadc7183f2 100644 > --- a/drivers/net/ixgbe/ixgbe_rxtx.c > +++ b/drivers/net/ixgbe/ixgbe_rxtx.c > @@ -2503,7 +2503,9 @@ ixgbe_set_tx_function(struct rte_eth_dev *dev, stru= ct ixgbe_tx_queue *txq) > dev->tx_pkt_prepare =3D NULL; > if (txq->tx_rs_thresh <=3D RTE_IXGBE_TX_MAX_FREE_BUF_SZ && > (rte_eal_process_type() !=3D RTE_PROC_PRIMARY || > - ixgbe_txq_vec_setup(txq) =3D=3D 0)) { > + ixgbe_txq_vec_setup(txq) =3D=3D 0) && > + rte_get_max_simd_bitwidth() > + >=3D RTE_MAX_128_SIMD) { As a nit - I think it is a bit safer to do all checks first before doing tx= q_vec_setup(). Acked-by: Konstantin Ananyev =20 > PMD_INIT_LOG(DEBUG, "Vector tx enabled."); > dev->tx_pkt_burst =3D ixgbe_xmit_pkts_vec; > } else > @@ -4743,7 +4745,8 @@ ixgbe_set_rx_function(struct rte_eth_dev *dev) > * conditions to be met and Rx Bulk Allocation should be allowed. > */ > if (ixgbe_rx_vec_dev_conf_condition_check(dev) || > - !adapter->rx_bulk_alloc_allowed) { > + !adapter->rx_bulk_alloc_allowed || > + rte_get_max_simd_bitwidth() < RTE_MAX_128_SIMD) { > PMD_INIT_LOG(DEBUG, "Port[%d] doesn't meet Vector Rx " > "preconditions", > dev->data->port_id); > -- > 2.17.1