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 7B8F2A04AF; Wed, 26 Jan 2022 23:00:47 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3FEF4275A; Wed, 26 Jan 2022 23:00:46 +0100 (CET) Received: from rcdn-iport-6.cisco.com (rcdn-iport-6.cisco.com [173.37.86.77]) by mails.dpdk.org (Postfix) with ESMTP id 7BCED4274B for ; Wed, 26 Jan 2022 23:00:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1299; q=dns/txt; s=iport; t=1643234444; x=1644444044; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=5ndVvwzLVibsMq1Fm7uc/yhlTg1vpGI7UKuTiKR6Npw=; b=dq8DkvKEoJul25VxZwJ6GATGzS0V11K6TfjcvV/7i9piXDDz1sNM9EAe rC0pVF4QiXQHE4wS/8/gk2qEwVRoAknBwjHWPdFRxOhCrN0o92FviQVD9 +QRzPJn1eB3ZGqfLJg9JLLmhRyBOZYJMePvtKYRti3j/NMvbz8aXIDur0 4=; IronPort-PHdr: =?us-ascii?q?A9a23=3A0f9oJh/vOyRjBf9uWCXoyV9kXcBvk7n3PwtA7?= =?us-ascii?q?J0hhvoOd6m45J3tMQTZ4ukll17GW4jXqpcmw+rbuqztQyoMtJCGtn1RfJlFT?= =?us-ascii?q?RRQj8IQkkQpC9KEDkuuKvnsYmQ6Ec1OWUUj8Wu8NB1eGd31YBvZpXjhhQM?= =?us-ascii?q?=3D?= IronPort-Data: =?us-ascii?q?A9a23=3AobA7+6CFkn+E3hVW/wfhw5YqxClBgxIJ4kV8j?= =?us-ascii?q?S/XYbTApGx2gjIAzTNKXG7TPKyMMTb3fN12aoy+80JS6pfTyoc2OVdlrnsFo?= =?us-ascii?q?1CmBibm6XV1Fqp7Vs+rBpWroHlPsoNOOrEsEOhuFiWG/k73bOC6xZVB/fjgq?= =?us-ascii?q?oTUWbas1h9ZHWeIeA954f5Ss7ZRbrxA2LBVMCvV0T/GmPAzDXf+s9JC3s343?= =?us-ascii?q?IrYwP9nlKyaVDr1JTXSb9gT1LPVvyF94J7yuciMw3XErol8RoZWRs7Zx72/u?= =?us-ascii?q?2je5RpoU5Wuk63wdQsBRbu60Qqm0yUNHfP9xEkZ4HVviM7XN9JEAatTozeOn?= =?us-ascii?q?9Z9wdFAnZexUgwueKbLnYzxVjEJQ3AhZv0bqO+vzX+X9Jb7I1f9W3fh3d1iF?= =?us-ascii?q?E01e4oC9Y5fBWBR+qRGAD4KfhWKhubwy7W+ItSALOxLwNLDJogTvDRryivUS?= =?us-ascii?q?K9gSpHYSKKM7thdtArcT/tmRZ72D/f1oxIzMEyoj8VzB2oq?= IronPort-HdrOrdr: =?us-ascii?q?A9a23=3A0ET3YKtMSIcjbZfQkOx56OOT7skC1IMji2?= =?us-ascii?q?hC6mlwRA09TyXGraGTdaUguyMc1gx/ZJh5o6H+BEGBKUmskqKdkrNhQ4tKOz?= =?us-ascii?q?OW+VdATbsSo7cKpgeBJ8SQzJ8n6U4NSdkaNDS0NykHsS+Y2nj5Lz9D+qj8zE?= =?us-ascii?q?nAv463pB0BIXAIGsNdBkVCe3um+yZNNW977O8CZeKhD7181kOdkBosH6CGL0?= =?us-ascii?q?hAe9KGi8zAlZrgbxJDLQUg8hOygTSh76O/OwSE3z8FOgk/gosKwCzgqUjU96?= =?us-ascii?q?+ju/a0xlv3zGnI9albn9Pn159qGNGMsM4IMT/h4zzYJriJGofy+Qzdktvfr2?= =?us-ascii?q?rCo+O85SvI+P4Dsk85S1vF5ScFHTOQiArGpUWSkmNwykGT0PARDAhKe/apw7?= =?us-ascii?q?gpKCcwLyEbzY1BOGUh5RPFi3MfN2KyoA3to9fPTB1kjUyyvD4rlvMSlWVWVc?= =?us-ascii?q?8EZKZWtpF3xjIZLH4sJlOw1GkcKpglMCgc3ocgTXqKK3TC+mV/yt2lWXo+Wh?= =?us-ascii?q?+AX0gZo8SQlzxbhmpwwUcUzNEW2i5ozuNzd7BUo+Dfdqh4nrBHScEbKap7Ge?= =?us-ascii?q?caWMOyTmjAWwjFPm6eKUnuUKsHJ3XOoZjq56hd3pDnRLUYiJ8p3JjRWlJRsm?= =?us-ascii?q?A/P0roFM2VxZVOtgvARW2sNA6dgv22J6IJ84EUaICbRBFreWpe5fdI+c9vcP?= =?us-ascii?q?Ezc8zDTK5rPw=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0BKAACBw/Fh/5hdJa1aHAEBAQEBAQc?= =?us-ascii?q?BARIBAQQEAQFAgUYHAQELAYFRVgeBUTcxiBADhFlghQ6DAgObIoEugSUDVAs?= =?us-ascii?q?BAQENAQFBBAEBgU2DOAKDXwIlNAkOAQIEAQEBEgEBBQEBAQIBBgSBCROFaA2?= =?us-ascii?q?GQgEBAQEDEhUTBgEBNwELBAIBCBEEAQEfEDIdCAIEDgUIGoVIAy4BoiQBgTo?= =?us-ascii?q?Cih94gQEygQGCCAEBBgQEhQ0LDYI3CYE6AYMNhnGENCccgUlEgRVDgmc+hAw?= =?us-ascii?q?7g02CLpEDfAF6E4FEfMBPCoNFn3YVp3qLc4pVpjsCBAIEBQIOAQEGgWE8gVl?= =?us-ascii?q?wFYMkURkPjiCDcYpedDgCBgsBAQMJjWWCRgEB?= X-IronPort-AV: E=Sophos;i="5.88,319,1635206400"; d="scan'208";a="989738588" Received: from rcdn-core-1.cisco.com ([173.37.93.152]) by rcdn-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 26 Jan 2022 22:00:28 +0000 Received: from mail.cisco.com (xbe-aln-005.cisco.com [173.36.7.20]) by rcdn-core-1.cisco.com (8.15.2/8.15.2) with ESMTPS id 20QM0Qcs012701 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=OK); Wed, 26 Jan 2022 22:00:26 GMT Received: from xfe-rcd-001.cisco.com (173.37.227.249) by xbe-aln-005.cisco.com (173.36.7.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Wed, 26 Jan 2022 16:00:26 -0600 Received: from xfe-aln-005.cisco.com (173.37.135.125) by xfe-rcd-001.cisco.com (173.37.227.249) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14; Wed, 26 Jan 2022 16:00:25 -0600 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (173.37.151.57) by xfe-aln-005.cisco.com (173.37.135.125) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.14 via Frontend Transport; Wed, 26 Jan 2022 16:00:25 -0600 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I+P0fOhmZ2ppYstGeO0+UL2B8CFkAwM+Q/JjFbgWF7YscxSF2ipWx5iTFRgP5zt9Pp0aBXD9NQGP02+RQ0dAYPN3e93Nkmgpu4TREYndz2ZC6rdDjVu4XdY04gq5u9T8evihX+G8borquWKc78VwmJmrhGm1lL3YtJVspsp10yMwSan2mYM9ulbBv4xoP7JCFTqZkoZSmnKIjPuVZQgaVYhIf4a5PWgl1wGzcqz4mrTuayvarXEJboXsUxIFco/N2wGMOsxNdgClXJ2IjfsYYgvmcKjmZ6e2xWutA2oIj2IDAZXeOMbCH9J/3SGJTgaY0uJY5hACB5SRm+z8eTwxOg== 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=WcyjzocL96DS9WvIHmYn3r7eHv30avs2A4EXe93PIZM=; b=MsjUBAavvcpRvb8anhXBLXwT0cfsGSfOQ7j9g3EHbYTKvIRlFZ+Qt+i3qNN5yvltqIIf3g0+YYlII8Rw5rzmheL06FYIcY9/Mb8Ucs0Pa5bKd073bnOSO1500k83y0ejlh7OWRx+QvJ2bfEGS/UzX0gYk+ORVGdmJKlFJrmF2W3RrIeYEHNCxiMhGCfj7qig4fjQKi0MVePksjq1AL9Xbw11W1+GxMeQrGYw73XSmf4JvKTXOH0ZsEYG5NdmswTpNZ+8/ul663cxwKt+etCi5rrT/bK31KIzl2pSBib3ZUp+poTKFsa9X8X9BoS5Jk4yDiqHsm+zA91VowZcniQ21g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cisco.onmicrosoft.com; s=selector2-cisco-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WcyjzocL96DS9WvIHmYn3r7eHv30avs2A4EXe93PIZM=; b=K6SVkcxP4Ca8kdnslYHWtYqJ0gzvdpUe0gmPDZGEKrb5z9lJLfMa3lq2ku7n8ugXZJvASpkz0OFT2Y+zRZ3Po3bzFH0GSsTaSdRpVzPm0zYDT0faOhLAw8LTDABwpoCjdoupZWpaCm9jsMB+1Pld27toXjm9fS0io6XtyxkURFU= Received: from BYAPR11MB2535.namprd11.prod.outlook.com (2603:10b6:a02:be::32) by MWHPR11MB1583.namprd11.prod.outlook.com (2603:10b6:301:b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.13; Wed, 26 Jan 2022 22:00:22 +0000 Received: from BYAPR11MB2535.namprd11.prod.outlook.com ([fe80::2467:ae69:4a15:6541]) by BYAPR11MB2535.namprd11.prod.outlook.com ([fe80::2467:ae69:4a15:6541%4]) with mapi id 15.20.4909.017; Wed, 26 Jan 2022 22:00:22 +0000 From: "John Daley (johndale)" To: Weiguo Li CC: "dev@dpdk.org" Subject: RE: [PATCH] net/enic: adjust memory check and use in proper order Thread-Topic: [PATCH] net/enic: adjust memory check and use in proper order Thread-Index: AQHYEeNZEagmgaQisU2f5x8ML8qdJ6x13CuQ Date: Wed, 26 Jan 2022 22:00:22 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=cisco.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9edb956b-5ba2-4efe-225c-08d9e117404f x-ms-traffictypediagnostic: MWHPR11MB1583:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:663; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: K6HO6CrJlwdHq7eWv7lBOl6lkpcfFho+P4sK20VnSmPmpOseuwaBgSK0fX7N5sEyHcUbONfIoiKujZwQnG4DKpbBjLUB7qNnvZP8izyNXbxuZtUyw+pUhcAAetsyI3t5en8BP3Byo1udirjr6TvGkdNOHVTGU4xic5i4JJuZWbvt67j4sIY9vHHeFoRRBg1a3ZgXJRwr9CIYlfHMocgbmz4scix7EaHy1M3kugEdtja6dt5ja6QgxzfDeAhpWAY+F8IZH8j11dade6mDnUwSnso91eDHmZuiKDU6TxqPRCHxuLG8FvJC1PhKByBmLfnvJeI55iUDUJiszcN4YklCL+/mCiU/9Ztu2F7xt71a9fuRocmK6VUEztlhyXF2DhOQL7zhKJhIy531qScQ2NoiBqqU3xO8MNp8zcvnq2iQt0ZSdSo6LnCzIkrmVI7LvCKVvJr7KQFmF71h/WIzIPKHQOjkY9afLw84JiZonfWj+6V/FWT6eZaB+OPn1QkulqdlwpTrBuHhCeKwelcBAk9udJ4zgbC1I9sJa6Y+B7GyDERVhlwI4QyAQtVDi5YfESB9IVvVpDjhMctz8kRpe4JUK/ppsF/N/canOShQVP0eSO8yU2Ra5lbvlYiX3/jZyp0WxPEo5J1aFzq6Id2I1M499H88XDTzEjlhu5HaZstZqxJaZX8B+GjaWCPkSXiJsePE2bUDmlu91ZmLeUB2UY0MWA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2535.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(366004)(8936002)(83380400001)(66946007)(26005)(71200400001)(316002)(5660300002)(122000001)(186003)(8676002)(38100700002)(6506007)(7696005)(64756008)(508600001)(66556008)(53546011)(66446008)(55016003)(4326008)(9686003)(66476007)(52536014)(38070700005)(86362001)(6916009)(33656002)(76116006)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?YWlGu121QfrOXw1/8YxpTXy960z2/1t8+dDuhxwUjo38t1IEj43gHHofwAHJ?= =?us-ascii?Q?nqDXeuA9P++FNuqYT2fRIt9Y05CNUyaSa9suChDA2I7P9Xuk1aRVmK2z/JVJ?= =?us-ascii?Q?zXcwq/dPC/MbjG2nwKhW1LXPs1zGWm2XxY1NfBZm0bZZBXee842zxi/M5kT0?= =?us-ascii?Q?zX1WpyvE+fC125BK2GYQ2/nLzdQpP6EIu2G+4RlCUnK/D7ChQ75cN0Hx2Iad?= =?us-ascii?Q?QVKDaY43Cm4rr11bP9YjfJZNFxOWRFnLB18yO4R5DwX2QYR1G43uGM7aa6nx?= =?us-ascii?Q?spJMAeL3USwWebwY2JOoY74RU4D3V9xyv13wplbwkshl8Oyo6ypt8MnqTJ8u?= =?us-ascii?Q?x2o0wmee2aKbyOTwsWEfsEmm4xqWLxt+1alyirVGM2ntplfU+xNOBLnxn4jc?= =?us-ascii?Q?M4THvNHNnS2d6CgZ12ebjmPBGCJVgydg57AOK5UIT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gke+dksk/Rnhjzfuwv1/JDJsuRyMsGRsyxektY3HdfQXuTKP?= =?us-ascii?Q?7EI8hRreiCkHVRvL5PobENlUljXoNZC6P+8gMQYO984OD2fr6gvXGYI6d8LA?= =?us-ascii?Q?EGiwmXYWAgL7IHVyAUMResBGPGvkwCQ1qk12rSZbYVWCe7sgHRCK6DvlmDmb?= =?us-ascii?Q?p33NqaoHkU0RtuLsZ0T2sbT71PWXDl6V52q/GSQHxA2YBP257xCUy7xhICZf?= =?us-ascii?Q?G26W7fIdSXlNRuUIxN8EK7F+exVMPkEIIv5ELXju00ddjRIc6n346rp+yuj2?= =?us-ascii?Q?L1qi40uQdwSxKOTR0dFXVoM=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: BYAPR11MB2535.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9edb956b-5ba2-4efe-225c-08d9e117404f X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Jan 2022 22:00:22.7498 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 5ae1af62-9505-4097-a69a-c1553ef7840e X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: BtWXOCTHRvSzWvYoF8PoNH2kqkoGoxNinvXoOv6kBN6efw6TMrGDaveNfs7Hj0v34HcE28vN4HbgGPQ9Gt4PMg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1583 X-OriginatorOrg: cisco.com X-Outbound-SMTP-Client: 173.36.7.20, xbe-aln-005.cisco.com X-Outbound-Node: rcdn-core-1.cisco.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 Reviewed-by: John Daley Thanks, John -----Original Message----- From: Weiguo Li =20 Sent: Tuesday, January 25, 2022 4:01 AM To: John Daley (johndale) Cc: dev@dpdk.org Subject: [PATCH] net/enic: adjust memory check and use in proper order Fixes: bb66d562aefc ("net/enic: share flow actions with same signature") Signed-off-by: Weiguo Li --- drivers/net/enic/enic_fm_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/enic/enic_fm_flow.c b/drivers/net/enic/enic_fm_flo= w.c index bf04d714d0..d8718d17ef 100644 --- a/drivers/net/enic/enic_fm_flow.c +++ b/drivers/net/enic/enic_fm_flow.c @@ -2521,11 +2521,11 @@ enic_action_handle_get(struct enic_flowman *fm, str= uct fm_action *action_in, memcpy(fma, action_in, sizeof(*fma)); =20 ah =3D calloc(1, sizeof(*ah)); - memcpy(&ah->key, action_in, sizeof(struct fm_action)); if (ah =3D=3D NULL) return rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, "enic: calloc(fm-action)"); + memcpy(&ah->key, action_in, sizeof(struct fm_action)); args[0] =3D FM_ACTION_ALLOC; args[1] =3D fm->cmd.pa; ret =3D flowman_cmd(fm, args, 2); -- 2.25.1