/*
 * Copyright (c) 2014 Jiri Pirko <jiri@resnulli.us>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef __NET_TC_VLAN_H
#define __NET_TC_VLAN_H

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

#define VLAN_F_POP		0x1
#define VLAN_F_PUSH		0x2

struct tcf_vlan {
	struct tc_action	common;
	int			tcfv_action;
	u16			tcfv_push_vid;
	__be16			tcfv_push_proto;
	u8			tcfv_push_prio;
};
#define to_vlan(a) ((struct tcf_vlan *)a)

static inline bool is_tcf_vlan(const struct tc_action *a)
{
#ifdef CONFIG_NET_CLS_ACT
	if (a->ops && a->ops->type == TCA_ACT_VLAN)
		return true;
#endif
	return false;
}

static inline u32 tcf_vlan_action(const struct tc_action *a)
{
	return to_vlan(a)->tcfv_action;
}

static inline u16 tcf_vlan_push_vid(const struct tc_action *a)
{
	return to_vlan(a)->tcfv_push_vid;
}

static inline __be16 tcf_vlan_push_proto(const struct tc_action *a)
{
	return to_vlan(a)->tcfv_push_proto;
}

#endif /* __NET_TC_VLAN_H */
'nds-private-remove'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/tools/perf/pmu-events/arch/powerpc/mapfile.csv'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/tools/perf/pmu-events/arch/powerpc/mapfile.csv?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/tools/perf/pmu-events/arch/powerpc/mapfile.csv?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/tools/perf/pmu-events/arch/powerpc/mapfile.csv?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/tools/perf/pmu-events/arch/powerpc/mapfile.csv'>
<input type='hidden' name='id' value='0dec879f636f11b0ffda1cb5fd96a1754c59ead3'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>tools</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>perf</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/pmu-events?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>pmu-events</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/pmu-events/arch?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>arch</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/pmu-events/arch/powerpc?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>powerpc</a>/<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/pmu-events/arch/powerpc/mapfile.csv?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3'>mapfile.csv</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/tools/perf/pmu-events/arch/powerpc/mapfile.csv?id=0dec879f636f11b0ffda1cb5fd96a1754c59ead3&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>