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 5F0C3A04B6; Mon, 12 Oct 2020 03:30:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 602A21D58F; Mon, 12 Oct 2020 03:30:01 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id C1AD31D58C for ; Mon, 12 Oct 2020 03:29:58 +0200 (CEST) IronPort-SDR: GTtqOrLnmi7AB5JElD7M/ZCI99ZDvJrhbIo1CxNgjvyoqvVo2V+a8ixJAtxpCsldHVZw05aDxg piXuONAZBcZQ== X-IronPort-AV: E=McAfee;i="6000,8403,9771"; a="162211538" X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="162211538" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2020 18:29:54 -0700 IronPort-SDR: N2uHzQjWvfmvhP0LHt9stUOUxQB6ZGjWweZhMRSTMy56Qy5fS6J/OOxM/bu2p5kEO3sbneE1Js KytjX6zOkXQQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,365,1596524400"; d="scan'208";a="299131756" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga008.fm.intel.com with ESMTP; 11 Oct 2020 18:29:54 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) 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; Sun, 11 Oct 2020 18:29:54 -0700 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 11 Oct 2020 18:29:53 -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; Sun, 11 Oct 2020 18:29:53 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.168) 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; Sun, 11 Oct 2020 18:29:52 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EBybNO2rqCdenTnapLVm2ChqBtdKDOSqmOIbQqYncnIQki0zOZKdAtWmG8+Hg4HFZ7bRIfTWpMwxjVQgh1PEq23tEir69ZQ2C+GaEI8jhKA2XbnweO0i4KTfeY7ZBEi2AJ1NW/OfyiOUqZR939irFzie8WrpLwIqOOup4FN2bfEJNLJefJS7raR53pBxzn04voPQSOX95gmycEc+qjYOxFi8Hbh7ep0uFXiu9nOkz2GxR2fH5JWbiQTcUuNMoXJGS+9fnGRSOu3IjKxOXEMD8g2y4XZGbMhDy2GRUcYT/p50TwJSUmtkxAzBDyjtRhyYJZuqgJjrqHgQMJM+fIe3oQ== 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=tAZYRdKoZfAw0JD2RJxfySpQy4wsJL1q5ETutjTTxFY=; b=HLS3x5OGeeLDWk6EIIg/JrT+7EpYAfhWPUuwAeunJDMOy9jz4zsz8Qkp4D4Ux0E4cAGGlL0oZanyVVuYf9AY1q8S8l+7hN9KMjT7l1n737mcrFgoDCAT8LMM/Y7j0kDemN+s8wudHCOpXDO8LWtGlpEyQE7HWuX9+BdyXvtIWC5KTVBuo4giLtuAEbBMVpIWaEcO2fLzYnFG2FdaipnL7lVr298SKzuci9qYuDssqFM+epf2ZhC2481JgKOkf3UJjtJcoacj1INqR8JSz1Yn+5ezSxzV/Cy8BKFluv9Z3gr8ngtbuOm3PNyWyeN6KvdAj9/49NaVKkcvoo6OotibhA== 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=tAZYRdKoZfAw0JD2RJxfySpQy4wsJL1q5ETutjTTxFY=; b=plrg6nzVAZOycKB2HLaFsvWviNRXS9B6opXovmdyhKHF5jqmdOL9CXVfhqrI8llEgEkZtmjUw4wP/Gu2nZsYk7OXMz+aRKrGFLbB3BOkJGkYU/N6aQkQO9L6nl6i1CsH9V/l+I1Z2ye3AcGZyfiSa3xdUEIkkdu2U2cAjmQsma8= Received: from BN8PR11MB3795.namprd11.prod.outlook.com (2603:10b6:408:82::31) by BN6PR1101MB2258.namprd11.prod.outlook.com (2603:10b6:405:5b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.24; Mon, 12 Oct 2020 01:29:49 +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.3455.029; Mon, 12 Oct 2020 01:29:49 +0000 From: "Wang, Haiyue" To: "Ananyev, Konstantin" , "Power, Ciara" , "dev@dpdk.org" CC: "Zhao1, Wei" , "Guo, Jia" Thread-Topic: [PATCH v3 11/18] net/ixgbe: add checks for max SIMD bitwidth Thread-Index: AQHWlyrQ+9L43nHRjUSWL5f7XEr8jqmQ3VfggAIw0oCAADFtkA== Date: Mon, 12 Oct 2020 01:29:48 +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: 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.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7f5d07a6-da53-4831-68c0-08d86e4e4f62 x-ms-traffictypediagnostic: BN6PR1101MB2258: 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:8273; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +LWg+fbGFQszA4BlM2Y5oHR1FjrfTg7Ipc/clyOC8WpoVwGT3TGXOLRjc4d3/PwRD3R23n6WFr7dvrDlJZqirww0wataaQIU78VLlu56yywoLn826TieH3WCMdfo45mZxgMXKp8+FQvCCv0X4tRyjcZyJJRj74SJ82MqutbIGr/DkOKtr5tFcFnEkf39Fg2yEZgLAw0vQ5kq2ZPVl9e2ROvcQaE1wfGqkB2myPmUIKyRrfw2yXMM6F3alezYI6GymEi3fufKBvCnnhicfJr0Bvor9YMAqKmvdMzziScZclde04v0BD0955BE+H3IpAIG 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)(366004)(39860400002)(136003)(346002)(376002)(396003)(33656002)(316002)(52536014)(71200400001)(5660300002)(66946007)(66556008)(110136005)(7696005)(54906003)(9686003)(66446008)(64756008)(66476007)(76116006)(86362001)(4326008)(478600001)(26005)(6506007)(53546011)(2906002)(8676002)(55016002)(8936002)(107886003)(186003)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: KQmopUxopSGnsit2ktW9AWtU62igfLg9aWDkEaQfKBro6DRH7zvDRVL52SIZldh6ZeNvKdCRMhCodEezskNlMtSIw7M1ytHjwcSLDjPomtcBEHxWZamsMQMmc73g9H9pifNGxP87TI90GdLGguhqQ3ElmqKikCiGRuincESe/02nuMiVSSHb1EtnU2pL0dgLkAgWn1GQym7Yrk0SqFASrhixlbg3HK9Gaw5kblCJ+YHg5YPp/vmHQCMAX23DIpBQ3oAPemrrlHThIaWVVLpwDGUNP4KJd+KT/+QLU9i7ZxC8mxLmvvs+MmSqr+zOaV3qjUDp1VtjFDtGTEpohBhlTKCSf/2ZWbhoZs8Hc2JJF9kVA+nS9nr2eRFAYubsAJN4KEqru8iozL9eRD/M9vsLHgBF7ASg1JngEIet6z1/xTDK4CNRywHAhjdnfmvhW/6n44F816QOufAwqvU/BKkopGz8EtseKbLcpsv5HccFvRMVi6AQm+/Id8IBRg9WxWLnoZIOAskQ60alF7xUurhDVZHwI3Cr6IRJZD5uUzwo9J/xZ99GUhLec3QZVE72Wz9Q11tCoX4V282Uh92CrHzsTw2WGHRB+peUolSB6sGsWDXApJw3uYbkgyAaJYl8SbQHCTzkaXJs94FfTpcHod0xNA== 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: 7f5d07a6-da53-4831-68c0-08d86e4e4f62 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 Oct 2020 01:29:48.6561 (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: uusO3b0XXR43KBWz0S4m8YHiqWu8iaWeddICiOk4PbAQSgR/YNCbaiZqxOO5PclquQFEVQ70mT4B0EhAjjhxfw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1101MB2258 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" > -----Original Message----- > From: Ananyev, Konstantin > Sent: Monday, October 12, 2020 06:31 > To: Wang, Haiyue ; Power, Ciara ; dev@dpdk.org > Cc: Zhao1, Wei ; Guo, Jia > Subject: RE: [PATCH v3 11/18] net/ixgbe: add checks for max SIMD bitwidth >=20 >=20 >=20 > > > From: Power, Ciara > > > Sent: Wednesday, September 30, 2020 21:04 > > > To: dev@dpdk.org > > > Cc: Power, Ciara ; Zhao1, Wei ; Guo, Jia > > > ; Wang, Haiyue > > > Subject: [PATCH v3 11/18] net/ixgbe: add checks for max SIMD bitwidth > > > > > > 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. > > > > > > Cc: Wei Zhao > > > Cc: Jeff Guo > > > > > > Signed-off-by: Ciara Power > > > --- > > > drivers/net/ixgbe/ixgbe_rxtx.c | 7 +++++-- > > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > > > diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe= _rxtx.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, = struct 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() > > > > As Konstantin mentioned: " I think it is a bit safer to do all checks f= irst before > > doing txq_vec_setup()." > > > > Fox x86 & arm platforms, the setup is always 0, since 'sw_ring_v' is un= ion with > > 'sw_ring' which is initialize at 'ixgbe_dev_tx_queue_setup'. > > > > union { > > struct ixgbe_tx_entry *sw_ring; /**< address of SW ring for scalar PM= D. */ > > struct ixgbe_tx_entry_v *sw_ring_v; /**< address of SW ring for vecto= r PMD */ > > }; > > > > static inline int > > ixgbe_txq_vec_setup_default(struct ixgbe_tx_queue *txq, > > const struct ixgbe_txq_ops *txq_ops) > > { > > if (txq->sw_ring_v =3D=3D NULL) > > return -1; > > > > /* leave the first one for overflow */ > > txq->sw_ring_v =3D txq->sw_ring_v + 1; > > txq->ops =3D txq_ops; > > > > return 0; > > } > > > > So we need check the SIMD bitwidth firstly to avoid changing the sw_rin= g* pointer address. > > > > > > Also, looks like we need to add check on: > > > > int > > ixgbe_dev_tx_done_cleanup(void *tx_queue, uint32_t free_cnt) > > { > > struct ixgbe_tx_queue *txq =3D (struct ixgbe_tx_queue *)tx_queue; > > if (txq->offloads =3D=3D 0 && > > #ifdef RTE_LIBRTE_SECURITY > > !(txq->using_ipsec) && > > #endif > > txq->tx_rs_thresh >=3D RTE_PMD_IXGBE_TX_MAX_BURST) { > > if (txq->tx_rs_thresh <=3D RTE_IXGBE_TX_MAX_FREE_BUF_SZ && > > <-----------------= -- Add the same check > > (rte_eal_process_type() !=3D RTE_PROC_PRIMARY || > > txq->sw_ring_v !=3D NULL)) { > > return ixgbe_tx_done_cleanup_vec(txq, free_cnt); >=20 > Could you probably explain a bit more why it is needed? To align with the vector selection path: 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)) >=20 > > } else { > > return ixgbe_tx_done_cleanup_simple(txq, free_cnt); > > } > > > 2.17.1