From: Ivan Boule <ivan.boule@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 4/5] ixgbe: add multicast MAC address filtering
Date: Thu, 28 May 2015 17:05:22 +0200 [thread overview]
Message-ID: <1432825523-19006-5-git-send-email-ivan.boule@6wind.com> (raw)
In-Reply-To: <1432825523-19006-1-git-send-email-ivan.boule@6wind.com>
Support the function "set_mc_addr_list" in the "ixgbe" and in the
"ixgbe-vf" Poll Mode Drivers.
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
---
drivers/net/ixgbe/ixgbe_ethdev.c | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 0d9f9b2..885ed8f 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -257,6 +257,10 @@ static int ixgbe_dev_filter_ctrl(struct rte_eth_dev *dev,
void *arg);
static int ixgbevf_dev_set_mtu(struct rte_eth_dev *dev, uint16_t mtu);
+static int ixgbe_dev_set_mc_addr_list(struct rte_eth_dev *dev,
+ struct ether_addr *mc_addr_set,
+ uint32_t nb_mc_addr);
+
/*
* Define VF Stats MACRO for Non "cleared on read" register
*/
@@ -381,6 +385,7 @@ static const struct eth_dev_ops ixgbe_eth_dev_ops = {
.rss_hash_update = ixgbe_dev_rss_hash_update,
.rss_hash_conf_get = ixgbe_dev_rss_hash_conf_get,
.filter_ctrl = ixgbe_dev_filter_ctrl,
+ .set_mc_addr_list = ixgbe_dev_set_mc_addr_list,
};
/*
@@ -406,6 +411,7 @@ static const struct eth_dev_ops ixgbevf_eth_dev_ops = {
.tx_queue_release = ixgbe_dev_tx_queue_release,
.mac_addr_add = ixgbevf_add_mac_addr,
.mac_addr_remove = ixgbevf_remove_mac_addr,
+ .set_mc_addr_list = ixgbe_dev_set_mc_addr_list,
};
/**
@@ -4439,6 +4445,32 @@ ixgbe_dev_filter_ctrl(struct rte_eth_dev *dev,
return ret;
}
+static u8 *
+ixgbe_dev_addr_list_itr(__attribute__((unused)) struct ixgbe_hw *hw,
+ u8 **mc_addr_ptr, u32 *vmdq)
+{
+ u8 *mc_addr;
+
+ *vmdq = 0;
+ mc_addr = *mc_addr_ptr;
+ *mc_addr_ptr = (mc_addr + sizeof(struct ether_addr));
+ return mc_addr;
+}
+
+static int
+ixgbe_dev_set_mc_addr_list(struct rte_eth_dev *dev,
+ struct ether_addr *mc_addr_set,
+ uint32_t nb_mc_addr)
+{
+ struct ixgbe_hw *hw;
+ u8 *mc_addr_list;
+
+ hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);
+ mc_addr_list = (u8 *)mc_addr_set;
+ return ixgbe_update_mc_addr_list(hw, mc_addr_list, nb_mc_addr,
+ ixgbe_dev_addr_list_itr, TRUE);
+}
+
static struct rte_driver rte_ixgbe_driver = {
.type = PMD_PDEV,
.init = rte_ixgbe_pmd_init,
--
1.7.10.4
next prev parent reply other threads:[~2015-05-28 15:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-28 15:05 [dpdk-dev] [PATCH 0/5] multicast " Ivan Boule
2015-05-28 15:05 ` [dpdk-dev] [PATCH 1/5] ethdev: add " Ivan Boule
2015-05-28 16:22 ` Stephen Hemminger
2015-05-29 7:52 ` Ivan Boule
2015-05-29 8:56 ` [dpdk-dev] [PATCH v2 " Ivan Boule
2015-05-29 13:12 ` [dpdk-dev] default unicast mac address - was: " Thomas Monjalon
2015-05-29 15:18 ` Stephen Hemminger
2015-05-28 15:05 ` [dpdk-dev] [PATCH 2/5] app/testpmd: new command to add/remove multicast MAC addresses Ivan Boule
2015-05-28 15:05 ` [dpdk-dev] [PATCH 3/5] e1000: add multicast MAC address filtering Ivan Boule
2015-05-28 15:05 ` Ivan Boule [this message]
2015-05-28 15:05 ` [dpdk-dev] [PATCH 5/5] app/testpmd: fix reply to a multicast ICMP request Ivan Boule
2015-05-28 16:21 ` [dpdk-dev] [PATCH 0/5] multicast address filtering Stephen Hemminger
2015-05-29 9:33 ` Ivan Boule
2015-05-29 15:17 ` Stephen Hemminger
2015-06-12 13:58 ` Thomas Monjalon
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=1432825523-19006-5-git-send-email-ivan.boule@6wind.com \
--to=ivan.boule@6wind.com \
--cc=dev@dpdk.org \
/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).