[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #49125] Need a way to iterate multicast groups for MAC
From: |
Daniel Elstner |
Subject: |
[lwip-devel] [bug #49125] Need a way to iterate multicast groups for MAC filtering |
Date: |
Mon, 19 Sep 2016 02:42:17 +0000 (UTC) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/52.0.2743.116 Chrome/52.0.2743.116 Safari/537.36 |
URL:
<http://savannah.nongnu.org/bugs/?49125>
Summary: Need a way to iterate multicast groups for MAC
filtering
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: danielk
Submitted on: Mon 19 Sep 2016 04:42:14 AM CEST
Category: None
Severity: 3 - Normal
Item Group: Feature Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: git head
_______________________________________________________
Details:
In my Ethernet interface code, I am implementing the MLD MAC filter callback
in order to reconfigure the hardware address matching of the MAC controller.
Although I got it working in principle, the implementation is unnecessarily
complicated because the API does not provide a way to iterate over all
multicast groups of a netif. My hardware supports multicast address filtering
by means of matching a hash, and the hash is a function of *all* multicast
addresses I want to match. This means that using the current API, I need to
keep track of added/removed IPv6 multicast addresses, essentially duplicating
information that the MLD implementation already keeps track of. This wastes
memory and complicates the code.
Actually even with table-based address matching hardware, it would be
necessary to keep track of added groups just to know which table indices they
occupy. So this is not limited to hashing.
Simply making the "mld_group_list" variable public would already be enough to
fix this, since it is easy enough to skip over other netifs while iterating.
If that's considered too internal to expose, the MLD code could perhaps be
changed to store the groups directly in the netif struct.
The same considerations would also apply to IGMP. Interestingly, there is this
comment in the IGMP code:
* igmp group structure - there is
* a list of groups for each interface
* these should really be linked from the interface, but
* if we keep them separate we will not affect the lwip original code
* too much
I'd say linking the groups from the interface would make life a lot easier for
anyone implementing the MAC filter callbacks.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?49125>
_______________________________________________
Message sent via/by Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #49125] Need a way to iterate multicast groups for MAC filtering,
Daniel Elstner <=