From: Ivan Boule <ivan.boule@6wind.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] [RFC] ethdev function to update MAC multicast addresses filtered by a port
Date: Wed, 08 Apr 2015 15:24:17 +0200 [thread overview]
Message-ID: <55252C01.3070101@6wind.com> (raw)
This RFC describes a proposed change in the ethdev API for updating
the set of multicast MAC addresses that are filtered by a port.
The change consists in adding a new function "update_mc_addr_list" that
takes the whole set of multicast MAC addresses to be filtered by a port,
if any.
In case the whole set of multicast addresses is too large for the device
resources used to record them, the ethdev function "update_mc_addr_list"
must transparently enable the allmulticast feature of the port, if such
a feature is supported/enabled by the device.
Reason for Change
-----------------
With the current ethdev API, the receipt of multicast packets on a given
port can only be enabled by invoking the "rte_eth_allmulticast_enable()"
function.
This approach may not work on Virtual Functions in SR-IOV architectures
when the host PF driver does not allow this operation on VFs.
In such a case, joined multicast addresses must be individually added
into the set of multicast MAC addresses that are filtered by the [VF] port.
For this purpose, a new function "update_mc_addr_list()" must be
introduced into the set of functions exported by a Poll Mode Driver.
Each time a DPDK application joins (respectively leaves) an IP multicast
group, it must add (respectively remove) the associated multicast MAC
address from the set of multicast address to be filtered, and invoke the
function "update_mc_addr_list()" with the updated list of multicast
addresses on each relevant port.
Proposed API extension
----------------------
The new function "update_mc_addr_list" is added into the "eth_dev_ops"
data structure:
typedef int (*eth_update_mc_addr_list_t)(struct rte_eth_dev *dev,
struct ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
It is exported through the following new function:
/**
* Update the set of multicast addresses to filter on an Ethernet device.
*
* @param port_id
* The port identifier of the Ethernet device.
* @param mc_addr_set
* The array of multicast addresses to filter. Equal to NULL when the
function
* is invoked to flush all multicast MAC addresses filtered by the port.
* @param nb_mc_addr
* The number of multicast addresses in the *mc_addr_set* array.
Equal to 0
* when the function is invoked to flush the set of multicast MAC
addresses.
* @return
* - (0) if successful.
* - (-ENOTSUP) if hardware doesn't support multicast filtering.
* - (-ENODEV) if *port_id* invalid.
*/
int rte_eth_dev_update_mc_addr_list(uint8_t port_id,
struct ether_addr *mc_addr_set,
uint32_t nb_mc_addr);
--
Ivan Boule
6WIND Development Engineer
reply other threads:[~2015-04-08 13:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=55252C01.3070101@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).