# Re: \[PATCH v4 net-next 2/8\] net: mscc: ocelot: add MAC table write and lookup operations

- From: Florian Fainelli \<f.fainelli@gmail.com\>
- Date: 2021-09-23 01:58:46 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/09/1518960
- Thread: https://ratatoskr.run/netdev/2021/09/1518123/t.md

```text


On 9/22/2021 3:51 AM, Xiaoliang Yang wrote:
> From: Vladimir Oltean <vladimir.oltean@nxp.com>
>
> ocelot_mact_write() can be used for directly modifying an FDB entry
> situated at a given row and column, as opposed to the current
> ocelot_mact_learn() which calculates the row and column indices
> automatically (based on a 11-bit hash derived from the {DMAC, VID} key).
>
> ocelot_mact_lookup() can be used to retrieve the row and column at which
> an FDB entry with the given {DMAC, VID} key is found.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> Signed-off-by: Xiaoliang Yang <redacted>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian
```
