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 50ABFA0352; Tue, 25 Jan 2022 13:01:29 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3A21F426E5; Tue, 25 Jan 2022 13:01:29 +0100 (CET) Received: from out203-205-251-66.mail.qq.com (out203-205-251-66.mail.qq.com [203.205.251.66]) by mails.dpdk.org (Postfix) with ESMTP id 46FCD426DF for ; Tue, 25 Jan 2022 13:01:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foxmail.com; s=s201512; t=1643112076; bh=0cMyFwEViZR+9vw/r6DBqNeT6C46PN5fThSGkffhP7I=; h=From:To:Cc:Subject:Date; b=Z6ANaRA5QSmQmnz29wsRZxP4ArzX7RvCX+C9NpPEFeU3CeaGH4IeWqDJbg8D3cIKf ONTaJSauXEkrhaNPzjtVqaS33xfcQ+xQq2PyHSSP76saSY0ZRrH+lIGB/KEL8RdIrO /enr5DFX7MJtB/nNHm0ev3KTDRm0Kdn+NduzvZW0= Received: from localhost.localdomain ([111.193.130.237]) by newxmesmtplogicsvrszc9.qq.com (NewEsmtp) with SMTP id 319A482; Tue, 25 Jan 2022 20:00:49 +0800 X-QQ-mid: xmsmtpt1643112049t8x6gjm1j Message-ID: X-QQ-XMAILINFO: MEJfjFhMgUDPmgXIQ6XHy841OrrODiTqJkZt43TQQ00lo12iHf8b3wtKQO7eqA ZV4OjoGJgp8v5R5GCsODscc2tAFlOgeZpM5bZ/xET7vsjfrtiEAVxHbe/EAhKreaLkZwMIDGWChM banCEYpPuC/k0CsyxxG2Q7GkEivN7nj7J7SSRFb1/iUYQ4JGOHSZ4v7psFYx2MuaCEHuU6UprlMD rpoblxrWEHAg0xzetI6pFqmJzKNCnwDgHtjmotxGUW68NzJRdwuFl4wI90A+Ah3hGYoc9sX4XpUq RaKQWhG8ANtW6347LYjakQpG0bDDFC6AN4oq63uBVF4q1pTLzzUghH+3iUBrnSAErl5nuHI1WTYu fdexP4zxx3P0hhpJEOZbEX1tTD0cR/a/Y63ZXYC1+03u6vQ+OM3vcXcn/J6GNh8SjRRrgouLVlof fTkZ+e3AIOe58CgTrF30SLtpkww48K1KgIjZnayKziM1HrFNYPNH1TlTfGpzZ12NcyVJ9EudpkpD g9xcnXLa+UEAlhyjh2TbhT0BZBclJ68QFNSJBvr7WzjlmCvHs9iJGqZMvAbfc9BYzcOE+E6YtaRK CSRIQMMqYxkITK1PUm0zuCKEbLejsJjvXUG3a3VsWzCSl/XKF0qU8EvtVwDiazWER7VHQaW0hzMF uN03czUgh6tkGXKcP339yi9DxGsAXZpZIuqVQLQPNGpoeQO2tt8Arw22dZSlpfLA8hn+exEFvwoy oxqoL42pxtEIm1qNRUFAaXL1EzQtH2OquOEhBabq1114vdXHcpDUjZpWJ6bUPSfzrQVycPcQ0Qc5 vYYf9tGsgSRO4OvoRmXVSuByl+7e1no6DBtWxsWVt+FKEauBqtcd7XQzkimYZSTnoPqOAThjsDNp V4StdwcLN8sAUcrkJM9Q7C0fnyN9FA4nMHOG5sqron From: Weiguo Li To: johndale@cisco.com Cc: dev@dpdk.org Subject: [PATCH] net/enic: adjust memory check and use in proper order Date: Tue, 25 Jan 2022 20:00:49 +0800 X-OQ-MSGID: <20220125120049.30534-1-liwg06@foxmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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_flow.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, struct fm_action *action_in, memcpy(fma, action_in, sizeof(*fma)); ah = calloc(1, sizeof(*ah)); - memcpy(&ah->key, action_in, sizeof(struct fm_action)); if (ah == 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] = FM_ACTION_ALLOC; args[1] = fm->cmd.pa; ret = flowman_cmd(fm, args, 2); -- 2.25.1