From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BFF00A034C for ; Mon, 1 Aug 2022 08:53:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B655342C72; Mon, 1 Aug 2022 08:53:40 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 4C9664067B; Mon, 1 Aug 2022 08:53:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659336818; x=1690872818; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=65nNXpc/fpQ/Vxtfj6K2EzVzkxf9t47kxEq3e4LPAsY=; b=elS+9nTs7gFTX1bEqPiguIT1iaaUD0Az5PEnKsJUPrR08lUGpELaFCqJ RZgWrrBhMCV/V8qoohN2fpzWc2QiAp62AKOKa4q37+T/x+BciNFt+AubD 8+PxJF+YrtEfKQ/yWRpyw1wMYy2x4q7xyCC8pfmZeoJJPOSviebOEfzZ5 AsxPRUiexvvw1INkJ/NBFuL4ibmh9l+g1eVkti76CNrEv6zdD+BUQK30g etkO7yPEDTRF62tQ3YUgVaSgVmEg+e0DauxLVvrXcwiODke8t0+7uIxkb yAD+U0hUCxRSMwN3jmoe7MiuAOM2ophqLau0Z9QQAH+yiwRVF4J664QjW A==; X-IronPort-AV: E=McAfee;i="6400,9594,10425"; a="350785631" X-IronPort-AV: E=Sophos;i="5.93,206,1654585200"; d="scan'208";a="350785631" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2022 23:53:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,206,1654585200"; d="scan'208";a="605565931" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga007.fm.intel.com with ESMTP; 31 Jul 2022 23:53:37 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Sun, 31 Jul 2022 23:53:36 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) 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.2375.28; Sun, 31 Jul 2022 23:53:36 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Sun, 31 Jul 2022 23:53:36 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Sun, 31 Jul 2022 23:53:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gj6HSIie6zeV6Iyr2AW9+ZI52F2E3IWXoev35uVwa/ryITeC/RcvqWGRk/fMSuEgoiR6LJTlEGcs+CBnarwoH8oUg8jKsZ4RGtaA0OMR7IS/GBZe3jBc/F+PNnQtaZIDAIza+ThGqvf2ZCLuPU/i4ntiRtFiVD5JrpU5oVzqs5tIv0q2eqFP/BfNI6f9Cz5TNcUizpuo+5zzVEVKXEBVUEIV6jY+9oyeGcZWSsNVWAhCZ1vmLnM2vlarbvz0Gx71HskxNB64NsN7r+qSq23oVCd6vheJFROcTE6wuiAUYZLy9Si63NhUahk8PLFA7tB7Q3413wxJWDNkXk8BmbFCbw== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kwaFMAA8Wk644CACIXjBkftHg7BvLic/HQcqFYJu5BI=; b=QfClJ0NmHGNwYGBSllQEL9mkDtdqyygd7lVKGs+Rw5N4RUjLz+JYAZ6kuzgYi+vhTeJI9RGt2YJXKR3z6lF5n78FF5ah36RMlw+7cof/4zIcRKVjmXYLXMyOj+jwkGuk2d5ndpMxNqGcMWJYR8jLev0P1BclVS1vrlt5Bsf7Ggh0CSc378cvosbwitsRYz4E5Bfcl+dNpqDhxSlfIfq4kEG82lzMfFTRr0zvbOr8cjJOVuYkJB7PEVlAktu0XHltkHOatXueW6LYdwnHk9s/S0+VuuLdHy56Hl5iH32GJ0KRpirT/bHOjcE+odf3ytvXFIBRVMYQc2hGkfvAwXDVew== 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 Received: from DM6PR11MB4348.namprd11.prod.outlook.com (2603:10b6:5:1db::18) by PH8PR11MB6612.namprd11.prod.outlook.com (2603:10b6:510:1cf::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5482.11; Mon, 1 Aug 2022 06:53:29 +0000 Received: from DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::6983:abe3:d792:ef71]) by DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::6983:abe3:d792:ef71%5]) with mapi id 15.20.5482.016; Mon, 1 Aug 2022 06:53:28 +0000 From: "Jayatheerthan, Jay" To: "Naga Harish K, S V" , "jerinj@marvell.com" CC: "dev@dpdk.org" , "stable@dpdk.org" Subject: RE: [PATCH 1/2] eventdev/eth_tx: add spinlock for adapter start/stop Thread-Topic: [PATCH 1/2] eventdev/eth_tx: add spinlock for adapter start/stop Thread-Index: AQHYoKdM0CVNju6F7Ey4m7v6OG7M262ZpRrw Date: Mon, 1 Aug 2022 06:53:28 +0000 Message-ID: References: <20220726042211.1018326-1-s.v.naga.harish.k@intel.com> In-Reply-To: <20220726042211.1018326-1-s.v.naga.harish.k@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.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 47b0aaa2-0b0a-49a4-25b9-08da738a8a4b x-ms-traffictypediagnostic: PH8PR11MB6612:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: f97ddnU7Z73mehWtxulLpjzCWQMNH4JCG7C/oJHReCGoglaGBY0Ru5JJXK16EQix/EcHsYd5yv89LdppH70hx5Zr0zp0r17IMUoI8HiNuSXviaG7NmrlpO3FkD4PDcBpQX9bYJ2JbNOwL6cz8+bmXIsRu5T4zE/x7eGc741ZG+6L/MJCSPrLwtvpbl9khwvl4hDsp3u+XUXBqHVnZOQYVx824Ezi+n8w48JslPeqiyZ7GjVPTUfXQP7hajff0KoINkFj8qwLlFQY8CK4RDNBQ+0w8xkFs4d3r2ALGlneH5KJNUzXqEc2RDcLxaH8SbLSBm6oKHOS/mIbBI4obX+fUbjwr2n3BYo7EJf3sT+xhstB77vbqVICwAUayat+/gXQ+w0Qw+juKM7YZh6EgXOwleGRHItaLd77X5TSpGPTAOuZOPBMaXBh6eOBLhDmV3z1/VVbEz+5t87WAwElJtkq/kuAgLToGz1brDsMl9r32TZbQdzLcxcWFr6gLQ05o7un/6Thf0uBp5RcKn6MJv/EF77260DUz2X0F39k+2bLmfpw4ArS6To+yWR1AOU2jPaihEurqpALiLSF2tqh4AxIh1pzaHmHEi1QE3/P0VCKNDXi47VCCgHYNvI/lzThWFkjM0mrX1Is7HcRzlFWIozGVaBK4sf9vQ9XW/1TNMvX89O3CIzBMhl/HRAy4JGlm0kwe6BBs8g8tOZU0pmPu/eBE2XBVdFm7VHft2lBnxZfNVI2W31pLRn8w43uWsA2PqPbrXntidDC5IzRjmbqwIS39/F+U+8uH3BgbZ1SWBNAwCHOkkyL4/D/oMgOD6l9/hat x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB4348.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(136003)(376002)(396003)(366004)(346002)(41300700001)(6506007)(7696005)(53546011)(186003)(9686003)(83380400001)(26005)(38100700002)(38070700005)(82960400001)(122000001)(8936002)(5660300002)(2906002)(55016003)(52536014)(86362001)(71200400001)(316002)(8676002)(33656002)(64756008)(66476007)(76116006)(66556008)(66446008)(4326008)(66946007)(110136005)(478600001)(54906003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?xQHZtnpVd1BGIqTIpCyNVvC+AmQe+ek6c9pP/hu1j6J4Hd7LufoD+IUmr28S?= =?us-ascii?Q?gr8yQ+xM+E/7FrFtOSaFUdDG5Y75RG0P1EQ9rUzPIoFMNa23DSXKBy5uQtpK?= =?us-ascii?Q?O1Pk9czprz1xuzjgrbie3rmwJO5AhiXa0LpOZ9XEyV/XFtdPnDN5r3y6N3DL?= =?us-ascii?Q?Fr9FG8tL8u0DHvCgYnKNwfWzK5iPtDeQ0kiohr8piXommRUSQoGmD6Krqhgw?= =?us-ascii?Q?MeHnTOKQ1swTVhex5PHes5tR6d4RA42jqOM344CjkAwnFGQX4KEwxdoAtB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GRN6Aqtm9L7IC+v5ME2zQjhZ6LKvyAAvth4Nl?= =?us-ascii?Q?hFsjAVulgCfI7DwUUC2w9A0cYX1lbG4WkGafTC6+Zjjw7OsdSNQn3QqBYnAw?= =?us-ascii?Q?fPXvXlpFKyE2wLwuzX5N51IRRw3atSv6JsCYsilXJOkTt9vhPmPz39QuTWy3?= =?us-ascii?Q?ONzx8Zs4zilJeRTTt+DtYpJ6z07KSXzawc+BEIWJQ/Zl2Jt//KsPv6XABg9c?= =?us-ascii?Q?LyjOv45L+m5PSNS5pBm6VpafkQffmf8WL8z2eJlCbjz9KB2WYxpa+kGm8teZ?= =?us-ascii?Q?c12i0IPfNGEv6Bv6I1ZL9ysn2BZ30xozAUDyHqPkdWTBu960OB6NP8vsaJiX?= =?us-ascii?Q?SqTmS+q+ihYsH0o0pNlEqSm8DIweHMzwm/PbjuIeJJ+qTs/4+gqvLF8QCNXa?= =?us-ascii?Q?pxmrFVq4aJQ7/2jJStRs7f9MhGjEuFZT+xZqjeuentOfhPzdyT8vhn5WwciA?= =?us-ascii?Q?dQ=3D=3D?= 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: DM6PR11MB4348.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47b0aaa2-0b0a-49a4-25b9-08da738a8a4b X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Aug 2022 06:53:28.8739 (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: HOkSf98H4pX/CeXvChtqBnQY/66vpgCEtqbDb62U2B+aNKd1JXvG806gEeLWXfnsQb6gtxQ+hdbj1VXYng2gygRKwW9rmQpdHaFw6YFb/aU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR11MB6612 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > -----Original Message----- > From: Naga Harish K, S V > Sent: Tuesday, July 26, 2022 9:52 AM > To: Jayatheerthan, Jay ; jerinj@marvell.com > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [PATCH 1/2] eventdev/eth_tx: add spinlock for adapter start/stop >=20 > add spinlock protection for tx adapter stop and start APIs > add null check for tx adapter service pointer in adapter start/stop apis. >=20 > Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") > Cc: stable@dpdk.org >=20 > Signed-off-by: Naga Harish K S V > --- > lib/eventdev/rte_event_eth_tx_adapter.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_e= vent_eth_tx_adapter.c > index a237e8edba..3251dad61f 100644 > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > @@ -44,7 +44,7 @@ > #define RTE_EVENT_ETH_TX_ADAPTER_ID_VALID_OR_ERR_RET(id, retval) \ > do { \ > if (!txa_valid_id(id)) { \ > - RTE_EDEV_LOG_ERR("Invalid eth Rx adapter id =3D %d", id); \ > + RTE_EDEV_LOG_ERR("Invalid eth Tx adapter id =3D %d", id); \ > return retval; \ > } \ > } while (0) > @@ -468,10 +468,13 @@ txa_service_ctrl(uint8_t id, int start) > struct txa_service_data *txa; >=20 > txa =3D txa_service_id_to_data(id); > - if (txa->service_id =3D=3D TXA_INVALID_SERVICE_ID) > + if (txa =3D=3D NULL || txa->service_id =3D=3D TXA_INVALID_SERVICE_ID) > return 0; >=20 > + rte_spinlock_lock(&txa->tx_lock); > ret =3D rte_service_runstate_set(txa->service_id, start); > + rte_spinlock_unlock(&txa->tx_lock); > + > if (ret =3D=3D 0 && !start) { > while (rte_service_may_be_active(txa->service_id)) > rte_pause(); > -- > 2.23.0 There are three different changes in this patch. But since they are quite s= mall, it should be ok. Acked-by: Jay Jayatheerthan