Contributors: 13
Author Tokens Token Proportion Commits Commit Proportion
Sridhar Samudrala 175 67.31% 1 5.56%
Jamal Hadi Salim 22 8.46% 1 5.56%
David S. Miller 11 4.23% 1 5.56%
Américo Wang 11 4.23% 4 22.22%
John Hurley 10 3.85% 1 5.56%
Eli Cohen 8 3.08% 1 5.56%
Yotam Gigi 6 2.31% 1 5.56%
Eric Dumazet 4 1.54% 2 11.11%
Stephen Hemminger 4 1.54% 1 5.56%
Shmulik Ladkani 4 1.54% 2 11.11%
Victor Nogueira 3 1.15% 1 5.56%
Greg Kroah-Hartman 1 0.38% 1 5.56%
Thomas Graf 1 0.38% 1 5.56%
Total 260 18

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __NET_TC_MIR_H
#define __NET_TC_MIR_H

#include <net/act_api.h>
#include <linux/tc_act/tc_mirred.h>

struct tcf_mirred {
	struct tc_action	common;
	int			tcfm_eaction;
	u32                     tcfm_blockid;
	bool			tcfm_mac_header_xmit;
	struct net_device __rcu	*tcfm_dev;
	netdevice_tracker	tcfm_dev_tracker;
	struct list_head	tcfm_list;
};
#define to_mirred(a) ((struct tcf_mirred *)a)

static inline bool is_tcf_mirred_egress_redirect(const struct tc_action *a)
{
#ifdef CONFIG_NET_CLS_ACT
	if (a->ops && a->ops->id == TCA_ID_MIRRED)
		return to_mirred(a)->tcfm_eaction == TCA_EGRESS_REDIR;
#endif
	return false;
}

static inline bool is_tcf_mirred_egress_mirror(const struct tc_action *a)
{
#ifdef CONFIG_NET_CLS_ACT
	if (a->ops && a->ops->id == TCA_ID_MIRRED)
		return to_mirred(a)->tcfm_eaction == TCA_EGRESS_MIRROR;
#endif
	return false;
}

static inline bool is_tcf_mirred_ingress_redirect(const struct tc_action *a)
{
#ifdef CONFIG_NET_CLS_ACT
	if (a->ops && a->ops->id == TCA_ID_MIRRED)
		return to_mirred(a)->tcfm_eaction == TCA_INGRESS_REDIR;
#endif
	return false;
}

static inline bool is_tcf_mirred_ingress_mirror(const struct tc_action *a)
{
#ifdef CONFIG_NET_CLS_ACT
	if (a->ops && a->ops->id == TCA_ID_MIRRED)
		return to_mirred(a)->tcfm_eaction == TCA_INGRESS_MIRROR;
#endif
	return false;
}

static inline struct net_device *tcf_mirred_dev(const struct tc_action *a)
{
	return rtnl_dereference(to_mirred(a)->tcfm_dev);
}

#endif /* __NET_TC_MIR_H */