capsule-rs / capsule

A framework for network function development. Written in Rust, inspired by NetBricks and built on DPDK.
Apache License 2.0
393 stars 35 forks source link

Expose `rte_eth_dev_set_mc_addr_list` function into capsule runtime to filter specific MC addresses #150

Open sbuzzard opened 2 years ago

sbuzzard commented 2 years ago

What's desired

We have an application which proxies certain IPV4 multicast inputs to IPV6 DEPI (Downstream External PHY Interface) using DPDK via capsule. For performance reasons, we would like to filter the specific set of multicast addresses we're interested, ideally by DPDK rather than in our application code, for performance reasons. We're using multicast = true which, as you know, means all multicast traffic. DPDK provides the function, rte_eth_dev_set_mc_addr_list, which is implemented by the driver we're using. This is publically available in the capsule-ffi; however, it takes a u16 port_id and that is not accessible from the capsule lib (PortId is capsule/core/ffi crate private and in addition, that struct's u16 member is private to the core/ffi module.that would like to filter specific sets of multicast addresses).

Work around / alternatives

We can query for the port id using the rte function to get it from the port name, which we are doing, but an public abstraction in capsule for the mc filter would be great if it makes sense.

Appreciate all that you do. Let me know if you need more information!