Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net/sched: cls_api: Expose tc block to the datapath

The datapath can now find the block of the port in which the packet arrived
at.

In the next patch we show a possible usage of this patch in a new
version of mirred that multicasts to all ports except for the port in
which the packet arrived on.

Co-developed-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Co-developed-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Victor Nogueira and committed by
David S. Miller
a7042cf8 913b47d3

+4 -1
+2
include/net/sch_generic.h
··· 484 484 struct mutex proto_destroy_lock; /* Lock for proto_destroy hashtable. */ 485 485 }; 486 486 487 + struct tcf_block *tcf_block_lookup(struct net *net, u32 block_index); 488 + 487 489 static inline bool lockdep_tcf_chain_is_locked(struct tcf_chain *chain) 488 490 { 489 491 return lockdep_is_held(&chain->filter_chain_lock);
+2 -1
net/sched/cls_api.c
··· 1011 1011 return block; 1012 1012 } 1013 1013 1014 - static struct tcf_block *tcf_block_lookup(struct net *net, u32 block_index) 1014 + struct tcf_block *tcf_block_lookup(struct net *net, u32 block_index) 1015 1015 { 1016 1016 struct tcf_net *tn = net_generic(net, tcf_net_id); 1017 1017 1018 1018 return idr_find(&tn->idr, block_index); 1019 1019 } 1020 + EXPORT_SYMBOL(tcf_block_lookup); 1020 1021 1021 1022 static struct tcf_block *tcf_block_refcnt_get(struct net *net, u32 block_index) 1022 1023 {