]> asedeno.scripts.mit.edu Git - linux.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)
commit10fea26ce2aaf46c4da834664fb5f8476108a783
tree0b36a395879ae8d746546857976a2850a40ed681
parentce2a27c761acaba032f61f8322ff9447fd084671
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