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 40A34A00C2; Thu, 23 Jun 2022 16:59:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 240204067B; Thu, 23 Jun 2022 16:59:39 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id A067840146; Thu, 23 Jun 2022 16:59:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655996377; x=1687532377; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=o64qasZsdCZQI65KMAiJajonpIFvo8hT1SrcGLs/Znw=; b=Bik7AL7ZW9uJYT1fiGQhqJNpm+/KyWsMH7S/hhu9vLqiLiKdYuWt9Jo6 zVFmNg93m0qdLic3PFJgl7Mkrgog15zlmjEZ+rVwJ0JiYwLl9BhYrP/ny q0kpGcu764e2QCSFxav0BuoFilisz+oRO8GztOMkl0QFcGK5GaVad2STn FvDurrjal6csegSXNUprltY1XdkD/2ZbEI5S3VOJzUnUY9WLHjx9wuxLQ MvI48h6dkiXHu9TBBtl2LbIYcuD9TA3oI2s3Q4kA2qers6tPpnK8Tp5r8 4b75N5IX0ZOs1oYlmZBbvhd7i7vEfViATFRLcRN5cSN2amos+tLrQ4zpC A==; X-IronPort-AV: E=McAfee;i="6400,9594,10386"; a="278290410" X-IronPort-AV: E=Sophos;i="5.92,216,1650956400"; d="scan'208";a="278290410" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jun 2022 07:59:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,216,1650956400"; d="scan'208";a="563480291" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga006.jf.intel.com with ESMTP; 23 Jun 2022 07:59:17 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 23 Jun 2022 07:59:16 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 23 Jun 2022 07:59:16 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Thu, 23 Jun 2022 07:59:16 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Thu, 23 Jun 2022 07:59:16 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VSucno5/PJWc0V8MCfRTapyRcMsMPZNKFjEY1QY0+/fmqvPAVs7+eaXo6KhP2v26p3yIxdIgaLeKnr9L3wnIzH2Vn/oh/HEJ2Jse2/Pp+J+jYVBsrksWwS+Iva2UaNa0NsUpQjRybvpPrLlfOugiArZCHm3UpyHvVvfy9pqqM7hS7CadYg4WQN4mqRZhrfg6WBeH9eTFaG+k4SGLgvB/4Nor70jlX6jafr+FxY4dXdrRxCL75pOtk8W8u16lgqhO5dog4/x78C5OTiV+4WDC1MooCmrTENJK1CsxfvcxApj0N28HWwYA9hIx34250B0qm/6b7GVsstgMAKJBq1Zyfg== 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=3Qke4jp+RX3N3RykpXGjFnOry4snYZbUD8MRIMnpeyo=; b=ZW0DQIIc8XLRyLlCNsCqVz+uEU104oIDH6c+fZDK4btU2X436RXOxYINYs/pCwLJvFuQQaAB+cTzy5sywHgW0TfEse57U8+IFJcz9ubotnkwn99nGz/NG0CHpyUc2unutKHBhdQXXon9OtcRcUgSTgUJyjCcf2quyw+Qbq+OhFRVjAoZbh58bLYK7+WbjVgxZCGeaU9gR0UzF0V9aw0QSOvKl+GkUbrM/AueGn7TcVLLduaWtiiTGQ9zKfrnUHNriAjcBAVFyNXAeoIGD9SvngnysaeKFiIRhJsP+IWk4QHZAPaXEteioxTL/rXNU4W0zgD/8fp3sKEu96vWhCATGg== 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 DM6PR11MB3836.namprd11.prod.outlook.com (2603:10b6:5:13a::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5353.18; Thu, 23 Jun 2022 14:59:13 +0000 Received: from DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::d57f:4e1a:5ec7:118]) by DM6PR11MB4348.namprd11.prod.outlook.com ([fe80::d57f:4e1a:5ec7:118%7]) with mapi id 15.20.5353.022; Thu, 23 Jun 2022 14:59:13 +0000 From: "Jayatheerthan, Jay" To: "Naga Harish K, S V" , "jerinj@marvell.com" CC: "dev@dpdk.org" , "stable@dpdk.org" Subject: RE: [PATCH] eventdev/eth_tx: fix queue delete Thread-Topic: [PATCH] eventdev/eth_tx: fix queue delete Thread-Index: AQHYhu2BGjknGPSjzUSl0wnUWcEUU61dFSkw Date: Thu, 23 Jun 2022 14:59:13 +0000 Message-ID: References: <20220623100511.2388739-1-s.v.naga.harish.k@intel.com> In-Reply-To: <20220623100511.2388739-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: 2bb9f460-db31-4e63-5169-08da5528ef77 x-ms-traffictypediagnostic: DM6PR11MB3836:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: smYjuYlkh4iR20IJokkfYB74xZ36qQx4Ta8W8y5zzB0mI2LCZqNiR9dQ3It5O7UQCsaLeofjFC7zAnFRdoqiIqkAzmXoWGoREiKVmGn+RdGJqrSGf7egbV4HekIYGuGFnDv0OXPZA5GHGvoUTnV/7w+vzZ59AnQ5r09rpOo3+3O4kNAXTry6CygF2HcSMGpW3Sgv8gytYvYsWnm9TaHf2L+8gYKE1jqpeXRNDcZ7OyjcHstZzZgD2qyJEpTvS+Hxa4wB/JGOcs2s2wwLzfWjQ0SXsauBNbMBtZqNoa3fUnICw44OrS0HthFWV38GsVGi1UJ13lw4HgNDzsjvUEDFYphCsdLx1+Px8J5vftKgEkEoUPKrys4km3a424V8VRi1IcWqANh0j17j2W3lWem8HSNYbI+Uspe46gtN0Cmy8DPal1b/nBfAPdqnJojsPt6Q323fLB0JUvduWAKB5nOt8tfBMQZawgfqSOHmCpNYPWIkDAJlxiY5/dKSn5BCSEeTeEzTgsVjjmFuqYEkS+0nluhXPnRuqxUhng5ueopPKR10u7V1qB+Od64FL9BhCRtwpfo9CovyazQEesr906k53kt5A+4W7CKhevUPAhxSQtpIQyh92zSKNM5dS4EBRVtjZ3WsZAuSN7bOYP0GFLboiV7bje5SRgk91vxlLCX4G/Et7vpxMMg6KPeTmWbTfCoCOTsWnnyywAOMFiXxY+k3VWIMpmYI80rYBqDDNc2/W2kvwu9gpi5x4aHzgWZJEL98WG6OZKF5O4dRzFqaFWiENA== 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)(376002)(366004)(346002)(39860400002)(396003)(136003)(26005)(478600001)(8676002)(66946007)(54906003)(66556008)(110136005)(4326008)(83380400001)(6506007)(8936002)(76116006)(64756008)(33656002)(9686003)(71200400001)(316002)(66446008)(66476007)(53546011)(38100700002)(2906002)(122000001)(7696005)(86362001)(38070700005)(5660300002)(82960400001)(186003)(55016003)(52536014)(41300700001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?GCB2VY+4h0nPnXUTdmL5sUCdqiyHdRu+s7X7bmWBrMw9bKsTUjB7Cyi7d1cb?= =?us-ascii?Q?zErNKWGRfHRlU4BrBeSZpY4B+TFNS+pZu2y1vFAqIahhAaqpe3yKIM0p4zF6?= =?us-ascii?Q?SDvnEvG6gCEKu6RENgGQG+YHvdxziUQugqJtZv//z8V8LFpnPoPcsHu+gWEt?= =?us-ascii?Q?ZDFufhdGuSpqkgMK1ZGG7Jy+XpxjiHpWIw94Jh0B1e30Qm3Z1eKjzZda9LpJ?= =?us-ascii?Q?GCwL5OAqtUyurh/TAt9WZkpZ6Omixmjn6+psKSD2aOzIy7pa6PMnaHSZDwxB?= =?us-ascii?Q?FKBlmIODHLQdosXda0twultVVhWuasNhhkibUGoMR8/KBLFM998ePTPep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VtfZqv09Ug7NjKS7JzH5WE29mr7fN//o0hz?= =?us-ascii?Q?y6TfuFBMWoZodyT/EofLGQyanLy3VetIcJ10qQPa2Jx9t5apg5pR+jDU+he0?= =?us-ascii?Q?BbgJdrllrQqnIk9UprdUEcWbhRwG2BmDi0Qm9ARstqQgl8+xNg7aA9jiyrp5?= =?us-ascii?Q?hun8qxXfgJBLJFeRQfRqe8o0t8RBjjq0XvsDpEAFS+2KoEsZy+kN1btMYAdm?= =?us-ascii?Q?OCSqfjyTeqb4xyGXm/SjuTExVttM57F2Kxh8N/0wNavfXzWeAF/gt793hZVH?= =?us-ascii?Q?HHTNHL/I6iiWzGFFZr7Mm4k8x2Y0k4AXJ/W8rnqposX/DrhOmsFBtnAo1GGa?= =?us-ascii?Q?R6KveA3rXHdhjxeoXZuntFME+/KHgARbJINIhfWos+T1aMMW4Rzh+/iaRY0v?= =?us-ascii?Q?eQ=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: 2bb9f460-db31-4e63-5169-08da5528ef77 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jun 2022 14:59:13.0661 (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: 1xhJsqucr63gSSbwixvPjWPp/C6a1mJR9P6v9H5C0EaPP7VDgvpcLKZDGuf3xMT9Vp+XSlwgcaVEP4adRTdkbljIMUflImANXqd/EHeIuLM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3836 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Looks good to me. Acked-by: Jay Jayatheerthan -Jay > -----Original Message----- > From: Naga Harish K, S V > Sent: Thursday, June 23, 2022 3:35 PM > To: Jayatheerthan, Jay ; jerinj@marvell.com > Cc: dev@dpdk.org; stable@dpdk.org > Subject: [PATCH] eventdev/eth_tx: fix queue delete >=20 > Add spinlock protection in queue delete function. > This protects the data path while the queue delete operation > is in progress. >=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 | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) >=20 > diff --git a/lib/eventdev/rte_event_eth_tx_adapter.c b/lib/eventdev/rte_e= vent_eth_tx_adapter.c > index c700fb7b1f..b4b37f1cae 100644 > --- a/lib/eventdev/rte_event_eth_tx_adapter.c > +++ b/lib/eventdev/rte_event_eth_tx_adapter.c > @@ -891,9 +891,10 @@ txa_service_queue_del(uint8_t id, >=20 > txa =3D txa_service_id_to_data(id); >=20 > + rte_spinlock_lock(&txa->tx_lock); > tqi =3D txa_service_queue(txa, port_id, tx_queue_id); > if (tqi =3D=3D NULL || !tqi->added) > - return 0; > + goto ret_unlock; >=20 > tb =3D tqi->tx_buf; > tqi->added =3D 0; > @@ -903,6 +904,9 @@ txa_service_queue_del(uint8_t id, > txa->txa_ethdev[port_id].nb_queues--; >=20 > txa_service_queue_array_free(txa, port_id); > + > +ret_unlock: > + rte_spinlock_unlock(&txa->tx_lock); > return 0; > } >=20 > -- > 2.25.1