From: David Harton <dharton@cisco.com>
To: dev@dpdk.org, wenzhuo.lu@intel.com, konstantin.ananyev@intel.com
Cc: David Harton <dharton@cisco.com>
Subject: [dpdk-dev] [PATCH] net/ixgbevf: prevent duplicate default mac filter entries
Date: Tue, 10 Dec 2019 21:11:33 -0500 [thread overview]
Message-ID: <20191211021133.11342-1-dharton@cisco.com> (raw)
The ixgbe PF manages the default VF mac address in a separate
list from the additional VF mac filters. librte_ethdev
stores the default mac in dev->data->mac_addrs[0], however,
the ixgbevf driver re-adds mac_addr[0] when a mac filter is
removed.
ixgbevf_remove_mac_addr() is modified to avoid (re)adding
the default mac when it differs from the permanent mac.
Signed-off-by: David Harton <dharton@cisco.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 2c6fd0f13..49285ce53 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -6209,15 +6209,16 @@ ixgbevf_remove_mac_addr(struct rte_eth_dev *dev, uint32_t index)
* The IXGBE_VF_SET_MACVLAN command of the ixgbe-pf driver does
* not support the deletion of a given MAC address.
* Instead, it imposes to delete all MAC addresses, then to add again
- * all MAC addresses with the exception of the one to be deleted.
+ * all MAC addresses with the exception of the one to be deleted
+ * and the default mac address (index 0).
*/
(void) ixgbevf_set_uc_addr_vf(hw, 0, NULL);
/*
- * Add again all MAC addresses, with the exception of the deleted one
- * and of the permanent MAC address.
+ * Add again all MAC addresses, with the exception of the deleted one,
+ * the default mac (index 0) and the permanent MAC address.
*/
- for (i = 0, mac_addr = dev->data->mac_addrs;
+ for (i = 1, mac_addr = &dev->data->mac_addrs[1];
i < hw->mac.num_rar_entries; i++, mac_addr++) {
/* Skip the deleted MAC address */
if (i == index)
--
2.19.1
next reply other threads:[~2019-12-11 2:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 2:11 David Harton [this message]
2020-01-26 17:32 ` [dpdk-dev] [PATCH v2] " David Harton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191211021133.11342-1-dharton@cisco.com \
--to=dharton@cisco.com \
--cc=dev@dpdk.org \
--cc=konstantin.ananyev@intel.com \
--cc=wenzhuo.lu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).