Support offloading of TC rules that mirror/redirect egress traffic to a
MACVLAN device, which is attached to mlx5 representor net device.
Signed-off-by: Dima Chumak <dchumak@nvidia.com>
Reviewed-by: Vlad Buslov <vladbu@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
 #include <linux/rhashtable.h>
 #include <linux/refcount.h>
 #include <linux/completion.h>
+#include <linux/if_macvlan.h>
 #include <net/tc_act/tc_pedit.h>
 #include <net/tc_act/tc_csum.h>
 #include <net/psample.h>
                                                return err;
                                }
 
+                               if (netif_is_macvlan(out_dev))
+                                       out_dev = macvlan_dev_real_dev(out_dev);
+
                                err = verify_uplink_forwarding(priv, flow, out_dev, extack);
                                if (err)
                                        return err;