[LiSA-Devel] Clear mac address from interface

Andreea-Cristina Hodea andreea.cristina.hodea at gmail.com
Tue May 28 14:40:02 EEST 2013


Hi Ionut,

On Tue, May 21, 2013 at 4:17 PM, Ionut Nicu <ionut.nicu at mindbit.ro> wrote:
> Hi Andreea,
>
> On Tue, 2013-05-21 at 15:53 +0300, Andreea-Cristina Hodea wrote:
>> Hi,
>>
>> The SWCFG_CLEARMACINT command is called only from swctl and not from
>> swcli. Taking a look at lisa kernel module, CLEARMACINT implementation
>> is duplicated in DELMACDYN, the latter being more complex. Does it
>> make sense to get rid of CLEARMACINT?
>>
>
> Thank you for spotting this. Yes, it makes perfect sense to remove the
> CLEARMACINT ioctl because its functionality can be achieved by using the
> DELMACDYN ioctl.
>

Sorry, I made a confusion regarding CLEARMACINT. Reading the
description from include/linux/net_switch.h I understand that
CLEARMACINT should cleanup SW_FDB_MAC_ANY and not SW_FDB_MAC_DYNAMIC
as it does now in net/switch/sw_ioctl.c.

If the observation above is correct, there are more ways to solve it.
A possible solution would be to adapt fdb_cleanup_port implementation
so that it removes all entries if entry_type is SW_FDB_MAC_ANY and
call fdb_cleanup_port(, SW_FDB_MAC_ANY) in CLEARMACINT implementation.


To sum up, DELMACDYN removes dynamic macs of a port/vlan whereas
CLEARMACINT is supposed to remove all macs for a port, so it would
somehow make sense to keep both of them. Is this correct?

Thanks,
Andreea


More information about the LiSA-Devel mailing list