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 EABABA0A0E for ; Mon, 10 May 2021 18:23:01 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E01224003E; Mon, 10 May 2021 18:23:01 +0200 (CEST) Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750075.outbound.protection.outlook.com [40.107.75.75]) by mails.dpdk.org (Postfix) with ESMTP id 4D86F4003E for ; Mon, 10 May 2021 18:23:00 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XxMk4Ocp33rFdWMeMsT6GWWFf6HiO3UotlPi6MfhAlfY7GQ+qTLXAJRwEA/ymXmhHIF8XY/kgcCnOwv40QEAL43X9fVmJXZ+WrVYsn3msNuELb5nLBr/yvXfJNlAo02E7yg8qLsN/vgUApkS1vMIrLV6KNNDGuBQbjUvnu5H0ywaGoB/F2Wcf/oZhrwGYjQOR8z2Yn6pkXHpUv9Nj4qE41tWH2b1XHgsa7q2ouB4pOf02WjKbMbCXC+7a3u7K28ambGgALYGwZh6Hb77WP+896NX9swKZNwKe/cUsAaPHn+kbRSH7vXdZYzj4UUnYxN1inTR3ALIpv6DoHxiUKuPfA== 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-SenderADCheck; bh=ji8nvddU2p10ZUyNtxohKGWi1mF2ubha8miul6MNs4s=; b=C9D/0KA0ZqwcKBODz/sSemzUfbFIMHF7O7RZj8nMwBVCzKv656giULUSVqxCcKv961iyK1GiXUS3ayF9DObF7/EVFJI8VuKywNuf+cNxuZKZg9BO11vuyL0xzTk8TyWp+yvy8E1rCrO/yr43Urz13r/9zgeJStRC/K/AtglUsxpakiL1BSWKpvkiLMUcTJCEtp0A5Mb8GfvxI14tOJ+onuCBIfGeGn8apbQUmaHKA3e4pxkjZVUyPkKW9bE0aAzKbft8eR8ClHtbiTVofAK/8Bssk7qACi0DSu/SEZ3unX6ET+28am40Pe8N7Zorjig4sGY2nbGViNOTvLG2/uOzsA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ji8nvddU2p10ZUyNtxohKGWi1mF2ubha8miul6MNs4s=; b=amSy7qb6X1z+GqjkbAz9RlRPCIz/4wtj7X3fX/dTFJu4sk3OSlphzVXQFJenE/jwNDy2jj4p8A95dwPID9Ihni19ZSaTiVcjjmRNZq4scqcpcEp5zlQzVqeMsigWEmJQF2goOP4VTlvKaRG8jSuJMGcVwPLe/EutBui2SIgU+kHgx7g2qOV4/OGnPQfwx8JTRJUbk4ADWft/73a5MDYVCkvAXeHaenO7yf/URRRtxfkvi18YVAo9znr+oCT8BX5gUcAgPVQcyOzmVlsQcryqj3xFmuocZntl/0LhQCEWjp6s85h/LuvHfTwdqC9yxHzrry+Z6+N4w1+BjCkG0Tppbw== Received: from BN0PR04CA0048.namprd04.prod.outlook.com (2603:10b6:408:e8::23) by CH2PR12MB4151.namprd12.prod.outlook.com (2603:10b6:610:78::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.26; Mon, 10 May 2021 16:22:55 +0000 Received: from BN8NAM11FT038.eop-nam11.prod.protection.outlook.com (2603:10b6:408:e8:cafe::18) by BN0PR04CA0048.outlook.office365.com (2603:10b6:408:e8::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:22:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by BN8NAM11FT038.mail.protection.outlook.com (10.13.176.246) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4108.25 via Frontend Transport; Mon, 10 May 2021 16:22:54 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 10 May 2021 16:22:51 +0000 From: Xueming Li To: Robin Zhang CC: Luca Boccassi , Yan Xia , dpdk stable Date: Tue, 11 May 2021 00:02:26 +0800 Message-ID: <20210510160258.30982-197-xuemingl@nvidia.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210510160258.30982-1-xuemingl@nvidia.com> References: <20210510160258.30982-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.145.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5f48f61a-3313-4699-a41f-08d913cfddc4 X-MS-TrafficTypeDiagnostic: CH2PR12MB4151: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iDkH/2eiM1ne1YXo4Y62Ex0pOtCVdI83pWFJ7LdNCh8kqawqBRw9cI6Lk8AXTGFsk809+8yf2nAU4wrMPLuuKOSvHfjLngVZW6pMcaxclUFD+Vv1BMy+q/Tb9IToXjdVFd9D9gfuYm+BTHNPTZMbG6NAdJBR5XIKOyuPpHatdAqK19x283W4/KGxgcG4QP6Ev70GC4KLTJ/ow2w9kRBKhWiO03+Zen9OADpLKVT6nWvUANw2brR1qNHvI2N8AjHKlawZbG2Zjs4/SYBKm/QNQTxBxEACf2D6r0GnQ5CKCQ/nzwxUA9vfEr3+y9+zqJeTRGofVPGDZ5O2B+dzrrOIMFyrFLH4DzYwf5bEmVHwo458GK86Nmz1w2o79IdiQLBBL7+8cV7nAaPj3xyoNpeIq1PSpNYIqa+EIo2F4SgC/Pyc3gTXTiz8JXH4kiBEkl4MofuUCo9mfY5E/tNXTtcpRqdo8Vmq/TUrt4bS+K96OQfHXdgBaE2Xh/llIEsRqtl4gM1xVhrKLJd2UE024mG+mZViAFQPAcSQXVseTv4VcCajC0p4sbhsrBVJ3Iegcy+4kg1BW+dh5Orwazy+TOAydL/DJr9IuVDstD5nox/IUy7L65+i1QP1+2oNjPMRXMjPoX5biAPREZIN3wBH8W3yTdWwtizQq4p6RfZenBTl313dJGTtu/WpeYp51rKjkZOa37uXoAmzAT/pZ1RRKV8i2k/jxZ4BLQddhx7CaRveIdw9/v3NL2Pl5Sok0JGpoS6NbVxgKzfTLEbThwhwwyqXtA== X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(136003)(346002)(376002)(39860400002)(396003)(36840700001)(46966006)(26005)(966005)(1076003)(53546011)(36860700001)(55016002)(47076005)(6286002)(36756003)(7696005)(6916009)(8676002)(2616005)(426003)(316002)(478600001)(16526019)(4326008)(2906002)(8936002)(6666004)(83380400001)(30864003)(54906003)(70586007)(70206006)(86362001)(82740400003)(5660300002)(356005)(7636003)(36906005)(82310400003)(186003)(336012); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 May 2021 16:22:54.7766 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5f48f61a-3313-4699-a41f-08d913cfddc4 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: BN8NAM11FT038.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4151 Subject: [dpdk-stable] patch 'net/i40e: fix lack of MAC type when set MAC address' has been queued to stable release 20.11.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 20.11.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/12/21. 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. Queued patches are on a temporary branch at: https://github.com/steevenlee/dpdk This queued commit can be viewed at: https://github.com/steevenlee/dpdk/commit/674d4cb4de001e4f58b45bc8b78241b9ee0e53f0 Thanks. Xueming Li --- >From 674d4cb4de001e4f58b45bc8b78241b9ee0e53f0 Mon Sep 17 00:00:00 2001 From: Robin Zhang Date: Fri, 19 Mar 2021 09:20:18 +0000 Subject: [PATCH] net/i40e: fix lack of MAC type when set MAC address Cc: Luca Boccassi [ upstream commit 3f604ddf33cf69d9a9a7645e67a7e0b915e76b6a ] Currently, there is no way for a VF driver to specify that it wants to change its device/primary unicast MAC address. This makes it difficult/impossible for the PF driver to track the VF's device/primary unicast MAC address, which is used for VM/VF reboot and displaying on the host. Fix this by using 2 bits of a pad byte in the virtchnl_ether_addr structure so the VF can specify what type of MAC it's adding/deleting. Below are the values that should be used by all VF drivers going forward. VIRTCHNL_ETHER_ADDR_LEGACY(0): - The type should only ever be 0 for legacy AVF drivers (i.e. drivers that don't support the new type bits). The PF drivers will track VF's device/primary unicast MAC using with best effort. VIRTCHNL_ETHER_ADDR_PRIMARY(1): - This type should only be used when the VF is changing their device/primary unicast MAC. It should be used for both delete and add cases related to the device/primary unicast MAC. VIRTCHNL_ETHER_ADDR_EXTRA(2): - This type should be used when the VF is adding and/or deleting MAC addresses that are not the device/primary unicast MAC. For example, extra unicast addresses and multicast addresses assuming the PF supports "extra" addresses at all. If a PF is parsing the type field of the virtchnl_ether_addr, then it should use the VIRTCHNL_ETHER_ADDR_TYPE_MASK to mask the first two bits of the type field since 0, 1, and 2 are the only valid values. For i40evf PMD, when set default MAC address, use type VIRTCHNL_ETHER_ADDR_PRIMARY as this case is changing device/primary unicast MAC. For other cases, such as adding or deleting extra unicast addresses and multicast addresses, use type VIRTCHNL_ETHER_ADDR_EXTRA. Fixes: 6d13ea8e8e49 ("net: add rte prefix to ether structures") Fixes: caccf8b318ca ("ethdev: return diagnostic when setting MAC address") Signed-off-by: Robin Zhang Tested-by: Yan Xia --- drivers/net/i40e/base/virtchnl.h | 29 +++++++++- drivers/net/i40e/i40e_ethdev_vf.c | 91 +++++++++++++++---------------- 2 files changed, 73 insertions(+), 47 deletions(-) diff --git a/drivers/net/i40e/base/virtchnl.h b/drivers/net/i40e/base/virtchnl.h index 9c64fd4690..648072f5bb 100644 --- a/drivers/net/i40e/base/virtchnl.h +++ b/drivers/net/i40e/base/virtchnl.h @@ -402,9 +402,36 @@ VIRTCHNL_CHECK_STRUCT_LEN(12, virtchnl_queue_select); * PF removes the filters and returns status. */ +/* VIRTCHNL_ETHER_ADDR_LEGACY + * Prior to adding the @type member to virtchnl_ether_addr, there were 2 pad + * bytes. Moving forward all VF drivers should not set type to + * VIRTCHNL_ETHER_ADDR_LEGACY. This is only here to not break previous/legacy + * behavior. The control plane function (i.e. PF) can use a best effort method + * of tracking the primary/device unicast in this case, but there is no + * guarantee and functionality depends on the implementation of the PF. + */ + +/* VIRTCHNL_ETHER_ADDR_PRIMARY + * All VF drivers should set @type to VIRTCHNL_ETHER_ADDR_PRIMARY for the + * primary/device unicast MAC address filter for VIRTCHNL_OP_ADD_ETH_ADDR and + * VIRTCHNL_OP_DEL_ETH_ADDR. This allows for the underlying control plane + * function (i.e. PF) to accurately track and use this MAC address for + * displaying on the host and for VM/function reset. + */ + +/* VIRTCHNL_ETHER_ADDR_EXTRA + * All VF drivers should set @type to VIRTCHNL_ETHER_ADDR_EXTRA for any extra + * unicast and/or multicast filters that are being added/deleted via + * VIRTCHNL_OP_DEL_ETH_ADDR/VIRTCHNL_OP_ADD_ETH_ADDR respectively. + */ struct virtchnl_ether_addr { u8 addr[VIRTCHNL_ETH_LENGTH_OF_ADDRESS]; - u8 pad[2]; + u8 type; +#define VIRTCHNL_ETHER_ADDR_LEGACY 0 +#define VIRTCHNL_ETHER_ADDR_PRIMARY 1 +#define VIRTCHNL_ETHER_ADDR_EXTRA 2 +#define VIRTCHNL_ETHER_ADDR_TYPE_MASK 3 /* first two bits of type are valid */ + u8 pad; }; VIRTCHNL_CHECK_STRUCT_LEN(8, virtchnl_ether_addr); diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 62acad702d..10cb68eb97 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -106,6 +106,9 @@ static int i40evf_dev_tx_queue_start(struct rte_eth_dev *dev, uint16_t tx_queue_id); static int i40evf_dev_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id); +static int i40evf_add_del_eth_addr(struct rte_eth_dev *dev, + struct rte_ether_addr *addr, + bool add, uint8_t type); static int i40evf_add_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *addr, uint32_t index, @@ -823,10 +826,9 @@ i40evf_stop_queues(struct rte_eth_dev *dev) } static int -i40evf_add_mac_addr(struct rte_eth_dev *dev, - struct rte_ether_addr *addr, - __rte_unused uint32_t index, - __rte_unused uint32_t pool) +i40evf_add_del_eth_addr(struct rte_eth_dev *dev, + struct rte_ether_addr *addr, + bool add, uint8_t type) { struct virtchnl_ether_addr_list *list; struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); @@ -835,83 +837,70 @@ i40evf_add_mac_addr(struct rte_eth_dev *dev, int err; struct vf_cmd_info args; - if (rte_is_zero_ether_addr(addr)) { - PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x", - addr->addr_bytes[0], addr->addr_bytes[1], - addr->addr_bytes[2], addr->addr_bytes[3], - addr->addr_bytes[4], addr->addr_bytes[5]); - return I40E_ERR_INVALID_MAC_ADDR; - } - list = (struct virtchnl_ether_addr_list *)cmd_buffer; list->vsi_id = vf->vsi_res->vsi_id; list->num_elements = 1; + list->list[0].type = type; rte_memcpy(list->list[0].addr, addr->addr_bytes, sizeof(addr->addr_bytes)); - args.ops = VIRTCHNL_OP_ADD_ETH_ADDR; + args.ops = add ? VIRTCHNL_OP_ADD_ETH_ADDR : VIRTCHNL_OP_DEL_ETH_ADDR; args.in_args = cmd_buffer; args.in_args_size = sizeof(cmd_buffer); args.out_buffer = vf->aq_resp; args.out_size = I40E_AQ_BUF_SZ; err = i40evf_execute_vf_cmd(dev, &args); if (err) - PMD_DRV_LOG(ERR, "fail to execute command " - "OP_ADD_ETHER_ADDRESS"); - else - vf->vsi.mac_num++; - + PMD_DRV_LOG(ERR, "fail to execute command %s", + add ? "OP_ADD_ETH_ADDR" : "OP_DEL_ETH_ADDR"); return err; } -static void -i40evf_del_mac_addr_by_addr(struct rte_eth_dev *dev, - struct rte_ether_addr *addr) +static int +i40evf_add_mac_addr(struct rte_eth_dev *dev, + struct rte_ether_addr *addr, + __rte_unused uint32_t index, + __rte_unused uint32_t pool) { - struct virtchnl_ether_addr_list *list; struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); - uint8_t cmd_buffer[sizeof(struct virtchnl_ether_addr_list) + \ - sizeof(struct virtchnl_ether_addr)]; int err; - struct vf_cmd_info args; - if (i40e_validate_mac_addr(addr->addr_bytes) != I40E_SUCCESS) { - PMD_DRV_LOG(ERR, "Invalid mac:%x-%x-%x-%x-%x-%x", + if (rte_is_zero_ether_addr(addr)) { + PMD_DRV_LOG(ERR, "Invalid mac:%x:%x:%x:%x:%x:%x", addr->addr_bytes[0], addr->addr_bytes[1], addr->addr_bytes[2], addr->addr_bytes[3], addr->addr_bytes[4], addr->addr_bytes[5]); - return; + return I40E_ERR_INVALID_MAC_ADDR; } - list = (struct virtchnl_ether_addr_list *)cmd_buffer; - list->vsi_id = vf->vsi_res->vsi_id; - list->num_elements = 1; - rte_memcpy(list->list[0].addr, addr->addr_bytes, - sizeof(addr->addr_bytes)); + err = i40evf_add_del_eth_addr(dev, addr, TRUE, VIRTCHNL_ETHER_ADDR_EXTRA); - args.ops = VIRTCHNL_OP_DEL_ETH_ADDR; - args.in_args = cmd_buffer; - args.in_args_size = sizeof(cmd_buffer); - args.out_buffer = vf->aq_resp; - args.out_size = I40E_AQ_BUF_SZ; - err = i40evf_execute_vf_cmd(dev, &args); if (err) - PMD_DRV_LOG(ERR, "fail to execute command " - "OP_DEL_ETHER_ADDRESS"); + PMD_DRV_LOG(ERR, "fail to add MAC address"); else - vf->vsi.mac_num--; - return; + vf->vsi.mac_num++; + + return err; } static void i40evf_del_mac_addr(struct rte_eth_dev *dev, uint32_t index) { + struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private); struct rte_eth_dev_data *data = dev->data; struct rte_ether_addr *addr; + int err; addr = &data->mac_addrs[index]; - i40evf_del_mac_addr_by_addr(dev, addr); + err = i40evf_add_del_eth_addr(dev, addr, FALSE, VIRTCHNL_ETHER_ADDR_EXTRA); + + if (err) + PMD_DRV_LOG(ERR, "fail to delete MAC address"); + else + vf->vsi.mac_num--; + + return; } static int @@ -2092,6 +2081,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add) continue; rte_memcpy(list->list[j].addr, addr->addr_bytes, sizeof(addr->addr_bytes)); + list->list[j].type = VIRTCHNL_ETHER_ADDR_EXTRA; PMD_DRV_LOG(DEBUG, "add/rm mac:%x:%x:%x:%x:%x:%x", addr->addr_bytes[0], addr->addr_bytes[1], addr->addr_bytes[2], addr->addr_bytes[3], @@ -2852,15 +2842,23 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr) { struct i40e_hw *hw = I40E_DEV_PRIVATE_TO_HW(dev->data->dev_private); + struct rte_ether_addr *old_addr; + int ret; + + old_addr = (struct rte_ether_addr *)hw->mac.addr; if (!rte_is_valid_assigned_ether_addr(mac_addr)) { PMD_DRV_LOG(ERR, "Tried to set invalid MAC address."); return -EINVAL; } - i40evf_del_mac_addr_by_addr(dev, (struct rte_ether_addr *)hw->mac.addr); + if (rte_is_same_ether_addr(old_addr, mac_addr)) + return 0; + + i40evf_add_del_eth_addr(dev, old_addr, FALSE, VIRTCHNL_ETHER_ADDR_PRIMARY); - if (i40evf_add_mac_addr(dev, mac_addr, 0, 0) != 0) + ret = i40evf_add_del_eth_addr(dev, mac_addr, TRUE, VIRTCHNL_ETHER_ADDR_PRIMARY); + if (ret) return -EIO; rte_ether_addr_copy(mac_addr, (struct rte_ether_addr *)hw->mac.addr); @@ -2904,6 +2902,7 @@ i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev, memcpy(list->list[i].addr, mc_addrs[i].addr_bytes, sizeof(list->list[i].addr)); + list->list[i].type = VIRTCHNL_ETHER_ADDR_EXTRA; } args.ops = add ? VIRTCHNL_OP_ADD_ETH_ADDR : VIRTCHNL_OP_DEL_ETH_ADDR; -- 2.25.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-05-10 23:59:31.685376500 +0800 +++ 0198-net-i40e-fix-lack-of-MAC-type-when-set-MAC-address.patch 2021-05-10 23:59:26.660000000 +0800 @@ -1 +1 @@ -From 3f604ddf33cf69d9a9a7645e67a7e0b915e76b6a Mon Sep 17 00:00:00 2001 +From 674d4cb4de001e4f58b45bc8b78241b9ee0e53f0 Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Luca Boccassi + +[ upstream commit 3f604ddf33cf69d9a9a7645e67a7e0b915e76b6a ] @@ -45 +47,0 @@ -Cc: stable@dpdk.org @@ -97 +99 @@ -index 0c9bd8d2c6..7548062934 100644 +index 62acad702d..10cb68eb97 100644 @@ -235 +237 @@ -@@ -2093,6 +2082,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add) +@@ -2092,6 +2081,7 @@ i40evf_add_del_all_mac_addr(struct rte_eth_dev *dev, bool add) @@ -243 +245 @@ -@@ -2853,15 +2843,23 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev, +@@ -2852,15 +2842,23 @@ i40evf_set_default_mac_addr(struct rte_eth_dev *dev, @@ -269 +271 @@ -@@ -2905,6 +2903,7 @@ i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev, +@@ -2904,6 +2902,7 @@ i40evf_add_del_mc_addr_list(struct rte_eth_dev *dev,