Commit a5148626 authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

net: sched: remove NET_CLS_IND config option

This config option makes only couple of lines optional.
Two small helpers and an int in couple of cls structs.

Remove the config option and always compile this in.
This saves the user from unexpected surprises when he adds
a filter with ingress device match which is silently ignored
in case the config option is not set.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9d9f3fba
...@@ -210,7 +210,6 @@ CONFIG_NET_ACT_NAT=m ...@@ -210,7 +210,6 @@ CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_SIMP=m CONFIG_NET_ACT_SIMP=m
CONFIG_NET_ACT_SKBEDIT=m CONFIG_NET_ACT_SKBEDIT=m
CONFIG_NET_CLS_IND=y
CONFIG_CFG80211=m CONFIG_CFG80211=m
CONFIG_MAC80211=m CONFIG_MAC80211=m
CONFIG_MAC80211_MESH=y CONFIG_MAC80211_MESH=y
......
...@@ -215,7 +215,6 @@ CONFIG_NET_ACT_NAT=m ...@@ -215,7 +215,6 @@ CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_SIMP=m CONFIG_NET_ACT_SIMP=m
CONFIG_NET_ACT_SKBEDIT=m CONFIG_NET_ACT_SKBEDIT=m
CONFIG_NET_CLS_IND=y
CONFIG_CFG80211=m CONFIG_CFG80211=m
CONFIG_MAC80211=m CONFIG_MAC80211=m
CONFIG_MAC80211_MESH=y CONFIG_MAC80211_MESH=y
......
...@@ -212,7 +212,6 @@ CONFIG_NET_ACT_NAT=m ...@@ -212,7 +212,6 @@ CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_SIMP=m CONFIG_NET_ACT_SIMP=m
CONFIG_NET_ACT_SKBEDIT=m CONFIG_NET_ACT_SKBEDIT=m
CONFIG_NET_CLS_IND=y
CONFIG_CFG80211=m CONFIG_CFG80211=m
CONFIG_MAC80211=m CONFIG_MAC80211=m
CONFIG_MAC80211_MESH=y CONFIG_MAC80211_MESH=y
......
...@@ -74,7 +74,6 @@ CONFIG_NET_CLS_RSVP=m ...@@ -74,7 +74,6 @@ CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_ACT=y CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y CONFIG_NET_ACT_POLICE=y
CONFIG_NET_CLS_IND=y
# CONFIG_WIRELESS is not set # CONFIG_WIRELESS is not set
CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
......
...@@ -76,7 +76,6 @@ CONFIG_NET_CLS_RSVP=m ...@@ -76,7 +76,6 @@ CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_ACT=y CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y CONFIG_NET_ACT_POLICE=y
CONFIG_NET_CLS_IND=y
# CONFIG_WIRELESS is not set # CONFIG_WIRELESS is not set
CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
......
...@@ -77,7 +77,6 @@ CONFIG_NET_CLS_RSVP=m ...@@ -77,7 +77,6 @@ CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_ACT=y CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y CONFIG_NET_ACT_POLICE=y
CONFIG_NET_CLS_IND=y
# CONFIG_WIRELESS is not set # CONFIG_WIRELESS is not set
CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
......
...@@ -78,7 +78,6 @@ CONFIG_NET_CLS_RSVP=m ...@@ -78,7 +78,6 @@ CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_ACT=y CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y CONFIG_NET_ACT_POLICE=y
CONFIG_NET_CLS_IND=y
# CONFIG_WIRELESS is not set # CONFIG_WIRELESS is not set
CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
......
...@@ -75,7 +75,6 @@ CONFIG_NET_CLS_RSVP=m ...@@ -75,7 +75,6 @@ CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m CONFIG_NET_CLS_RSVP6=m
CONFIG_NET_CLS_ACT=y CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=y CONFIG_NET_ACT_POLICE=y
CONFIG_NET_CLS_IND=y
# CONFIG_WIRELESS is not set # CONFIG_WIRELESS is not set
CONFIG_DEVTMPFS=y CONFIG_DEVTMPFS=y
CONFIG_BLK_DEV_LOOP=y CONFIG_BLK_DEV_LOOP=y
......
...@@ -212,7 +212,6 @@ CONFIG_NET_ACT_NAT=m ...@@ -212,7 +212,6 @@ CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_SIMP=m CONFIG_NET_ACT_SIMP=m
CONFIG_NET_ACT_SKBEDIT=m CONFIG_NET_ACT_SKBEDIT=m
CONFIG_NET_CLS_IND=y
CONFIG_CFG80211=m CONFIG_CFG80211=m
CONFIG_MAC80211=m CONFIG_MAC80211=m
CONFIG_MAC80211_MESH=y CONFIG_MAC80211_MESH=y
......
...@@ -103,7 +103,6 @@ CONFIG_GACT_PROB=y ...@@ -103,7 +103,6 @@ CONFIG_GACT_PROB=y
CONFIG_NET_ACT_MIRRED=m CONFIG_NET_ACT_MIRRED=m
CONFIG_NET_ACT_IPT=m CONFIG_NET_ACT_IPT=m
CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_CLS_IND=y
CONFIG_HAMRADIO=y CONFIG_HAMRADIO=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_MTD=y CONFIG_MTD=y
......
...@@ -301,7 +301,6 @@ CONFIG_NET_ACT_NAT=m ...@@ -301,7 +301,6 @@ CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_SIMP=m CONFIG_NET_ACT_SIMP=m
CONFIG_NET_ACT_SKBEDIT=m CONFIG_NET_ACT_SKBEDIT=m
CONFIG_NET_CLS_IND=y
CONFIG_IRDA=m CONFIG_IRDA=m
CONFIG_IRLAN=m CONFIG_IRLAN=m
CONFIG_IRNET=m CONFIG_IRNET=m
......
...@@ -63,7 +63,6 @@ CONFIG_NET_SCH_NETEM=y ...@@ -63,7 +63,6 @@ CONFIG_NET_SCH_NETEM=y
CONFIG_NET_CLS_TCINDEX=y CONFIG_NET_CLS_TCINDEX=y
CONFIG_NET_CLS_ROUTE4=y CONFIG_NET_CLS_ROUTE4=y
CONFIG_NET_CLS_FW=y CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_IND=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_MTD_BLOCK=y CONFIG_MTD_BLOCK=y
......
...@@ -62,7 +62,6 @@ CONFIG_NET_SCH_NETEM=y ...@@ -62,7 +62,6 @@ CONFIG_NET_SCH_NETEM=y
CONFIG_NET_CLS_TCINDEX=y CONFIG_NET_CLS_TCINDEX=y
CONFIG_NET_CLS_ROUTE4=y CONFIG_NET_CLS_ROUTE4=y
CONFIG_NET_CLS_FW=y CONFIG_NET_CLS_FW=y
CONFIG_NET_CLS_IND=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_MTD=y CONFIG_MTD=y
CONFIG_MTD_BLOCK=y CONFIG_MTD_BLOCK=y
......
...@@ -142,7 +142,6 @@ CONFIG_GACT_PROB=y ...@@ -142,7 +142,6 @@ CONFIG_GACT_PROB=y
CONFIG_NET_ACT_MIRRED=m CONFIG_NET_ACT_MIRRED=m
CONFIG_NET_ACT_IPT=m CONFIG_NET_ACT_IPT=m
CONFIG_NET_ACT_PEDIT=m CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_CLS_IND=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_FW_LOADER=m CONFIG_FW_LOADER=m
CONFIG_CONNECTOR=m CONFIG_CONNECTOR=m
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <net/sch_generic.h> #include <net/sch_generic.h>
#include <net/act_api.h> #include <net/act_api.h>
#include <net/flow_offload.h> #include <net/flow_offload.h>
#include <net/net_namespace.h>
/* TC action not accessible from user space */ /* TC action not accessible from user space */
#define TC_ACT_REINSERT (TC_ACT_VALUE_MAX + 1) #define TC_ACT_REINSERT (TC_ACT_VALUE_MAX + 1)
...@@ -576,9 +577,6 @@ static inline int tcf_valid_offset(const struct sk_buff *skb, ...@@ -576,9 +577,6 @@ static inline int tcf_valid_offset(const struct sk_buff *skb,
(ptr <= (ptr + len))); (ptr <= (ptr + len)));
} }
#ifdef CONFIG_NET_CLS_IND
#include <net/net_namespace.h>
static inline int static inline int
tcf_change_indev(struct net *net, struct nlattr *indev_tlv, tcf_change_indev(struct net *net, struct nlattr *indev_tlv,
struct netlink_ext_ack *extack) struct netlink_ext_ack *extack)
...@@ -605,7 +603,6 @@ tcf_match_indev(struct sk_buff *skb, int ifindex) ...@@ -605,7 +603,6 @@ tcf_match_indev(struct sk_buff *skb, int ifindex)
return false; return false;
return ifindex == skb->skb_iif; return ifindex == skb->skb_iif;
} }
#endif /* CONFIG_NET_CLS_IND */
int tc_setup_flow_action(struct flow_action *flow_action, int tc_setup_flow_action(struct flow_action *flow_action,
const struct tcf_exts *exts); const struct tcf_exts *exts);
......
...@@ -295,7 +295,7 @@ enum { ...@@ -295,7 +295,7 @@ enum {
TCA_FW_UNSPEC, TCA_FW_UNSPEC,
TCA_FW_CLASSID, TCA_FW_CLASSID,
TCA_FW_POLICE, TCA_FW_POLICE,
TCA_FW_INDEV, /* used by CONFIG_NET_CLS_IND */ TCA_FW_INDEV,
TCA_FW_ACT, /* used by CONFIG_NET_CLS_ACT */ TCA_FW_ACT, /* used by CONFIG_NET_CLS_ACT */
TCA_FW_MASK, TCA_FW_MASK,
__TCA_FW_MAX __TCA_FW_MAX
......
...@@ -941,14 +941,6 @@ config NET_IFE_SKBTCINDEX ...@@ -941,14 +941,6 @@ config NET_IFE_SKBTCINDEX
tristate "Support to encoding decoding skb tcindex on IFE action" tristate "Support to encoding decoding skb tcindex on IFE action"
depends on NET_ACT_IFE depends on NET_ACT_IFE
config NET_CLS_IND
bool "Incoming device classification"
depends on NET_CLS_U32 || NET_CLS_FW
---help---
Say Y here to extend the u32 and fw classifier to support
classification based on the incoming device. This option is
likely to disappear in favour of the metadata ematch.
endif # NET_SCHED endif # NET_SCHED
config NET_SCH_FIFO config NET_SCH_FIFO
......
...@@ -1010,7 +1010,7 @@ static int fl_set_key(struct net *net, struct nlattr **tb, ...@@ -1010,7 +1010,7 @@ static int fl_set_key(struct net *net, struct nlattr **tb,
{ {
__be16 ethertype; __be16 ethertype;
int ret = 0; int ret = 0;
#ifdef CONFIG_NET_CLS_IND
if (tb[TCA_FLOWER_INDEV]) { if (tb[TCA_FLOWER_INDEV]) {
int err = tcf_change_indev(net, tb[TCA_FLOWER_INDEV], extack); int err = tcf_change_indev(net, tb[TCA_FLOWER_INDEV], extack);
if (err < 0) if (err < 0)
...@@ -1018,7 +1018,6 @@ static int fl_set_key(struct net *net, struct nlattr **tb, ...@@ -1018,7 +1018,6 @@ static int fl_set_key(struct net *net, struct nlattr **tb,
key->indev_ifindex = err; key->indev_ifindex = err;
mask->indev_ifindex = 0xffffffff; mask->indev_ifindex = 0xffffffff;
} }
#endif
fl_set_key_val(tb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST, fl_set_key_val(tb, key->eth.dst, TCA_FLOWER_KEY_ETH_DST,
mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK, mask->eth.dst, TCA_FLOWER_KEY_ETH_DST_MASK,
......
...@@ -8,9 +8,6 @@ ...@@ -8,9 +8,6 @@
* Karlis Peisenieks <karlis@mt.lv> : 990415 : fw_walk off by one * Karlis Peisenieks <karlis@mt.lv> : 990415 : fw_walk off by one
* Karlis Peisenieks <karlis@mt.lv> : 990415 : fw_delete killed all the filter (and kernel). * Karlis Peisenieks <karlis@mt.lv> : 990415 : fw_delete killed all the filter (and kernel).
* Alex <alex@pilotsoft.com> : 2004xxyy: Added Action extension * Alex <alex@pilotsoft.com> : 2004xxyy: Added Action extension
*
* JHS: We should remove the CONFIG_NET_CLS_IND from here
* eventually when the meta match extension is made available
*/ */
#include <linux/module.h> #include <linux/module.h>
...@@ -37,9 +34,7 @@ struct fw_filter { ...@@ -37,9 +34,7 @@ struct fw_filter {
struct fw_filter __rcu *next; struct fw_filter __rcu *next;
u32 id; u32 id;
struct tcf_result res; struct tcf_result res;
#ifdef CONFIG_NET_CLS_IND
int ifindex; int ifindex;
#endif /* CONFIG_NET_CLS_IND */
struct tcf_exts exts; struct tcf_exts exts;
struct tcf_proto *tp; struct tcf_proto *tp;
struct rcu_work rwork; struct rcu_work rwork;
...@@ -67,10 +62,8 @@ static int fw_classify(struct sk_buff *skb, const struct tcf_proto *tp, ...@@ -67,10 +62,8 @@ static int fw_classify(struct sk_buff *skb, const struct tcf_proto *tp,
f = rcu_dereference_bh(f->next)) { f = rcu_dereference_bh(f->next)) {
if (f->id == id) { if (f->id == id) {
*res = f->res; *res = f->res;
#ifdef CONFIG_NET_CLS_IND
if (!tcf_match_indev(skb, f->ifindex)) if (!tcf_match_indev(skb, f->ifindex))
continue; continue;
#endif /* CONFIG_NET_CLS_IND */
r = tcf_exts_exec(skb, &f->exts, res); r = tcf_exts_exec(skb, &f->exts, res);
if (r < 0) if (r < 0)
continue; continue;
...@@ -222,7 +215,6 @@ static int fw_set_parms(struct net *net, struct tcf_proto *tp, ...@@ -222,7 +215,6 @@ static int fw_set_parms(struct net *net, struct tcf_proto *tp,
tcf_bind_filter(tp, &f->res, base); tcf_bind_filter(tp, &f->res, base);
} }
#ifdef CONFIG_NET_CLS_IND
if (tb[TCA_FW_INDEV]) { if (tb[TCA_FW_INDEV]) {
int ret; int ret;
ret = tcf_change_indev(net, tb[TCA_FW_INDEV], extack); ret = tcf_change_indev(net, tb[TCA_FW_INDEV], extack);
...@@ -230,7 +222,6 @@ static int fw_set_parms(struct net *net, struct tcf_proto *tp, ...@@ -230,7 +222,6 @@ static int fw_set_parms(struct net *net, struct tcf_proto *tp,
return ret; return ret;
f->ifindex = ret; f->ifindex = ret;
} }
#endif /* CONFIG_NET_CLS_IND */
err = -EINVAL; err = -EINVAL;
if (tb[TCA_FW_MASK]) { if (tb[TCA_FW_MASK]) {
...@@ -276,9 +267,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb, ...@@ -276,9 +267,7 @@ static int fw_change(struct net *net, struct sk_buff *in_skb,
fnew->id = f->id; fnew->id = f->id;
fnew->res = f->res; fnew->res = f->res;
#ifdef CONFIG_NET_CLS_IND
fnew->ifindex = f->ifindex; fnew->ifindex = f->ifindex;
#endif /* CONFIG_NET_CLS_IND */
fnew->tp = f->tp; fnew->tp = f->tp;
err = tcf_exts_init(&fnew->exts, net, TCA_FW_ACT, err = tcf_exts_init(&fnew->exts, net, TCA_FW_ACT,
...@@ -405,14 +394,12 @@ static int fw_dump(struct net *net, struct tcf_proto *tp, void *fh, ...@@ -405,14 +394,12 @@ static int fw_dump(struct net *net, struct tcf_proto *tp, void *fh,
if (f->res.classid && if (f->res.classid &&
nla_put_u32(skb, TCA_FW_CLASSID, f->res.classid)) nla_put_u32(skb, TCA_FW_CLASSID, f->res.classid))
goto nla_put_failure; goto nla_put_failure;
#ifdef CONFIG_NET_CLS_IND
if (f->ifindex) { if (f->ifindex) {
struct net_device *dev; struct net_device *dev;
dev = __dev_get_by_index(net, f->ifindex); dev = __dev_get_by_index(net, f->ifindex);
if (dev && nla_put_string(skb, TCA_FW_INDEV, dev->name)) if (dev && nla_put_string(skb, TCA_FW_INDEV, dev->name))
goto nla_put_failure; goto nla_put_failure;
} }
#endif /* CONFIG_NET_CLS_IND */
if (head->mask != 0xFFFFFFFF && if (head->mask != 0xFFFFFFFF &&
nla_put_u32(skb, TCA_FW_MASK, head->mask)) nla_put_u32(skb, TCA_FW_MASK, head->mask))
goto nla_put_failure; goto nla_put_failure;
......
...@@ -20,9 +20,6 @@ ...@@ -20,9 +20,6 @@
* pure RSVP doesn't need such a general approach and can use * pure RSVP doesn't need such a general approach and can use
* much simpler (and faster) schemes, sort of cls_rsvp.c. * much simpler (and faster) schemes, sort of cls_rsvp.c.
* *
* JHS: We should remove the CONFIG_NET_CLS_IND from here
* eventually when the meta match extension is made available
*
* nfmark match added by Catalin(ux aka Dino) BOIE <catab at umbrella.ro> * nfmark match added by Catalin(ux aka Dino) BOIE <catab at umbrella.ro>
*/ */
...@@ -48,9 +45,7 @@ struct tc_u_knode { ...@@ -48,9 +45,7 @@ struct tc_u_knode {
u32 handle; u32 handle;
struct tc_u_hnode __rcu *ht_up; struct tc_u_hnode __rcu *ht_up;
struct tcf_exts exts; struct tcf_exts exts;
#ifdef CONFIG_NET_CLS_IND
int ifindex; int ifindex;
#endif
u8 fshift; u8 fshift;
struct tcf_result res; struct tcf_result res;
struct tc_u_hnode __rcu *ht_down; struct tc_u_hnode __rcu *ht_down;
...@@ -176,12 +171,10 @@ static int u32_classify(struct sk_buff *skb, const struct tcf_proto *tp, ...@@ -176,12 +171,10 @@ static int u32_classify(struct sk_buff *skb, const struct tcf_proto *tp,
if (n->sel.flags & TC_U32_TERMINAL) { if (n->sel.flags & TC_U32_TERMINAL) {
*res = n->res; *res = n->res;
#ifdef CONFIG_NET_CLS_IND
if (!tcf_match_indev(skb, n->ifindex)) { if (!tcf_match_indev(skb, n->ifindex)) {
n = rcu_dereference_bh(n->next); n = rcu_dereference_bh(n->next);
goto next_knode; goto next_knode;
} }
#endif
#ifdef CONFIG_CLS_U32_PERF #ifdef CONFIG_CLS_U32_PERF
__this_cpu_inc(n->pf->rhit); __this_cpu_inc(n->pf->rhit);
#endif #endif
...@@ -761,7 +754,6 @@ static int u32_set_parms(struct net *net, struct tcf_proto *tp, ...@@ -761,7 +754,6 @@ static int u32_set_parms(struct net *net, struct tcf_proto *tp,
tcf_bind_filter(tp, &n->res, base); tcf_bind_filter(tp, &n->res, base);
} }
#ifdef CONFIG_NET_CLS_IND
if (tb[TCA_U32_INDEV]) { if (tb[TCA_U32_INDEV]) {
int ret; int ret;
ret = tcf_change_indev(net, tb[TCA_U32_INDEV], extack); ret = tcf_change_indev(net, tb[TCA_U32_INDEV], extack);
...@@ -769,7 +761,6 @@ static int u32_set_parms(struct net *net, struct tcf_proto *tp, ...@@ -769,7 +761,6 @@ static int u32_set_parms(struct net *net, struct tcf_proto *tp,
return -EINVAL; return -EINVAL;
n->ifindex = ret; n->ifindex = ret;
} }
#endif
return 0; return 0;
} }
...@@ -817,9 +808,7 @@ static struct tc_u_knode *u32_init_knode(struct net *net, struct tcf_proto *tp, ...@@ -817,9 +808,7 @@ static struct tc_u_knode *u32_init_knode(struct net *net, struct tcf_proto *tp,
new->handle = n->handle; new->handle = n->handle;
RCU_INIT_POINTER(new->ht_up, n->ht_up); RCU_INIT_POINTER(new->ht_up, n->ht_up);
#ifdef CONFIG_NET_CLS_IND
new->ifindex = n->ifindex; new->ifindex = n->ifindex;
#endif
new->fshift = n->fshift; new->fshift = n->fshift;
new->res = n->res; new->res = n->res;
new->flags = n->flags; new->flags = n->flags;
...@@ -1351,14 +1340,12 @@ static int u32_dump(struct net *net, struct tcf_proto *tp, void *fh, ...@@ -1351,14 +1340,12 @@ static int u32_dump(struct net *net, struct tcf_proto *tp, void *fh,
if (tcf_exts_dump(skb, &n->exts) < 0) if (tcf_exts_dump(skb, &n->exts) < 0)
goto nla_put_failure; goto nla_put_failure;
#ifdef CONFIG_NET_CLS_IND
if (n->ifindex) { if (n->ifindex) {
struct net_device *dev; struct net_device *dev;
dev = __dev_get_by_index(net, n->ifindex); dev = __dev_get_by_index(net, n->ifindex);
if (dev && nla_put_string(skb, TCA_U32_INDEV, dev->name)) if (dev && nla_put_string(skb, TCA_U32_INDEV, dev->name))
goto nla_put_failure; goto nla_put_failure;
} }
#endif
#ifdef CONFIG_CLS_U32_PERF #ifdef CONFIG_CLS_U32_PERF
gpf = kzalloc(sizeof(struct tc_u32_pcnt) + gpf = kzalloc(sizeof(struct tc_u32_pcnt) +
n->sel.nkeys * sizeof(u64), n->sel.nkeys * sizeof(u64),
...@@ -1422,9 +1409,7 @@ static int __init init_u32(void) ...@@ -1422,9 +1409,7 @@ static int __init init_u32(void)
#ifdef CONFIG_CLS_U32_PERF #ifdef CONFIG_CLS_U32_PERF
pr_info(" Performance counters on\n"); pr_info(" Performance counters on\n");
#endif #endif
#ifdef CONFIG_NET_CLS_IND
pr_info(" input device check on\n"); pr_info(" input device check on\n");
#endif
#ifdef CONFIG_NET_CLS_ACT #ifdef CONFIG_NET_CLS_ACT
pr_info(" Actions configured\n"); pr_info(" Actions configured\n");
#endif #endif
......
...@@ -257,7 +257,7 @@ enum { ...@@ -257,7 +257,7 @@ enum {
TCA_FW_UNSPEC, TCA_FW_UNSPEC,
TCA_FW_CLASSID, TCA_FW_CLASSID,
TCA_FW_POLICE, TCA_FW_POLICE,
TCA_FW_INDEV, /* used by CONFIG_NET_CLS_IND */ TCA_FW_INDEV,
TCA_FW_ACT, /* used by CONFIG_NET_CLS_ACT */ TCA_FW_ACT, /* used by CONFIG_NET_CLS_ACT */
TCA_FW_MASK, TCA_FW_MASK,
__TCA_FW_MAX __TCA_FW_MAX
......
...@@ -45,5 +45,4 @@ CONFIG_NET_ACT_TUNNEL_KEY=m ...@@ -45,5 +45,4 @@ CONFIG_NET_ACT_TUNNEL_KEY=m
CONFIG_NET_IFE_SKBMARK=m CONFIG_NET_IFE_SKBMARK=m
CONFIG_NET_IFE_SKBPRIO=m CONFIG_NET_IFE_SKBPRIO=m
CONFIG_NET_IFE_SKBTCINDEX=m CONFIG_NET_IFE_SKBTCINDEX=m
CONFIG_NET_CLS_IND=y
CONFIG_NET_SCH_FIFO=y CONFIG_NET_SCH_FIFO=y
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment