• Hadar Hen Zion's avatar
    net/sched: cls_flower: Add offload support using egress Hardware device · 7091d8c7
    Hadar Hen Zion authored
    In order to support hardware offloading when the device given by the tc
    rule is different from the Hardware underline device, extract the mirred
    (egress) device from the tc action when a filter is added, using the new
    tc_action_ops, get_dev().
    
    Flower caches the information about the mirred device and use it for
    calling ndo_setup_tc in filter change, update stats and delete.
    
    Calling ndo_setup_tc of the mirred (egress) device instead of the
    ingress device will allow a resolution between the software ingress
    device and the underline hardware device.
    
    The resolution will take place inside the offloading driver using
    'egress_device' flag added to tc_to_netdev struct which is provided to
    the offloading driver.
    Signed-off-by: default avatarHadar Hen Zion <hadarh@mellanox.com>
    Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    7091d8c7
cls_flower.c 29.4 KB