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 46F36A034C; Mon, 8 Aug 2022 06:44:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6493842826; Mon, 8 Aug 2022 06:44:08 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 14788427F9 for ; Mon, 8 Aug 2022 06:44:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659933846; x=1691469846; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=lmPdcToTO7Kou351RzMYrcUuL9oyalsRScJzsbpdWDk=; b=RmeCvV/v4mZ5/sruEvXXq+24DKP6EmG0Wlpr0bf5TecDMvdOQuMzyjxH 7f3jxBmn2DtZmwDOA7NxuWb99oJYCJnMajDgcpi1oNnsEKUx1K4OoRuC9 pcznjfu/NmHh71glqC3T6v6Q3/OeyFXY4DAiJpOIXn2UXrliNa7I6Nvx+ uYWkhKrpKiLZ/YdlmgbHJ3bxSOL9169KiZ5KZbJIhiaDYcyN6bfMiYzkT 5kMjhyNvalfh9q+HnBcHLg2QVN35Va/AmAPVjLBz7PrVOnoG2wIbybaAo v7pv/zwtvaRznDizPXpnzTDEMfwCwRRa6LWzFDk5ReO0JVe9gSfS0oW4X w==; X-IronPort-AV: E=McAfee;i="6400,9594,10432"; a="277431303" X-IronPort-AV: E=Sophos;i="5.93,221,1654585200"; d="scan'208";a="277431303" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Aug 2022 21:44:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,221,1654585200"; d="scan'208";a="849933085" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by fmsmga006.fm.intel.com with ESMTP; 07 Aug 2022 21:44:04 -0700 Received: from orsmsx606.amr.corp.intel.com (10.22.229.19) 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, 7 Aug 2022 21:44:04 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) 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; Sun, 7 Aug 2022 21:44:04 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) 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.28 via Frontend Transport; Sun, 7 Aug 2022 21:44:04 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.28; Sun, 7 Aug 2022 21:44:03 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ogKmPfWDKXgGIbHGD+X8XjixiV8LDCweIp4i2Ple6Td4GWAayX5LqQNtPgYtM6i0zDXGAUONsAkCjQxWqTyAw7wAmFeN8BEepfyeGQ5sr3xtel5aPDbiUk4WCuI9MuRXRXOpHd4yx+N9SexFJYPBOGnvQUB5ZrWzqRtOxZsm3OMYX0AxRR+UfXFwgLHsjh7v2wgtc0tyh6Zz4IefRVBzt5RnTA4yiKS1GWPByljw3ohlMcV/V5uwnw81WXaC7/gnQDw0E6hkXygpU1tLgJzpVW9aIafl5vYnySBpJsRebMRReKxX5XVvXGgP3QEC/Yrj4D+O1iWut2ECCQ4S+rx4gA== 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=uqGxlA5TrpdhYhzTIomHvEaRqtNqUO27rMZIZSSTYZM=; b=ix/GfRFzLLFg/LJEZhIETglikdDFO8Bc81DuaLLdQLuvho5g+dk8VSbsmi+TES4HSjxjBTLIkMC7b9eqcPEmWxk29bxuY3rEnZwrJAuBtmkrEtcKU1Rk1xg3bG28ySceACSAeIKSqycXOez7bVl6BgKfvxTK6o0i49VI4D+IeCsnwnoXDSRFb1gwqVEZao3D4FTnPus7t/zKmdj7v9YPUuVaI4Iq9UHQXn4P+GohmOL3A2Y9IYcrzVcScZhSkjW+ozISMgJ4fN3rfppa3DCrhTQymzso4Ad5NgN2WUHD4ovZNID1Jg00H3WN7o1k2A1QoqYeLgsXVGaIhav8rGfm7g== 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 DM6PR11MB3723.namprd11.prod.outlook.com (2603:10b6:5:13f::25) by DM4PR11MB6312.namprd11.prod.outlook.com (2603:10b6:8:a5::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5504.19; Mon, 8 Aug 2022 04:44:03 +0000 Received: from DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::6c95:eaf7:e652:9301]) by DM6PR11MB3723.namprd11.prod.outlook.com ([fe80::6c95:eaf7:e652:9301%3]) with mapi id 15.20.5504.020; Mon, 8 Aug 2022 04:44:03 +0000 From: "Guo, Junfeng" To: Stephen Hemminger CC: "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" , "dev@dpdk.org" , "Li, Xiaoyun" Subject: RE: [PATCH 04/13] net/idpf: add queue operations Thread-Topic: [PATCH 04/13] net/idpf: add queue operations Thread-Index: AQHYpyyW+vC6gpb4WkS79pLkHX4Pnq2dSY4AgAcq5wA= Date: Mon, 8 Aug 2022 04:44:02 +0000 Message-ID: References: <20220803113104.1184059-1-junfeng.guo@intel.com> <20220803113104.1184059-5-junfeng.guo@intel.com> <20220803081606.0838d104@hermes.local> In-Reply-To: <20220803081606.0838d104@hermes.local> 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: bc3295b7-b531-4297-60a5-08da78f89e52 x-ms-traffictypediagnostic: DM4PR11MB6312:EE_ x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: +ilMfp7rwQCwc50c2mKvVhp9dZOGz6ydvxbUjhUHhSmT9cHChdEvZlrYOaqqrF4STjSURt/clYIcbTsvlwGrLpf/UbGTKeCw33n+NREvscxLsrzab8jgqBMdXFXynLyDkxL4xSNR3iuTSlzGIU1dZVk6kEoPcg/Igcx0S9yAshq2/QHVC/Rh2Cy5arGocNsmDGutdh83Ib4lw2VETN3fEAFsVZxVCHxwRoq8ydW+7ABHbV//NH99Qpxn7HP0AoBkGYNF52nbjhsvqWROZ66loE5d6VzDvyjMpHAHNpRpApJxIo1DeGsAdRWv+qtwSm/viy/3xoTmH7kvAbwFW+vO6/kI8ojeFamtBpVE1B0XU7KKoVAPrcMmc+X8xhOUg0fB5HH/lLYhkSGbdzQleu89kRAXSEt8yhhrtbBhRDsP0BlCszCFdh9r/GAq9yOM3MloUaX3TYii6HnFnSajI1OQK2mzERn/4DZbYPwa06VgCm7kZL/4rXnOoW6CtpWMFX8vDzi4Kxa7wn8y65SFajGy5CUFuIoBsVPGaAcmSZTfk9dHfRDxIYaZ/tfNOX5X9anBWQ4L+ZPVh8AfuDJQP6jTywtQRXdxs5jlSoJtO5rTvqrbc/5llz5rDkwg05E8jrQw4bcIU8YoLwq5kCeROpo+HcbX9YlprexXVqfsF0cHpZ+1n/haA6zL6XafXjVxY6ntx7jAeYtjVA/CECfTkgARfwALfuzPTLrVGvbbU4Z6qicjRmelXs2ZIfXgxnfee3Q92BOAQ1IfvTIGmnnr0jARuw8xl+nFjfk4y0YZDNgd690= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB3723.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(366004)(346002)(396003)(136003)(376002)(26005)(7696005)(6506007)(71200400001)(9686003)(107886003)(8936002)(4744005)(55016003)(2906002)(53546011)(52536014)(33656002)(86362001)(186003)(54906003)(41300700001)(478600001)(122000001)(82960400001)(83380400001)(38070700005)(316002)(6916009)(38100700002)(66946007)(76116006)(5660300002)(8676002)(66446008)(64756008)(66556008)(4326008)(66476007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?7LUOU8cD4L8iEtFOgacp4w8YE8xPNmBLYpv7UjuGDdBa5YF9h+lEuBLLT43t?= =?us-ascii?Q?hefu2ZETIsyfPGE9SErfC4aQ70MqpqpoABlMvW+S9Dvk3+him6URNXM1ZMk8?= =?us-ascii?Q?bSJokl39hL99bFQJS1KYiJhBRdhE2Q/zaJH9IfWz72LxFcgeDVp++45ho684?= =?us-ascii?Q?qWw85jBId6Gsv1yWVhzEFG9jHk4rmJg3RUoPEHz/E6deDr2eDRyYiQnx3B3m?= =?us-ascii?Q?kfnTz4G11tFAlWM9u2QuEhG7l6po7uXNZGmSuuo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pg5osMh1/mlBFFC3ShMPUv55XA3HhJANIdq0Mh3ovvaVupL?= =?us-ascii?Q?ElR7Ywb0Q64ifpdAbHLlzhGLjXbtyk61elHfRekeV4fr2PLk8wRwo4Q7F/0o?= =?us-ascii?Q?GEDjrGxoCtPedwdM+pM2l5y+eppEvm77l9Qi9FnRQ8idmtB2uDYhtETtRHSP?= =?us-ascii?Q?0xhlNEmhE5RHDf0+lXG7aM9RurQwqlwUNZVWmJyPQlrsAvEy+3YrfLNCrkPT?= =?us-ascii?Q?de9kyJJmgS9pp6jBhfOqWVFmZASIOG2GH15UofF7l9iGW+T68Bk36JPGrErb?= =?us-ascii?Q?H9tXQQVQ6YjQ0V2x80/ZFbcg3akJbO5JMDYbGC1FvEc6NYxlWxx61HC4QP2L?= =?us-ascii?Q?Qz5nIHuNKLVO+QalMxbtMW6ZF0YL0juZp77A0+hnwbw45zjx0h8L8He2vYTG?= =?us-ascii?Q?hDj/PyOrSskGCSJtY7HPGEkvyPxPf8dAeAElPEJ8?= 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: DM6PR11MB3723.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc3295b7-b531-4297-60a5-08da78f89e52 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Aug 2022 04:44:02.9299 (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: 6N76kdpYNNDctFjIwlaqsUWS5W2wzBxISgB+BOYCgSHGoDvvmsqX2K516MdPxP5IRsDW8mncnBGjZi1NCyIoiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6312 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 > -----Original Message----- > From: Stephen Hemminger > Sent: Wednesday, August 3, 2022 23:16 > To: Guo, Junfeng > Cc: Zhang, Qi Z ; Wu, Jingjing > ; Xing, Beilei ; > dev@dpdk.org; Li, Xiaoyun > Subject: Re: [PATCH 04/13] net/idpf: add queue operations >=20 > On Wed, 3 Aug 2022 19:30:55 +0800 > Junfeng Guo wrote: >=20 > > +static void > > +idpf_tx_queue_release(void *txq) > > +{ > > + struct idpf_tx_queue *q =3D (struct idpf_tx_queue *)txq; > > + > > + if (!q) > > + return; > > + > > + if (q->complq) > > + rte_free(q->complq); >=20 > null pointer check before calling rte_free is unnecessary. > rte_free(NULL) works. Thanks for your review! Will refine this in the patchset of upcoming versio= n. >=20 > There is even a script used to scan DPDK to fix this. > devtools/cocci/nullfree.cocci