From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id BCB2A1B1B4 for ; Wed, 24 Jan 2018 16:40:31 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6E660226C9; Wed, 24 Jan 2018 10:40:31 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Wed, 24 Jan 2018 10:40:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=laBglZaZ6HDKurVZi rhysfJZUHfTAUTG3ypxQCA/wg0=; b=p8twsZqhiRayfMag6thMGRz2e9b5ijI8U i7o+zOgC2Zbpaag3AUU95I/AATRV1E4QDbzV7hfB9/ryFmzrEPF8t66YJyRtKZbv Lls+k9uoGvHSPCJJIUiEsHxxIbC1/C3ketb1pq1XP6BufsoCq2PhyQ+bg53NNt6f QgHaaatnnO8+CF6cJ9KTmVtBxfylh9LMj5MDt0y0c3E1/WLfH2sDDmuRZ1D0cwo7 lvLI3Av3lg3nJHdQLiCRCI5e+WPMiHgu5eOxHVuPRwMcG0NMZkak/wNTqyZhnCJO nuvdJGxttuK3JsKTiImHp0tbztf2TMDH3qHQAFNzTPXfOOlZytEhw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=laBglZaZ6HDKurVZirhysfJZUHfTAUTG3ypxQCA/wg0=; b=iG/GQuQ2 TtYrUEzc0W+1Vz98DAKHDd1NkLeMlokj/vM+A9RScOof6K+R3jivRvzRD4kqIMt8 j806IFNGU43cqeyTGetWzPdvr7lLrLFt7zf9rt8mq8VwlsSb5fkUkUbWiTficrNX TbjIFpeUUS5dWrHutfZEBu82AhtDO13ZNwf6d8zUs3IbkZ8krnu21hR7EuwqcORu 6c4bST3guhLDvLv0firAJIPtuNlD4PDg94Q3C1HRibNx1yr0MNH+fJal8YwBiKKX 7BlfRwU7SnN5X+mJgyPT9Tgu1Hg3oKAOuPu6VFoIIR9RlCj8Tzlb6qcT9Lt6lNn1 /DYHlgOVOzrQ+g== X-ME-Sender: Received: from localhost.localdomain (unknown [115.150.27.206]) by mail.messagingengine.com (Postfix) with ESMTPA id 4C4787E3D4; Wed, 24 Jan 2018 10:40:28 -0500 (EST) From: Yuanhan Liu To: Beilei Xing Cc: Qi Zhang , dpdk stable Date: Wed, 24 Jan 2018 23:32:52 +0800 Message-Id: <1516808026-25523-104-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> References: <1516808026-25523-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/i40e: fix setting MAC address of VF' has been queued to LTS release 17.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: , X-List-Received-Date: Wed, 24 Jan 2018 15:40:32 -0000 Hi, FYI, your patch has been queued to LTS release 17.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 01/26/18. So please shout if anyone has objections. Thanks. --yliu --- >>From 7a2ba416b4c49b08e4d640d7f8510da1d74a6686 Mon Sep 17 00:00:00 2001 From: Beilei Xing Date: Tue, 9 Jan 2018 18:37:44 +0800 Subject: [PATCH] net/i40e: fix setting MAC address of VF [ upstream commit 8d1e8e70ff4bff2a0135aa970552f1dcc4628e43 ] New MAC address is copied to dev->data->mac_addrs[0] before calling setting MAC address ops. So it will fail when deleting dev->data->mac_addrs[0]. Deleting hw->mac.addr will fix the issue. Fixes: 943c2d899a0c ("net/i40e: set VF MAC from VF") Signed-off-by: Beilei Xing Acked-by: Qi Zhang --- drivers/net/i40e/i40e_ethdev_vf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index e2cdc7f..922306f 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -2681,6 +2681,7 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev, struct ether_addr *mac_addr) { struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); + struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); if (!is_valid_assigned_ether_addr(mac_addr)) { PMD_DRV_LOG(ERR, "Tried to set invalid MAC address."); @@ -2690,7 +2691,9 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev, if (vf->flags & I40E_FLAG_VF_MAC_BY_PF) return; - i40evf_del_mac_addr_by_addr(dev, dev->data->mac_addrs); + i40evf_del_mac_addr_by_addr(dev, (struct ether_addr *)hw->mac.addr); i40evf_add_mac_addr(dev, mac_addr, 0, 0); + + ether_addr_copy(mac_addr, (struct ether_addr *)hw->mac.addr); } -- 2.7.4