From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BD146A051C for ; Tue, 11 Feb 2020 12:28:19 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5CB51BE9E; Tue, 11 Feb 2020 12:28:19 +0100 (CET) Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by dpdk.org (Postfix) with ESMTP id 79DEA2B9C for ; Tue, 11 Feb 2020 12:28:18 +0100 (CET) Received: by mail-wm1-f67.google.com with SMTP id m10so2050642wmc.0 for ; Tue, 11 Feb 2020 03:28:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ShJ8I2aiQBZtk28Pd6zVFfIoC/5cCGZo10KPrzxWhC0=; b=fV/Xi8VXunQAgUfzMXFPyOhp6jg7YzZCsr8811WYVP7rISvYBPp7brS5MZU6awjJSZ mxQwqCmj7hULCmBdRujfxzblpnlcwMgbEQcf5E22DgAITNNvqlyF3HoqQyDW1chuZVmu MuozL4TPK19p5DklKen2vtRglnzHbt3tn0QW9SyGjaXa23TOi0XVuZlCnhSYlnEEBw7I 9qt+khOGFOk5DqI05/PYL0Q/mcbBbxwyyXOWo7oZcDglnUJ8jg79OxV8ftxkhyTDSoGI 7BN/pjjEev+/K4J/2CeYASx3jQ+Iy5BJdT3UQpwyLY8/4ioKs+xjqLJyvQMC5unIcjVe ddXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ShJ8I2aiQBZtk28Pd6zVFfIoC/5cCGZo10KPrzxWhC0=; b=bc6wQT+o3jp+jSk9MgybXaR8Chax0ME7o5OvsN7YThnv7J2qsmzSKilomOnbalYN4Q 2WN5shpju6/HTntJzpwoOpnr1o29yKLjhczu5hV4ug1jk2imVigsNfjeLOY7DmF31vey sxJnj5usZMBQ93QMP53fPuIAgDfMmy9S2gxXEvySgMefElvVi5xU0g3SMWEFR+Of/b3s gcLUqufGWb3PN4Qs3o09Z4YFDgQ3S9WB+mQ/B+zF8DeHiUdcfui8De02bNfMukbAuxj9 LC7PNFCbBJAv25zdbVlcK0XdugiHDFfPuYW8NQKKPJzyDfEvjoX/kRH/Kf8QqIxrBHZS VvXA== X-Gm-Message-State: APjAAAVGcx/L/8Xil0ICxn5kGmGO81biIjpQLU/Jg/fsk5bZbd9pLVB6 9Nr4q8woSP0Ff2Ts0zPcdrckGnMeGYk= X-Google-Smtp-Source: APXvYqxbZDc9BLpYu/UVnIwNqc9nRsfbd4NqcRAs5Hmy5sSiLmtQWSw6ANeW+rdR84Hu3SYhy171pw== X-Received: by 2002:a1c:9c4c:: with SMTP id f73mr4936345wme.125.1581420498193; Tue, 11 Feb 2020 03:28:18 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id d22sm3298178wmd.39.2020.02.11.03.28.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Feb 2020 03:28:17 -0800 (PST) From: luca.boccassi@gmail.com To: Haiyue Wang Cc: Qiming Yang , Xiaolong Ye , Qi Zhang , dpdk stable Date: Tue, 11 Feb 2020 11:20:20 +0000 Message-Id: <20200211112216.3929-74-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200211112216.3929-1-luca.boccassi@gmail.com> References: <20200211112216.3929-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/ice: use ethernet copy API to do MAC assignment' has been queued to stable release 19.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 61373f54b977c3b740608362c06acba64a9a75f6 Mon Sep 17 00:00:00 2001 From: Haiyue Wang Date: Mon, 13 Jan 2020 16:22:21 +0800 Subject: [PATCH] net/ice: use ethernet copy API to do MAC assignment [ upstream commit c7c5e2621077bce4222868d910293eb7ec19431e ] Use the API rte_ether_addr_copy to do MAC assignment, instead of calling rte_memcpy function directly. Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine") Signed-off-by: Haiyue Wang Acked-by: Qiming Yang Acked-by: Xiaolong Ye Acked-by: Qi Zhang --- drivers/net/ice/ice_ethdev.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 8b34ed9c71..94a8277688 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -870,7 +870,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr) ret = -ENOMEM; goto DONE; } - rte_memcpy(&f->mac_info.mac_addr, mac_addr, ETH_ADDR_LEN); + rte_ether_addr_copy(mac_addr, &f->mac_info.mac_addr); TAILQ_INSERT_TAIL(&vsi->mac_list, f, next); vsi->mac_num++; @@ -1658,16 +1658,16 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type) if (type == ICE_VSI_PF) { /* MAC configuration */ - rte_memcpy(pf->dev_addr.addr_bytes, - hw->port_info->mac.perm_addr, - ETH_ADDR_LEN); + rte_ether_addr_copy((struct rte_ether_addr *) + hw->port_info->mac.perm_addr, + &pf->dev_addr); - rte_memcpy(&mac_addr, &pf->dev_addr, RTE_ETHER_ADDR_LEN); + rte_ether_addr_copy(&pf->dev_addr, &mac_addr); ret = ice_add_mac_filter(vsi, &mac_addr); if (ret != ICE_SUCCESS) PMD_INIT_LOG(ERR, "Failed to add dflt MAC filter"); - rte_memcpy(&mac_addr, &broadcast, RTE_ETHER_ADDR_LEN); + rte_ether_addr_copy(&broadcast, &mac_addr); ret = ice_add_mac_filter(vsi, &mac_addr); if (ret != ICE_SUCCESS) PMD_INIT_LOG(ERR, "Failed to add MAC filter"); @@ -3265,7 +3265,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, PMD_DRV_LOG(ERR, "Failed to add mac filter"); return -EIO; } - memcpy(&pf->dev_addr, mac_addr, ETH_ADDR_LEN); + rte_ether_addr_copy(mac_addr, &pf->dev_addr); flags = ICE_AQC_MAN_MAC_UPDATE_LAA_WOL; ret = ice_aq_manage_mac_write(hw, mac_addr->addr_bytes, flags, NULL); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-11 11:17:41.561229347 +0000 +++ 0074-net-ice-use-ethernet-copy-API-to-do-MAC-assignment.patch 2020-02-11 11:17:38.496003142 +0000 @@ -1,13 +1,14 @@ -From c7c5e2621077bce4222868d910293eb7ec19431e Mon Sep 17 00:00:00 2001 +From 61373f54b977c3b740608362c06acba64a9a75f6 Mon Sep 17 00:00:00 2001 From: Haiyue Wang Date: Mon, 13 Jan 2020 16:22:21 +0800 Subject: [PATCH] net/ice: use ethernet copy API to do MAC assignment +[ upstream commit c7c5e2621077bce4222868d910293eb7ec19431e ] + Use the API rte_ether_addr_copy to do MAC assignment, instead of calling rte_memcpy function directly. Fixes: 84dc7a95a2d3 ("net/ice: enable flow director engine") -Cc: stable@dpdk.org Signed-off-by: Haiyue Wang Acked-by: Qiming Yang @@ -18,10 +19,10 @@ 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c -index 88cd906603..6b344cb6e5 100644 +index 8b34ed9c71..94a8277688 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c -@@ -875,7 +875,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr) +@@ -870,7 +870,7 @@ ice_add_mac_filter(struct ice_vsi *vsi, struct rte_ether_addr *mac_addr) ret = -ENOMEM; goto DONE; } @@ -30,7 +31,7 @@ TAILQ_INSERT_TAIL(&vsi->mac_list, f, next); vsi->mac_num++; -@@ -1663,16 +1663,16 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type) +@@ -1658,16 +1658,16 @@ ice_setup_vsi(struct ice_pf *pf, enum ice_vsi_type type) if (type == ICE_VSI_PF) { /* MAC configuration */ @@ -52,7 +53,7 @@ ret = ice_add_mac_filter(vsi, &mac_addr); if (ret != ICE_SUCCESS) PMD_INIT_LOG(ERR, "Failed to add MAC filter"); -@@ -3270,7 +3270,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, +@@ -3265,7 +3265,7 @@ static int ice_macaddr_set(struct rte_eth_dev *dev, PMD_DRV_LOG(ERR, "Failed to add mac filter"); return -EIO; }