]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvpp2: Add support for unicast filtering
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Wed, 7 Mar 2018 14:18:04 +0000 (15:18 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Mar 2018 20:53:39 +0000 (15:53 -0500)
commit19bc546a13bb98c3a731952d4fc2ed1644dc0c9c
tree0b36a395879ae8d746546857976a2850a40ed681
parentf9e3f10531b14814fbe7dbde70d65a1de6f8b171
net: mvpp2: Add support for unicast filtering

Marvell PPv2 controller can be used to implement packet filtering based
on the destination MAC address. This is already used to implement
multicast filtering. This patch adds support for Unicast filtering.

Filtering is based on so-called "TCAM entries" to implement filtering.
Due to their limited number and the fact that these are also used for
other purposes, we reserve 80 entries for both unicast and multicast
filters. On top of the broadcast address, and each interface's own MAC
address, we reserve 25 entries per port, 4 for unicast filters, 21 for
multicast.

Whenever unicast or multicast range for one port is full, the filtering
is disabled and port goes into promiscuous mode for the given type of
addresses.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvpp2.c