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 6B32FA0548 for ; Fri, 9 Sep 2022 07:39:00 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 486CA40DDC; Fri, 9 Sep 2022 07:39:00 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 0042140A7E; Fri, 9 Sep 2022 07:38:58 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1662701939; x=1694237939; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=TLa6HtVLJGu7OQ895vsuBGrCYh184t2la0jzlPFIL1c=; b=mwQqdaeN+hnK778H/n2sJHpeRIla9l7KJcU0G4BOftboE9tjCgejsr32 g+ujVdcrnwUthQYK/OjtRSbuYmdQFY6AB+bGxaTbwT99qDDgLoVFc6XuQ H4qKqeSeYeU+r6vw/lYaw+t20lve07JwoRiOjpsGAS0ISNixlNtDIobNW Y0Xd+cmcVtqhdBHEV6KouLzdhi/IjUDiyDZqW7FrdAMRmv7bFm5cNKwwE 9Cwy0aAcZwg85dsMra/AdIgBP6unELDaxW2SqMn84F4AYOw+1MH0sO2b9 HQN7MOW1/8mrrc36GztDpeCPLKVQE9rgB8+VH2ekBtaxXsAxivXZpNL6N A==; X-IronPort-AV: E=McAfee;i="6500,9779,10464"; a="280427611" X-IronPort-AV: E=Sophos;i="5.93,302,1654585200"; d="scan'208";a="280427611" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Sep 2022 22:38:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,302,1654585200"; d="scan'208";a="592483565" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga006.jf.intel.com with ESMTP; 08 Sep 2022 22:38:57 -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.2375.31; Thu, 8 Sep 2022 22:38:57 -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.2375.31; Thu, 8 Sep 2022 22:38:56 -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.2375.31 via Frontend Transport; Thu, 8 Sep 2022 22:38:56 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.176) 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.2375.31; Thu, 8 Sep 2022 22:38:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VlxuCvI2i6mSEENFEBywgihM9bxKezjV73khcQFoI1fCZB7nxk//1dpkPCl/aMeUz7rffvUpM7wD0Ci+7LQRCk3LTrQ7VMGcndgXmVRNbxky4vqFqYvPmGe3t5JEf/xiHQRXsDOz8BaZqko/kWo84RiKKnJdBjJlpSAMhoD7mG7r1hzsYRc7LL6R9QTCoPOecRZDFIw2BSoamh5UBK4Wf472K5y5zvUlGZvOEWOmp9cCaSKbwYla0O3RTICtlRSAydByIHSsXOvLyZvBZAMA+7xDNjHulhB1OfEZhXr4F2MQqQHEyxU50vIvwdH9loQFfyCq079TehNOgFhQ0Cg/GQ== 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=Dr/fE5Q7MRXp1VBGOkOzQa4pihZP38jszrXoDi5DuEM=; b=PMw6NvSmMbADgomPkJSfi1oha1V8RGq0tm6MGZWNVj0i+U936L5kxxKGDY8ruMZIJF1mHYgHD5PMlC5RMtE4xAJLxOwGnX/bM2EfK+MuTTdZkkWEGHkapEc6SnOHmkQmtuPyaLUWL/D3kWNkx3/9GmfYu6Nrn29KgYx5GhhWUjqqmHpgqa4wxxek3Zuw+mYwYpvDwO2FNLOIR9N1yB/UTowZzlegNWhgpbsAXDtGqgggc09Rs4L+UMLUjyObOtiu+iWS0WQZxBEH4kpkVKf7/pU8vGWxKjXdJ44NEsMklhIfnrOM06+OraXw2Y10jG1lcpHikqGd3XGaL5XOeui1Pg== 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 DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) by CH0PR11MB5409.namprd11.prod.outlook.com (2603:10b6:610:d0::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Fri, 9 Sep 2022 05:38:55 +0000 Received: from DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::7141:ad86:682d:6e12]) by DM6PR11MB3868.namprd11.prod.outlook.com ([fe80::7141:ad86:682d:6e12%4]) with mapi id 15.20.5588.012; Fri, 9 Sep 2022 05:38:55 +0000 From: "Naga Harish K, S V" To: "Jayatheerthan, Jay" , "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: AQHYoKdM0CVNju6F7Ey4m7v6OG7M262ZpRrwgD02O0A= Date: Fri, 9 Sep 2022 05:38:55 +0000 Message-ID: References: <20220726042211.1018326-1-s.v.naga.harish.k@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.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: 52232fa2-973b-469d-f2d5-08da922595d6 x-ms-traffictypediagnostic: CH0PR11MB5409:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RTIDXcJMuOG1j5SGtDjogtIWqA1F5DmfiYb3XryOBGzDQluttTtBGzGjpkcRfppqP0OOatuVmcYRh0ixaNquAnXq+HOXP6E0pdMAq+ot+9b0tNkr2xCkuvF6rhlpneNZ6ii450dphojrc0/qPVy+3s0mh8gm9knbbxbdcqcPOokaOEvoF2hJDuJyw6oPxWTRPubvG7+aYiUeEB1egKLjnS8w31DKjKlryFNdKcuZKUcY7qBAAiuCssIYvsfrwMUTmh9dA6Sn6R3MQAO0CYak0VKovZgt+uonYvFHfvm41ZArGR9hZipWYgoZLuosO50Ls2Y+p6BJ0vmfBH2y0U7YLXIvoUqYUJtUwBbIY6jZEXhqqrTh9oejWJub4XIJjAqXzBZ5/VDZapwpGREAXKKKsrlXEEr5FXFzr3PXxQjgiyGzpt7t2Al2GE5sZpHEucYQcQ98qzmU++qBbGf6wLLgi5BPg0lYlCwXG06ybcCstgt40lbVB29IB/vfGBIaPgq9wwybRQOt9xVv/WcJMj/pm/yLem/jVgN2RwXm2k0J56cM/AdzyvsAweNPeck1Psj8GUXnxdGVT3jyKvmVhiIaSMK5AvARSRx8mJMk+5IvcGUdtlJ+2ccfUbtjp3JbwblfyDDncS9vUFyivIj00c4d/jENpyhG8jnEWF92j0UWmuxnAwpwjjpt23zVTmOcAPubZQGwa7zcNCRkF6glC/mmXozPO6A0IFO9QIJPAN3rLpWDlxIoNKPbO0GHixRC91kK1Zqzz3RteKKAMCGsEkXNag== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3868.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(346002)(136003)(376002)(396003)(39860400002)(366004)(8936002)(64756008)(5660300002)(52536014)(2906002)(38100700002)(38070700005)(122000001)(41300700001)(82960400001)(71200400001)(478600001)(7696005)(26005)(9686003)(53546011)(316002)(54906003)(76116006)(83380400001)(110136005)(6506007)(66446008)(66476007)(55016003)(8676002)(186003)(4326008)(66556008)(66946007)(33656002)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?9QnvOdRNsBngK0KP44MkunT4QvAsbuU53DC5zJJCf4D8mIATuxQ+NaO9r3o+?= =?us-ascii?Q?6EuOj85NtkBhtfoDrRZp/cHnqY4H8pdTJEhwvCUgtFKJdEUBHQoFaAbYFiOi?= =?us-ascii?Q?B2pQCadFAHB5xDi3B1lzNutF9QaeeWBuyYxbbDIwWx6ySPajAnoEgJB26Bqr?= =?us-ascii?Q?xFYty4oHruJn9IIQ2PjEOv372V/KlYRnLEjRe8Uz2s3K7nZRnrqI24MSxgHf?= =?us-ascii?Q?KkL13mI9Ikv57LuohvudehcrPUpyQmf5bD9wV83kmMZbXPBrGX+oquYZY88B?= =?us-ascii?Q?Wxc3i7vhVo6d5Wbu/kvTSG+nMFC5fpStsH4fWDMTNQn5J87+ce8XFTmsGDZX?= =?us-ascii?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R273Ev5IcRabDV?= =?us-ascii?Q?4mIBiqYqJzX0vsgWrI6y7m5Kdlw5bxj7K76FhGGm8YWXqkzFob69JdKtqZqJ?= =?us-ascii?Q?8JqoHqVdLxjRnlKiDt5aT8kGe4YJLR3SvXgnFplfjM8KynGhbSCd7ltFUK0+?= =?us-ascii?Q?JwprPLyOo9b86k7tSL49iRWWXC3X/EA8AKiuOROywQfokhIrFNorvs6eSVLg?= =?us-ascii?Q?GL7LCbOYcjLEf9cxbjaH0nG2mFNBopx2V0koe7gkKD5m+2tCkUdn42XMLb2V?= =?us-ascii?Q?9DA/lIA1Sw/5zue7GL1hGiTnrJmb394Te8Ac27SJVJ0AkgDjYFwXBhnePJzN?= =?us-ascii?Q?zYhmOqak3ZtvRkA71iE1XwSHlsEvk3RFwXKe3twmqvw/8f4m48QRBw8UlYvv?= =?us-ascii?Q?3Q=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: DM6PR11MB3868.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 52232fa2-973b-469d-f2d5-08da922595d6 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Sep 2022 05:38:55.1058 (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: pY4y+DiQHPmUKnnsq4Br4R9kIYl39tvsVnZ0Uj+VsN1VElqZI0No3aOxuqbi51MTkcy+L9IDsu9BBtPcTa708lVCje6LAsF5NChyr5FIp9k= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR11MB5409 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 Hi Jerin, This patch set is acked by maintainers. Please review and do the needful. -Harish > -----Original Message----- > From: Jayatheerthan, Jay > Sent: Monday, August 1, 2022 12:23 PM > 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 >=20 > > -----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 > > > > add spinlock protection for tx adapter stop and start APIs add null > > check for tx adapter service pointer in adapter start/stop apis. > > > > Fixes: a3bbf2e09756 ("eventdev: add eth Tx adapter implementation") > > Cc: stable@dpdk.org > > > > Signed-off-by: Naga Harish K S V > > --- > > lib/eventdev/rte_event_eth_tx_adapter.c | 7 +++++-- > > 1 file changed, 5 insertions(+), 2 deletions(-) > > > > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c > > b/lib/eventdev/rte_event_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; > > > > 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; > > > > + 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 >=20 > There are three different changes in this patch. But since they are quite > small, it should be ok. >=20 > Acked-by: Jay Jayatheerthan