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 EF5BFA00C2; Thu, 10 Feb 2022 09:53:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EF974013F; Thu, 10 Feb 2022 09:53:37 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id AD1C140041 for ; Thu, 10 Feb 2022 09:53:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644483215; x=1676019215; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=zI5BQQRDlFSSjj0QEnoqzxAA/03S7KGgfE+2wzv8jzU=; b=hDBCelhNiWRJtTgSSI/URX5a6BOD+MojncDQm0mM4iW+7jBCVVFcGupm gwO6OW3aeOh1GjNKQ+zlJA2aucgYiMCa1khiIZ53pEJcdL0mPn4GOusjc 66fT/qy3f8OAFe8RH5Zpfc5/EB+UDk4qkvVkzzJKR2qftObAiX0pxHXuY uY10SjSwhgXHiEGBpBuLWLLgJZI6WTefnlsy1dHPjiSAymQfRZtut6lIj DYThfQyFkr+xrnOei4pPndTio8MmitKqJJrFYh26DRePfKrGUYQf6EWxd ux8PWoQeL7EwCtPmFQbiQV4NpVpl87U7dq3SP7QnVaqVQW9uJ/yHveZJn w==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="249197811" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="249197811" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 00:53:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="541520234" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by orsmga008.jf.intel.com with ESMTP; 10 Feb 2022 00:53:34 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20; Thu, 10 Feb 2022 00:53:33 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.20 via Frontend Transport; Thu, 10 Feb 2022 00:53:33 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.49) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 10 Feb 2022 00:53:33 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AzubV9u92GLGb0cyFK7BpWXJjgoq5W8UdSs7aeVKBrI+9rM72CzUj/TJh0zqax/jTr0Scwi04EKXYFUgtqM4/F9zVJl5xvCzD2JHrTTyKKiYq/xW8mKG8ANMo1UXGPDtffFcnQ1Z05fXL/kDTCdEPLwsTPir+rWc5Sqf1uDm0hkPXyKhXe+5gp9PSf+LXhrNVrHbjDqmN8l3phDnn67JC92dbMHg/a6T3uD9Kw/wfWcY1+c1dpJSz0BEsjGktLlJmPKlLvkgjJuWfGfA7rd+EAiKdZY0Qh3QYecAFjwqI6KykAeJTFOO38RiJMFuL/iJkbxU5z4CkQ747jJNkM6gMQ== 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=RW6gRzJc+jTQTy0wS5EpHTkbwmMGbMw40ALzTjzs01w=; b=OSfkr2m6e+6qBGoS86JF7IcAoIOP2XRj3dwzrxqp86fyHgZXmT3WMaKJ87bI3QX97bl4zceD30aL9UfhzV+4UOHaD0JSPTqNwfSHjMd62KqCijHjqDvTyHI+srNLN74SibMpiBiV+odQGJj2AwDh7mCra7NDKYuBb9sRFBehLk26kn4KQd0JZ67+yMAzWGP42Vke+05ATE9VFq7RqhW/Qbjw69rNq9GUtYHyxlHZrwo+UUq9pTYiEdZDRVU2HuC7uVamKyLhjdAFXj+PHmTGxffNAEIYsZH7uF4FakIjQQeEh+8qtI/HjQox7wIyOPzEdbPHepwn2V9BM0whmrz2pg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from CO1PR11MB4785.namprd11.prod.outlook.com (2603:10b6:303:6f::21) by BN6PR11MB1265.namprd11.prod.outlook.com (2603:10b6:404:48::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.11; Thu, 10 Feb 2022 08:53:29 +0000 Received: from CO1PR11MB4785.namprd11.prod.outlook.com ([fe80::7107:7896:df86:5e10]) by CO1PR11MB4785.namprd11.prod.outlook.com ([fe80::7107:7896:df86:5e10%8]) with mapi id 15.20.4975.011; Thu, 10 Feb 2022 08:53:29 +0000 From: "Loftus, Ciara" To: "Wang, Haiyue" , "dev@dpdk.org" CC: "Zhang, Qi Z" Subject: RE: [PATCH v1] net/af_xdp: make umem configure code more readable Thread-Topic: [PATCH v1] net/af_xdp: make umem configure code more readable Thread-Index: AQHYHbdxlGNYKmLmZ0+QZ0lBB1DGiKyMazyQ Date: Thu, 10 Feb 2022 08:53:29 +0000 Message-ID: References: <20220209124358.137807-1-haiyue.wang@intel.com> In-Reply-To: <20220209124358.137807-1-haiyue.wang@intel.com> Accept-Language: en-GB, 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.200.16 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: 429554ba-38d5-4d7e-a1de-08d9ec72cf35 x-ms-traffictypediagnostic: BN6PR11MB1265:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3FQENuOtnaVDvODyuAWFDKhrm04zoJy0Z2NNtDNIZMxIdm1e8REKnWzzTeQNjuvpECJAa+GXfl4wX/BXcKPlHFHQUKb8GkNpbl4LtpR4KIw5zBjq5eJi7ovbO7l4y15DfWOb0An2TvZQ6UAZtS6FXvI1bqYVHov42RbifuWmnv4/iQNljtMMCnP1Pe7LmizojyuAhrHjz9O15JN++2/K5IkSHNK7Wqq87RnEDsAuCweVb9ox9YHbPETN5k7D+jeVd2N92UTzlCy+7fO6BZBXv5oPeB8qlV12yBTpRaXrxvzI9wLbxbjogUMrr1XugqsTVc1G37dvqPDko/GaF/1gthcSyZmrMs6oqOGYY05bXk7Iw5+7dQShPwMS6L5+cwpRDMVBhyfgz/x6JOcgQ19v33RlyvlisYCHSCFQsPSj8Uf45mRE6V4e+XY8yuh6iQCzXYjAavIMsnvyMejYa5OYVKrvGMJgTK3kj0Kp+cY3DPAQQNFUwtVfuyYNBfOkS4Hs15feD8aOsBzjzay8k83ch7ioIBg+VL4MSPHukghzVSh5hO+nNVPK0GCvoF03LkxPXfPnWcrtccy6Wr/X8OuEEUW76DEi4+5752fJrtcATBszWaWv6/aVUXYkJSqj06p1IeFgG0sO/KX5CVl8PoTLx6JX5LsEgUE7GAASc78F6gyZbMpncsWyblJrM1XaZbiQ9chSsu+8vpCm+jFALfpyQw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CO1PR11MB4785.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(52536014)(76116006)(66946007)(33656002)(66446008)(66476007)(66556008)(64756008)(8676002)(38070700005)(4326008)(5660300002)(122000001)(38100700002)(316002)(55016003)(8936002)(110136005)(2906002)(6506007)(9686003)(7696005)(508600001)(186003)(26005)(83380400001)(71200400001)(107886003)(82960400001)(86362001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wN7PHRjN0/pRLakgKJcEN9ypaQpDa/rADxrdEEb/Jxaa62Cenqq7Owb9MPdG?= =?us-ascii?Q?sBZ5qwm+rqk5h7CxkRyxBKe7L6b836GKylRqUhSFsxfWG47GJy4NfhDsXiI+?= =?us-ascii?Q?aLtXSdj9YVizOUnPklrnwebo6nk+nz911AqwmOA3sqWzNtx9ALlCJfZsPTuZ?= =?us-ascii?Q?ybY7xAJbboCvGvQK+s+ZR08eP6FNl9bfRG1p8FMlQuFkHCN+SnNBsRgr6Ia7?= =?us-ascii?Q?/vecQ33eZo9L0eAFwmiKH0Odo/8cZWxFTsSwwEHfElRTPtSQIVx8WdTSEYgu?= =?us-ascii?Q?I2bbVwQOKGqU7mBqRAcWJqZfExDp/aFCT0MZVXPUjx8a8NGJXF3G4+JjcTXa?= =?us-ascii?Q?7P0Kd+pr09s5wTpV7UqJCqyBhA5fvZDMowLkEXZpCnb7kUgxQ1zgEMljUOH/?= =?us-ascii?Q?D58s9wIEd/Zs31Hn/7yfb8ajrd0he1eGM7+JlfVQnVaNj48+gI65jtLFPQh1?= =?us-ascii?Q?LPJ7ZYaWtyz4mwgg8WNk3AuFC5uC3pFQWwxDsnv72gQZDo8f9r/CcHlV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sMBCVwAztHL/VcTDdZ8fi+0a2+UkcIng1LhbMj?= =?us-ascii?Q?W783Yyf9esNHH2e3JvS+DBi1tZn36zgeNUubk49DQLsG+mIbdlvNZ0Y8vdIP?= =?us-ascii?Q?EB6ebWRk92a9AOj5jP9kQAuQDpEpvlqnRkNExKo2lrE98zX7cIylIjhoz6gE?= =?us-ascii?Q?OtDxcm6Df+bHQgw3RBEHI20SXRWMjOWB/B1X+EEYx/g1tlG+PkfvUB0QRZdA?= =?us-ascii?Q?Zg=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: CO1PR11MB4785.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 429554ba-38d5-4d7e-a1de-08d9ec72cf35 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Feb 2022 08:53:29.5367 (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: nMbLxaeyueYOKUQftI2u3zSdgdQzrUibDMAz9c7Ix8tiUXPnZOt2UYv0xfaZaA6j/WosIu8y8DHYSVGuLxDdOA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1265 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 > Subject: [PATCH v1] net/af_xdp: make umem configure code more readable >=20 > The below compile time defined style make the code not so readable, the > first function end block is after "#endif" segment. >=20 > #if defined(XDP_UMEM_UNALIGNED_CHUNK_FLAG) >=20 > xdp_umem_configure() > { >=20 > #else > xdp_umem_configure() > { >=20 > #endif > 'shared code block' > } >=20 > Signed-off-by: Haiyue Wang Thanks for the patch! Acked-by: Ciara Loftus > --- > drivers/net/af_xdp/rte_eth_af_xdp.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/af_xdp/rte_eth_af_xdp.c > b/drivers/net/af_xdp/rte_eth_af_xdp.c > index 1b6192fa44..802f912cb7 100644 > --- a/drivers/net/af_xdp/rte_eth_af_xdp.c > +++ b/drivers/net/af_xdp/rte_eth_af_xdp.c > @@ -1078,6 +1078,12 @@ xsk_umem_info *xdp_umem_configure(struct > pmd_internals *internals, > __atomic_store_n(&umem->refcnt, 1, __ATOMIC_RELEASE); > } >=20 > + return umem; > + > +err: > + xdp_umem_destroy(umem); > + return NULL; > +} > #else > static struct > xsk_umem_info *xdp_umem_configure(struct pmd_internals *internals, > @@ -1138,13 +1144,13 @@ xsk_umem_info *xdp_umem_configure(struct > pmd_internals *internals, > } > umem->mz =3D mz; >=20 > -#endif > return umem; >=20 > err: > xdp_umem_destroy(umem); > return NULL; > } > +#endif >=20 > static int > load_custom_xdp_prog(const char *prog_path, int if_index, struct bpf_map > **map) > -- > 2.35.1