• Ido Schimmel's avatar
    mlxsw: spectrum: Add router interface struct · fa3054f5
    Ido Schimmel authored
    When enabling the router in the device we will represent L3 netdevs
    using router interfaces (RIFs). These will be specified whenever
    programming routes or neighbours on the netdev.
    
    Introduce the basic RIF infrastructure which allows one to lookup a RIF
    by its netdev. Later patches in the series will extend this, but the
    basic routines are needed now in order to direct traffic to CPU.
    
    Pointers to the RIF structs are stored in an array indexed by the RIF's
    number. This will allow us to efficiently update the kernel's neighbour
    table when regularly dumping the device's table.
    Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
    Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    fa3054f5
spectrum.h 12.5 KB