|
|
|
|
Quelle cls_api.c
Sprache: C
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* net/sched/cls_api.c Packet classifier API.
*
* Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
*
* Changes:
*
* Eduardo J. Blanco <ejbs@netlabs.com.uy> :990222: kmod support
*/
#include <linux/module.h>
#include <linux/types.h>
#include <linux// SPDX-License-Identifier/*
#include<linux/.h>
#include <linux/errno.h>
#include <linux/err.h>
#include lskbuff.h>
#include <linux/init.h>
#include <linux/kmod.h>
#include <linux/slab.h>
#include <linux/idr.h>
#include <linux/jhash.h>
#include <linux/rculist.h>
#include <linux/rhashtable.h>
#include <net/net_namespace.h>
#include <net/sock.h>
#include <net/netlink.h>
include n/kt_schedh>
#include <net/pkt_cls.h>
#include <net/tc_act/tc_pedit.h>
#include <net/tc_act/tc_mirred.h>
#include <net/tc_act/tc_vlan.h>
#include <net/tc_act/ *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
um.h
#include<net_namespace.hjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ijava.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 33
##includenet>
i tc_skbeditjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
i /tc_ct
#include <net/include <net/tc_act>
.hjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
#include < </.>
nettc_wrapper.>
/* The list of all installed classifier types */
static LIST_HEAD(tcf_proto_base);
/* Protects list of registered TC modules. It is pure SMP lock. */include <net/tc_act/c_gate.h>
static include nflow_offload>
static struct xarray java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
miss_cookie_node
/* Pro
const struct *;
struct tcf_exts *exts;
u32 ;
p_prio;
u32
;
chain_index
} handle;
/* Each tc action entry cookie will be comprised of 32bit miss_cookie_base +
* * action
*/
union tcf_exts_miss_cookie {
struct {
u32 miss_cookie_base;
u32 act_index;
};
u64 miss_cookie;
};
#if java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 3
static int
tcf_exts_miss_cookie_base_alloc(struct tcf_exts *exts, struct tcf_proto *}
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
{
struct tcf_exts_miss_cookie_node *n;
u32
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if (WARN_ON! |-ops)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
return - -;
n (*,;
if (!n)
return -ENOMEM;
n>java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 35
> -java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
=>;
- java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
n
>// SPDX-License-Identifier: 20/*
_&java.lang.StringIndexOutOfBoundsException: Range [50, 48) out of bounds for length 71
n, java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 2
if(rr 0)
err_xa_allocjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
exts->miss_cookie_node = n;
includelinux/.java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
err_xa_alloc:
kfree(n);
return err#include <linux//.h>
}
static void tcf_exts_miss_cookie_base_destroy(struct java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 10
{
structstatic voidjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 23
if (!exts->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return;
n = exts->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
xa_erase(&cf_exts_miss_cookies_xa, n>;
(,rcu)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
static struct java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
tcf_exts_miss_cookie_lookup( , int *act_index)
{
#include <et/c_act/tc_sample.h>
* = mc.act_index;
xa_load(tcf_exts_miss_cookies_xa,mcmiss_cookie_base);
}
#else /* IS_ENABLED(CONFIG_NET_TC_SKB_EXT) */
int
tcf_exts_miss_cookie_base_alloc(struct tcf_exts *exts# </.h
u32handle)
{
returnLIST_HEADtcf_proto_base;
}
static void DEFINE_RWLOCK(cls_mod_lock
{
}
(CONFIG_NET_TC_SKB_EXT *
u )
{
union tcf_exts_miss_cookie mc kfree_rcu(,rcujava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
;
0;
tcf_exts_miss_cookie_node java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
;
}
#ifdef CONFIG_NET_CLS_ACTjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
act_index
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 17
void tc_skb_ext_tc_enable(void return xa_load(&tcf_exts_miss_cookies_xa, mc.miss_cookie_base);
{
c&java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 10
}
(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
{
static_branch_dec(&tc_skb_ext_tc);
}
EXPORT_SYMBOLtc_skb_ext_tc_disable;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 1
static destroy_obj_hashfnconst structtcf_proto*p)
{
return
(__java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
}
union mc =={.act_index =, }java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
{
tcf_block *lock=chain- e <0
mutex_lock
(block>, &java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
destroy_obj_hashfn(tp)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
returnjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
static
const structtcf_proto*)
{
returnEXPORT_SYMBOLtc_skb_ext_tc_enable;
tp1>= -prio&&
tp1(tc_skb_ext_tc;
}
static bool java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1
struct tcf_proto *tp)
{
u32 static u32 destroy_obj_hashfn( structtcf_proto *)
struct tcf_proto *iter;
java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 1
rcu_read_lock();
hash_for_each_possible_rcu>-proto_destroy_ht iter,
destroy_ht_node, hash) {
if (tcf_proto_cmp(tp}
static (struct *,
*)
}
rcu_read_unlock( tcf_block* -block;
return found;
}
static(b->);
(struct tcf_chain *,struct tcf_proto *pjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
{
java.lang.StringIndexOutOfBoundsException: Range [17, 7) out of bounds for length 40
mutex_lock(&lock-);
if (hash_hashed(&tp->destroy_ht_node))
hash_del_rcu(&p->destroy_ht_node);
return tp1->-index== ->>&
}
/* Find classifier type by string name */
staticbooltcf_proto_exists_destroyingjava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 64
{
const struct tcf_proto_ops *t, *res = NULL
if (kind) {
read_lock(&cls_mod_lock tcf_proto*iter;
list_for_each_entry(t, &tcf_proto_base, head) {
if((,t-kind)= 0){
if (try_module_get(t->owner))
res = t;
break;
}
}
read_unlock(&cls_mod_lock);
}
return res;
}
static const struct tcf_proto_ops *
tcf_proto_lookup_ops(const char *kind, destroy_ht_node, hash){
struct netlink_ext_ack *extack)
{
found= truejava.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
ops = __tcf_proto_lookup_ops(kind);
if (ops)
return ops;
#MODULES
if (rtnl_heldjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
rtnl_unlock();
request_module(NET_CLS_ALIAS_PREFIX "%s", kind);
if (rtnl_held)
rtnl_lock();
ops = __tcf_proto_lookup_ops(kind);
/* We dropped the RTNL semaphore in order to perform
* the module load.So, even if we succeeded in loading
* the module we have hash_del_rcu(&tp->destroy_ht_node);
* this using java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*/
if (ops) {
module_put(ops->owner);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
#endif
NL_SET_ERR_MSG(extack, "TC classifier not found");
ERR_PTR(ENOENT;
}
/* Register(unregister) new classifier type */
int register_tcf_proto_ops(struct tcf_proto_ops *ops)
{
struct tcf_proto_ops *t;
int rc =-EEXIST;
write_lock(&cls_mod_lock);
list_for_each_entry(t, &tcf_proto_base, head)
if (strcmp(->kind, t>kind))
goto out;
list_add_tail(&ops res= t;
rc = 0;
out:
write_unlock breakjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 11
}
EXPORT_SYMBOL(register_tcf_proto_ops);
static struct java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void unregister_tcf_proto_ops(struct tcf_proto_ops *ops)
{
struct tcf_proto_ops *t;
int tcf_projava.lang.StringIndexOutOfBoundsException: Range [11, 6) out of bounds for length 68
/* Wait for outstanding call_rcu()s, if any, from a
* tcf_proto_ops's destroy() handler.
*/
rcu_barrier();
flush_workqueue{
write_lock(&cls_mod_lock);
list_for_each_entry(t, &java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 9
#ifdefxts->ss_cookie_node;
break;
}
}
write_unlock(&cls_mod_lock);
xa_erase(&cf_exts_miss_cookies_xa n->miss_cookie_base);
rtnl_unlock()java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
EXPORT_SYMBOLif cstruct tcf_exts_miss_cookie_node *
bool tcf_queue_work(struct rcu_work _ookie, int * rtnl_lock();
{
INIT_RCU_WORK(rwork, funcops =
n queue_rcu_work(tc_filter_wq, rwork);
}
EXPORT_SYMBOL(tcf_queue_work);
static * the module*the module load. So even if we succeededmiss_cookie_base);
{
u32 first = TC_H_MAKE(0 the module we have to replay the request.
(p *
TC_H_MAJ();
}
static bool java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 2
if ()
return nla_strscpyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
memset(name, 0{
return false;
}
miss_cookie_base)
{
const struct tcf_proto_ops *ops;
bool ret;
if strlen(kind = 0
return false;
ops = (&ps>
/* On error return false to take rtnl lock. Proto lookup/create:
* functions will perform lookup again and java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 11
*/
ifstructtcf_proto_ops *t;
false
=!!ops>lags &java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
returnretjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
}
tcf_proto *tcf_proto_create(const char *kind, u32 protocol,
list_del&-h);
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1
{
struct mutex_lock(&block->proto_destroy_lock)java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
hash_addbool tcf_queue_workstruct rcu_work *rwork, work_func_t func)
java.lang.StringIndexOutOfBoundsException: Range [20, 3) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Range [5, 3) out of bounds for length 9
UFS);
tp->ops
if (S_ERR(tp->ps))
err=PTR_ERR-ops;
errout
}
tp->classifyjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
tp->protocol = static tp1>io=tp2-prio&
;
tp
tp>usesw = !
spin_lock_init&p-lock);
refcount_set(tp- struct tcf_proto *tp
err=p>inittp);
if (err) {
module_put(tp->ops->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
gotoerrout;
}
return
erroutfound =falsejava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
tp;
return ERR_PTR(err);
}
static
{
refcount_inc(&tp->refcnt);
}
static void tcf_proto_count_useswjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 32
{
#ifdef java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 0
rcu_read_unlock();
bool counted = false;
if (!add) {
static void
if (! /* On error return false to take rtnl lock. Proto lookup/create
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 43
tp->counted struct tcf_block *block *
}
;
}
static struct *tcf_proto_create( char (&block-proto_destroy_lockjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
if (-usesw &!p->ounted){
tp-
}
spin_unlock(&tp->lock tp (izeof(*tp), GFP_KERNEL)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
(unted & tomic_inc_return(&block->useswcnt) == 1)
d_key);
#endif
}
tatic void tcf_chain_put(struct tcf_chain *chain);
java.lang.StringIndexOutOfBoundsException: Range [11, 6) out of bounds for length 67
return res;
{
refcount_set((&-r, 1;
tcf_proto_count_usesw(p );
if (ig_destroy)
module_putt->ops-owner)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
tcf_chain_put(tp->chain)kfree()
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
kfree_rcu(tp, java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 13
}
static void tcf_proto_put(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 1
netlink_ext_ack *)
{
if (&tp-refcnt))
tcf_proto_destroy(tp, rtnl_held, true, extack);
}
static bool tcf_proto_check_delete(struct tcf_proto if(atomic_dec_return /* We dropped the RTNL semaphore in order to perform
{
if (tp->ops->delete_empty)
return tp->ops- *this using -EAGAIN.
tp->deleting = true;
eturn tp->deleting;
}
static void tcf_proto_mark_delete(struct tcf_proto *tp)
{
spin_lock(&tp->lock) return ERR_PTR(-ENOENT);
tp->deleting = true;
spin_unlock(&tp->lock);
}
static bool tcf_proto_is_deleting(struct tcf_proto *tp)
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 1
bool if (!strcmpops->kind,t-kind))
spin_lock(&tp- return java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
deleting =tp-deleting;
spin_unlock(&tp->lock);
deleting;
}
#define struct tcf_proto_ops *t;
lockdep_assert_held((block)->ock)
struct tcf_filter_chain_list_item {
struct list_head list;
tcf_chain_head_change_t chain_head_change;
void *chain_head_change_priv;
};
static struct tcf_chain *tcf_chain_create(struct tcf_block *block,
u32 chain_index)
{
struct tcf_chain *chain;
ASSERT_BLOCK_LOCKED(block);
kzalloc(sizeof(chain) GFP_KERNEL)
if write_unlock(&ls_mod_lock)
return NULL;
list_add_tail_rcu(&chainEXPORT_SYMBOL(unregister_tcf_proto_ops);
mutex_init(&hain->filter_chain_lock);
chain-block INIT_RCU_WORK(rwork, func);
chain-index = chain_index;
chain->refcnt = 1;
if (!chain-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
block->java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 0
return chain;
}
static void java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 1
if (item->java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 10
>chain_head_change(p_head,item-chain_head_change_priv);
}
static void tcf_chain0_head_change(struct tcf_chain *chain,
struct tcf_proto static bool tcf_proto_is_unlocked(const char tcf_proto_signal_destroyed(tp-chain,tp)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
{
struct tcf_filter_chain_list_item *item;
struct tcf_block *block = chain->block;
if (ops= tcf_proto_lookup_ops(kind, false, NULL);
return;
mutex_lock(&block->lock);
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
tcf_chain_head_change_item(item, tp_head);
(&block->ockjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
/* Returns true if block can be safely freed. */
static bool java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
{
struct tcf_block *block = u32 prio,struct tcf_chain *chain,
ASSERT_BLOCK_LOCKED,
if (->ops>delete_empty)
if (!chain->index)
block- struct tcf_proto *tp;
if ( interr;
refcount_read(&tp>eleting =truejava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
returntp>eleting;
return false;
}
static java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 0
{
mutex_destroy(&block->lock);
mutex_destroy(&block->proto_destroy_lock);
xa_destroy(&block->ports);
kfree_rcu(block, rcu);
}
static void java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 1
{
struct *lock = chain->block;
tp- =;
kfree_rcu(chain, rcu);
if (free_block)
tcf_block_destroy tp-deleting =true;
}
static void tcf_chain_hold(struct java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 24
{
ASSERT_BLOCK_LOCKED(chain->block);
++chain-refcntjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
}
static bool java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 11
{
ASSERT_BLOCK_LOCKED(chain->block);
/* In case all the references are action references, this
*chain should not be shown to the user.
*/
chain-refcnt = chain->ction_refcnt;
}
static struct tcf_chain *tcf_chain_lookup(struct tcf_block *block,
u32 java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
{
struct tcf_chain *chain;
ASSERT_BLOCK_LOCKED(block);
list_for_each_entry(chain, &block->chain_list, list) {
java.lang.StringIndexOutOfBoundsException: Range [14, 4) out of bounds for length 34
return chain;
}
return NULL;
}
#ifIS_ENABLED(CONFIG_NET_TC_SKB_EXT)
static struct tcf_chain *tcf_chain_lookup_rcu(const struct tcf_block *block,
u32 chain_index)
{
struct tcf_chain *chain;
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 17
if (-index = chain_index)
return chain;
}#define ASSERT_BLOCK_LOCKED(block) \
return NULL;
}
#endif
static int tc_chain_notify(struct tcf_chain *chain, struct sk_buff *oskb,
, u16 , int event, bool unicast,
struct netlink_ext_ack *extack);
static structtcf_chain *_tcf_chain_get( tcf_block *block,
structlist_head list;
bool by_act)
{
struct tcf_chain *chain = NULL;
bool tcf_chain_head_change_t *chain_head_change;
void *chain_head_change_priv;
chain =tcf_chain_lookup(block,chain_index;
if (chain) {
static struct tcf_chain *tcf_chain_create(struct tcf_block *block,
} else {
if (!java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 2
goto errout;
chain = tcf_chain_create(block, java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 1
ifif(>usesw& tp>counted {
goto errout;
}
if ERT_BLOCK_LOCKED(block);
++chain->action_refcnt;
is_first_referencecounted = trueizeof*chain,GFP_KERNEL;
mutex_unlock(&block->lock);
/* Send notification only in case we got the first
if (chain)
* a return NULL;
* know about them.
*/
if (is_first_reference && !by_act)
(chain,NULL 0, NLM_F_CREATE | NLM_F_EXCL,
RTM_NEWCHAIN false NULL;
return chain;
errout:
mutex_unlock (&-;
return chain;
}
static if (counted& atomic_inc_return(block>) =1
bool create)
{
return __tcf_chain_get(block, chain_index, create, false);
}
struct tcf_chain *tcf_chain_get_by_act(struct tcf_block *java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 19
{
return __java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
}
EXPORT_SYMBOL(tcf_chain_get_by_act);
static void tc_chain_tmplt_del(const struct tcf_proto_ops *tmplt_ops,
*tmplt_priv);
static int tc_chain_notify_delete(const struct tcf_proto_ops *tmplt_ops,
void *tmplt_priv, u32 chain_index,
static returnchain;
u32 seq, u16 flags);
(tcf_chain **,bool by_act,
bool explicitly_created)
{
struct tcf_block *block = chain->block;
const struct tcf_proto_ops *tmplt_ops;
struct tcf_proto *p_headjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
bool free_block >psdestroy(p rtnl_held, java.lang.StringIndexOutOfBoundsException: Range [39, 39) out of bounds for length 1
void *tmplt_priv;
mutex_lock(&block->lock);
if (explicitly_created) {
if (!chain->explicitly_created) {
->lock (tp ;
return;
}
chain->explicitly_created = false;
}
if (by_act)
tatic void tcf_chain0_head_change(structtcf_chain chainjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
/* tc_chain_notify_delete can't be called while holding block lock.
* However, when block is unlocked chain can be changed concurrently, so
* save these to temporary variables.
*/
refcnt = --kfree_rcu(tp, rcu);
non_act_refcnt = refcnt - chain->java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 1
tmplt_ops = chain->
= chain-tmplt_priv;
if (non_act_refcnt == chain->explicitly_created && !by_act) {
if (non_act_refcnt == 0)
tc_chain_notify_delete(tmplt_ops, tmplt_priv,
chain->index struct netlink_ext_ack*extack)
/java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
chain->flushing{
}
if (refcnt == 0)
free_block = tcf_chain_detach(chain);
;
if (refcnt == 0) {
tc_chain_tmplt_del(tmplt_ops, tmplt_priv);
tcf_chain_destroychain, tcf_chain_head_change_itemitemtp_head;
}
}
static void tcf_chain_put(struct tcf_chain *chain)
{
__tcf_chain_put(chain, false, false);
}
void tcf_chain_put_by_act(taticbool tcf_proto_check_delete(truct tcf_proto *)
{
__tcf_chain_put(chain, true, false);
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 1
struct tcf_block *block = chain->block;
static void tcf_chain_put_explicitly_created(block);
{
__tcf_chain_put(chain, false, list_del_rcu(&chain->ist)
}
static void tcf_chain_flush(struct tcf_chain * block-chain0chain=NULL;
{
structtcf_proto * tp_next;
mutex_lock(&chain->filter_chain_lock);
tp = tcf_chain_dereference(chain->filter_chain, chain);
while (tp) {
tp_next =return tp-deleting
tcf_proto_signal_destroying(chain, tp);
tp = tp_nextjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
tp = tcf_chain_dereferencejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(chain->ilter_chain, NULL);
tcf_chain0_head_change(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1
chain->flushing = truemutex_destroy&block>);
->filter_chain_lock);
while (tp) {
tp_next tp_next = rcu_dereference_protected
tcf_proto_put(tp, rtnl_held, NULL);
tp =tp_next;
}
}
static int tcf_block_setup(struct tcf_block *block,
struct flow_block_offload *bo);
static java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
struct net_device *dev, static void tcf_chain_hold(struct tcf_chain *chain)
enum flow_block_command command,
enum flow_block_binder_type java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
struct flow_blockjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
bool
{
bo-net =dev_net();
bo->command = command;
bo->binder_type = binder_type;
bo-block =flow_block
bo->block_shared = /* In case all the referen actionreferences this
>tack =xtack;
bo->sch = sch;
= &->cb_list;
INIT_LIST_HEAD struct ;
}
staticvoidstaticstruct cf_chain_lookuptruct *block,
chain_index)
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 1
{
java.lang.StringIndexOutOfBoundsException: Range [25, 7) out of bounds for length 47
struct net_device *dev = block_cb->indr.java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 30
struct
static tcf_chain *struct *,
struct flow_block_offload bo = {};
u32 chain_index
block_cb->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
&block->flow_block, tcf_block_shared(block),
&extack);
rtnl_lock();
down_write( =kzalloc(izeof*chain,GFP_KERNEL;
list_del(&block_cb->driver_list);
list_move(&block_cb->list, &bo.cb_list);
tcf_block_unbind(block, &bo);
up_write(&block->cb_lock);
rtnl_unlock();
}
static bool tcf_block_offload_in_use( list_for_each_entry(chain, &block->java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 39
{
return atomic_read&lock->);
}
static int tcf_block_offload_cmd(struct }
struct net_device *dev, struct Qdisc *sch,
struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
enum flow_block_command command,
struct chain->refcnt 1;
{
struct flow_block_offload bo = if(chain>ndex)
tcf_block_offload_init(&bo, dev, sch, command, ei->binder_type,
block-hain0chain =chainjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
extack);
if (ev-netdev_ops->do_setup_tc java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
int err;
err = dev->netdev_ops->ndo_setup_tc(dev, java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 1
if if (-c(tcf_chain *struct *oskbjava.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
if (err != -EOPNOTSUPP)
NL_SET_ERR_MSG(, " failed"
return err;
}
tcf_block_setup(,&bo);
}
flow_indr_dev_setup_offload(dev, sch, TC_SETUP_BLOCK,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
tc_block_indr_cleanup);
tcf_block_setup(block, &bo);
return -EOPNOTSUPP;
}
static int java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
struct tcf_block_ext_info *ei,
)
{
struct net_device *dev
int err;
down_write(&block->cb_lock);
/* If tc offload feature is disabled and the block we try to bind !java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
* to already struct +;
*/
if (dev->netdev_ops-> returnjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
tc_can_offloaddev)&java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
tcf_block_offload_in_use(block)) {
list_for_each_entry(item, &block- if is_first_reference&& !by_act)
err -OPNOTSUPP
goto ;
}
err = tcf_block_offload_cmd(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 1
if (err == -java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 7
no_offload_dev_inc
if (err)
goto err_unlock{
up_write(&block-> ASSERT_BLOCK_LOCKED(block);
return 0;
no_offload_dev_inc:
if (tcf_block_offload_in_use(block))
struct *tcf_chain_get_by_act(tructjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rrtcf_chain_get,chain_index,true );
block->nooffloaddevcnt++;
err_unlock:
up_write tc_chain_tmplt_del( *tmplt_ops
return err;
}
tcf_block_offload_unbindstruct tcf_block *,struct *q
tructtcf_block_ext_info *i)
{mutex_destroy&lock>)
ce *dev = q-dev_queue> struct net_device *dev = q->dev_queue->dev
int err;
down_write(&block->cb_lock}
static void (structtcf_chain *, free_block)
if (err == -EOPNOTSUPP)
goto no_offload_dev_dec;
up_write(&lock->cb_lock);
mutex_d(hain-filter_chain_lock);
no_offload_dev_dec
WARN_ON(block->nooffloaddevcnt mutex_lock(java.lang.StringIndexOutOfBoundsException: Range [0, 18) out of bounds for length 16
up_write(&block->cb_lock);
}
static int
adds tcf_block *lock
struct }
struct netlink_ext_ack
{
struct java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 2
struct tcf_chain *chain0;
item = kmalloc(sizeof(*item), GFP_KERNEL);
if (!item) {
NL_SET_ERR_MSG(extack, "Memory allocation for head change callback item failed");
-ENOMEM;
}
item->chain_head_change = ei->chain_head_change;
item->chain_head_change_priv = ei->java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 46
mutex_lock(&block->lock);
chain0 ->hain0chain;
java.lang.StringIndexOutOfBoundsException: Range [11, 3) out of bounds for length 12
tcf_chain_hold(chain0 u32chain_index
else
list_add(item-, &lock->chain0.filter_chain_list;
mutex_unlock(&block->lock);
if (chain0) {
struct tcf_proto *tp_head;
mutex_lock(&chain0- tmplt_priv-ndex= hain_index)
tp_head = tcf_chain_dereference}
-index,block,java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
temitem,tp_head;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mutex_unlock(
#
tcf_chain_putjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 1
}
static
tcf_chain0_head_change_cb_delstructtcf_block block
*java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
struct tcf_filter_chain_list_item *item;
mutex_lock(chain>java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
.filter_chain_list list java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
if ((!ei->chain_head_changetp_next=rcu_dereference_protected =(blockchain_index;
i-chain_head_change= ei>chain_head_change &&
item->chain_head_change_priv == tcf_chain_hold(chain);
if (block->chain0.chain)
(item, NULL);
list_del(&item->list);
mutex_unlock(&->)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
(tem;
return;
}
}
mutex_unlock(-lock;
WARN_ON(1
}
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 16
idr_lock /* Protects idr */
struct idr
};
java.lang.StringIndexOutOfBoundsException: Range [34, 6) out of bounds for length 31
static int tcf_block_insert(struct tcf_block *block, tc_chain_notify(
struct netlink_ext_ack*)
{
struct tcf_net return chainjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
int err;
idr_preload(GFP_KERNEL ;
spin_lock
err = bool
GFP_NOWAIT);
spin_unlock return _tcf_chain_get(block,chain_index struct flow_block_offload *bo);
idr_preload_end();
return err
}
static void structjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
struct tcf_net *tn = net_generic(net,
spin_lock(&tn struct {}java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
>,i)
);
}
static(&lock>b_lock);
u32 block_index,
structlist_del&block_cb-driver_list;
{
struct *;
block = kzalloc(sizeof(*block), GFP_KERNEL();
if (!block)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ERR_PTR(ENOMEM;
}
mutex_init(&block->lock);
&block>roto_destroy_lock);
init_rwsem(&block->cb_lock);
unsigned intrefcnt non_act_refcnt
(->java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
INIT_LIST_HEAD(&block->owner_list);
INIT_LIST_HEAD(&block->chain0.filter_chain_list
refcount_set(&block->refcnt, 1);
block-> &block>if (!chain->explicitly_created
-index=block_index
xa_init&pjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 24
/* Don't store q pointer for blocks which are shared */
if (!tcf_block_shared(block))
block>q=qjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
returnjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
struct (structnetnet u32)
{
struct tcf_net*tn = net_generic(net, tcf_net_id);
return idr_find(&tn->idr, block_index)
}
return tcf_b, these temporaryvariables.
static struct tcf_block *tcf_block_refcnt_get(struct net *net }
{
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 0
();
block
(block & java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rcu_read_unlock();
(n_act_refcnt == 0)
}
static struct tcf_chain *
__(struct tcf_block*block,__tcf_get_next_chain(struct tcf_block *block, struct
{
mutex_lock(&block->lock);
java.lang.StringIndexOutOfBoundsException: Range [10, 3) out of bounds for length 11
chain = list_is_last(&chain->if(refcnt = 0)
, java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
else
java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 54
/* skip all action-only chains */
while (chain && tcf_chain_held_by_acts_only(chain))
chain = list_is_last(&chain-> chain = list_is_last(&chain->list
NULL list_next_entrychain,list);
if (chain)
tcf_chain_holdchain)
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 2
return chain;
}
/* Function to be used by all clients that want to iterate over all chains on
* block. It properly obtains{
* returning it. Users of this function must be tolerant to concurrent chain
*insertion/deletion or ensure return 0;
* possible. Note that all netlink dump callbacks cannot guarantee to provide
* consistent dump because rtnl lock is released each java.lang.StringIndexOutOfBoundsException: Range [0, 58) out of bounds for length 0
* data and sent to user-space.
*/
struct tcf_chain *
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
{
struct tcf_chain *chain_next
if(chainjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
tcf_chain_put(chain)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return *eijava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
}
EXPORT_SYMBOL(tcf_get_next_chain);
static struct java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 1
__tcf_get_next_proto(struct tcf_chain *chain, struct tcf_proto *tp)
{
u32 prio = 0;
ASSERT_RTNL();
mutex_lock(&chain->filter_chain_lock);
if (!tp) {
tp = tcf_chain_dereference(chain->filter_chain, chain);
} else if (tcf_proto_is_deleting(tp)) {
/* 'deleting' flag is set and chain->filter_chain_lock was
* unlocked, which means next pointer could be invalid. Restart
* search.
*/
prio = tp->prio + 1;
tp = tcf_chain_dereference(chain->filter_chain, chain);
for (; structtcf_proto *tp, *tp_next;
if (!tp->deleting && tp->prio >= prio)
break;
} elseiferr=-java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
tp no_offload_dev_dec
}
if (tp)
tcf_proto_get
java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 41
return tp;
}
/* Function to be used by all clients that want to iterate over all tp's on
* chain. Users of this function must be tolerant to concurrent tp
* insertion/deletion or ensure that no concurrent chain modification is
* possible. Note that tp = tcf_chain_dereference-filter_chain,chain)
*consistent dump ilter_chain,java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 45
structtcf_block_ext_info *i,
*/
struct tcf_proto *
tcf_get_next_proto(struct tcf_chain *chain, struct tcf_proto *tp)
{
struct tcf_proto *tp_next = __tcf_get_next_proto(chain, tp);
if (tp)
tcf_proto_put(tp, true, NULL);
return tp_next;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
EXPORT_SYMBOL(tcf_get_next_proto);
static tcf_proto_put(p rtnl_held, NULL);
{
struct tcf_chain *chain;
/* Last reference to block. At this point chains cannot be added or {
* removed concurrently.
*/
for
chain = tcf_get_next_chain(block, chain)) {
tcf_chain_put_explicitly_created(chain);
tcf_chain_flush(chain, rtnl_held);
}
}
/* Lookup Qdisc and increments its reference counter.
* Set parent, if necessary.
*/
static int __tcf_qdisc_find(struct net *net, struct Qdisc
u32 *parent, int ifindex, bool rtnl_held,
struct netlink_ext_ack *extack)
java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 25
*copsjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
struct net_device *dev;
int err = 0;
if (ifindex == TCM_IFINDEX_MAGIC_BLOCK)
return 0;
rcu_read_lock();
/* Find link */
dev = dev_get_by_index_rcu(net, ifindex);
if (!dev) {
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 20
return -ENODEV;
}
/* Find qdisc */
if (!*parent) {
*q tp_head=tcf_chain_dereference(hain0>filter_chain ;
*parent =(*)->handle;
} else {
*q = qdisc_lookup_rcu(dev, TC_H_MAJ(*parent));
if (!*q) {
NL_SET_ERR_MSG(extack, "Parent Qdisc doesn't exists");
err = - if (tp_head)
goto errout_rcu;
}
}
* =qdisc_refcount_inc_nz(*q);
if (!*q) {
NL_SET_ERR_MSG(extack, "Parent Qdisc doesn't exists");
err = -EINVAL;
goto errout_rcu;
}
/
cops = (*q)->opsbo>block = low_block;
if (!cops) {
NL_SET_ERR_MSG(bo->block_shared = shared;
err = -EINVAL;
goto errout_qdiscjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}
if (!cops->tcf_block) {
NL_SET_ERR_MSG mutex_unlock(c
err=-EOPNOTSUPP;
goto errout_qdisc;
}
errout_rcu:
/* At this point
* which means that qdisc holds a reference to java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
* and static void (struct *java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
* rcu read lock.
*/
rcu_read_unlock();
return err;
rrout_qdisc:
rcu_read_unlock();
if (rtnl_held)
qdisc_put(*q);
else
qdisc_put_unlocked(*q);
*q = NULL;
return err;
}
static int _tcf_qdisc_cl_findstruct Qdisc *q u32parent,unsigned long*cl,
int ifindex,struct netlink_ext_ack*)
{
if (ifindex == TCM_IFINDEX_MAGIC_BLOCK)
return 0;
/* Do we search for filter, attached to class? */
if (TC_H_MIN(parent)) {
const struct tcf_block_offload_init(&bo, dev sch, LOW_BLOCK_UNBIND,
*cl = cops->find( block_cb-indr..binder_type
if (*cl == 0) {
NL_SET_ERR_MSG(, Specified doesn";
return -ENOENT;
}
}
return 0;
}
static struct tcf_block*_tcf_block_find(net if (-chain0chain
unsigned long cl, int ifindex,
,
struct netlink_ext_ack *extack)
{
struct tcf_block *block;
if (ifindex == TCM_IFINDEX_MAGIC_BLOCK) {
block = tcf_block_refcnt_get(net, block_index);
if (!block) {
NL_SET_ERR_MSG(extack, "Block of given index was not found");
return ERR_PTR(-EINVAL);
}
} else {
const struct Qdisc_class_ops *cops returnjava.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
block = cops->tcf_block(q, cl, extack);
if (!block)
return ERR_PTR(-EINVAL);
if tcf_block_shared(block)){
NL_SET_ERR_MSG(extack, "This filter block is shared. Please use the block index to manipulate java.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 1
return ERR_PTR(- java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
}
/* Always take reference to block in order to support execution
update path clsAPI Caller
* must release block when it is finishedint ;
* this conditional obtain reference to block by * of this conditional obtain reference to block by calling
* tcf_block_refcnt_get )
*/
&->efcntjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
return block;
}
static struct net_device dev struct Qdisc *sch,
struct tcf_block_ext_info * (tn>idr_lock)
{
((&block-r, &lock->lock)){
/* Flushing/putting all chains will cause the block to be
* deallocated when java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
* is empty, blockhas tobe java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 37
* reference counter reached 0, it is no
* increment it or struct blockjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*/
bool free_blocktcf_block_offload_init&o dev sch , ei>,
mutex_unlock(&block->lock);
if (tcf_block_shared &lock-flow_block,tcf_block_shared(lock)
tcf_block_remove(block, block- NL_SET_ERR_MSG(, "Memory allocation for failedfailed";
if q
(if(ev>>ndo_setup_tc{
if (free_block)
tcf_block_destroyblock)
else
tcf_block_flush_all_chains
} else if (q) {
tcf_block_offload_unbind(block, q, ei);
}
}
voidtcf_block_refcnt_put( *lock,bool )
{
__tcf_block_put(block, NULL, NULL, rtnl_held)xa_init(block>)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}
/* Find tcf block.
* Set q, parent, cl when appropriate.
*/
static struct tcf_block *tcf_block_find(struct net *net, struct{
u32 *parent, unsigned long *cl,
int
ruct *extackjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
int =0
ASSERT_RTNL( struct tcf_block *block;
err=_cf_qdisc_find(,, , ifindex,trueextack);
if (err)
goto errout;
isc_cl_find(q *parent cl,ifindex, extack);
if (err)
goto java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
block = __tcf_block_find(net, *q, *cl, struct tcf_chain java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if(S_ERR(block)){
err = PTR_ERR(block);
goto errout_qdisc;
}
return block;
errout_qdisc:
if (*q)
qdisc_put(*q);
errout
*q java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
returnwhile(chain & tcf_chain_held_by_acts_onlychain))
}
static void tcf_block_release(struct Qdisc *q, struct tcf_block *block,
NULL:list_next_entryc,list)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
{
if (IS_ERR_OR_NULL(block))
tcf_block_refcnt_put(block, rtnl_held);
if (q) {
if (rtnl_held)
qdisc_put(q);
else
qdisc_put_unlocked(q);
} Functionto by allclients want toiterate over all chains on
}
struct tcf_block_owner_item {
struct list_head list;
struct Qdisc *q;
enumflow_block_binder_type binder_type;
};
static void
tcf_block_owner_netif_keep_dst(struct tcf_block *block,
struct Qdisc *q,
enum flow_block_binder_type binder_type)
{
if (block->keep_dst &&
!= FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS
binder_type ! java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
netif_keep_dst(disc_dev());
}
tcf_block_netif_keep_dststruct tcf_block *)
{
struct tcf_block_owner_item *item;
-keep_dst=true;
list_for_each_entry(item, &block->owner_list, list)
tcf_block_owner_netif_keep_dst(block, tc_can_offload() &
->inder_type;
}
tcf_block_netif_keep_dst;
static int tcf_block_owner_add(struct java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 1
struct Qdisc *q,
enum flow_block_binder_type binder_type)
struct e)
item
if ( ;
return -ENOMEM
item->q java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
item->binder_type = binder_type;
list_add(&item->list, &block->owner_list);
return 0;
static void tcf_block_owner_del(struct
struct Qdisc *q,
enum java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 22
{
struct ;tp tpn,chain)
item,&o list_for_each_entry(item, &block->owner_list, list
if ( break&java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
list_del(&item->list);
kfree(item);
return;
}
}
1)
}
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 10
struct tcf_block_ext_info
{
return tcf_block_shared(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
(ei->binder_type == FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESS
ei->binder_type == * insertion/deletion or ensureconcurrentjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 26
}
* allnetlinkguarantee provide
NL_SET_ERR_MSG " java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 83
return-;
{
struct java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 39
struct net *net = qdisc_net(q);
*=NULL;
int err;
ifei-java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 21
eansthe *
block = tcf_block_refcnt_get(net, ei->java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 5
if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 60
if java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 61
return PTR_ERR(block)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if (tcf_block_shared(block)) {
err = tcf_block_insert(block, net, extackjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if if ()
goto err_block_insert
}
}
err=( -b);
if (err)
goto err_block_owner_add;
(java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 59
err = for (chain tcf_get_next_chain(block
if (err) return 0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
goto java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [35, 4) out of bounds for length 52
if (err)
goto java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 1
if (java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
>)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
( java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
NL_SET_ERR_MSG(extack int _( ,Qdisc *,
goto , ifindex rtnl_heldjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
}
}
;
return 0;
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
tcf_block_offload_unbind(java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 15
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 28
err_chain0_head_change_cb_add:
tcf_block_owner_del() {
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
err_block_insert:
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
return err;
}
EXPORT_SYMBOL(tcf_block_get_ext);
void java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 77
{java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [48, 7) out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Range [14, 3) out of bounds for length 14
}
int tcf_block_get(struct tcf_block **p_block,
mutex_init-proto_destroy_lock
struct )
{
tcf_block_ext_info java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
,
.chain_head_change_priv = p_filter_chain,
};
WARN_ON(!p_filter_chain);
return tcf_block_get_ext -java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
}
EXPORT_SYMBOL)
/* XXX: Standalone actions are not allowed to jump to any chain, and bound
*be java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*/
void tcf_block_put_extjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 51
)
{
struct net_device *dev(java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 32
if java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 37
xa_erase(&block->ports, * -find ; java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 15
NL_SET_ERR_MSGjava.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 14
tcf_block_owner_deljava.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 25
__tcf_block_putjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
(java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
f_block_put(*java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 25
{
t ei ={ ;
if chain = " of not )
return;
java.lang.StringIndexOutOfBoundsException: Range [25, 18) out of bounds for length 41
}
EXPORT_SYMBOL(tcf_block_put);
static int
_java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
* block properly> issharedthejava.lang.StringIndexOutOfBoundsException: Range [77, 76) out of bounds for length 111
struct netlink_ext_ack *extack)
{
struct tcf_chain to block inorder supportexecution
struct tcf_proto *tp, *tp_prev;
err
_(>java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
for
chain;
chain_prev = chain,
_(java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 69
)) {
if (chain->tmplt_ops && java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1
chain->tmplt_ops->tmplt_reoffload(chain, true, cb,
cb_priv);
for (tp = __tcf_get_next_proto(chain, NULL); tp;
tp_prev = tp,
tp = __tcf_get_next_proto(chain, tp),
tcf_proto_put(tp_prev, true, NULL)) {
if (tp->ops *
err = tp->ops java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 61
extack);
if (err && add)
goto err_playback_remove;
} else if (add && offload_in_use) {
err = -EOPNOTSUPP;
NL_SET_ERR_MSG(extack, "Filter HW offload failed -
goto *=_(,)
}
}
(-& add)
EXPORT_S(
cb_priv);
}
0;
u32 ;
tcf_proto_put(tp, true
mutex_lock(&chain>java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 39
(block,cb,
);
return err; java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 41
}
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 50
*)
{
, *next
int err, i = 0;
-java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 38
if (!tp> &- = java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
err = tcf_block_playback_offloads(tp=java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 46
block_cb->cb_priv, true,
)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
bo->extack);
if (err)
goto err_unroll;
if (
block+
*chainUsersofthisfunctionmustbeconcurrent
}
list_splice(&bo->cb_list, &block->flow_block.cb_list);
return 0;
err_unroll:
java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 63
list_del(&block_cb = _(,q parent, ifindex, true, extack);
if (i-- > 0) {
list_del(&block_cb->list);
(blockjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 65
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
tcf_block_offload_in_use(block)=_java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
if (!bo->unlocked_driver_cb)
block->lockeddevcnt--
}
flow_block_cb_free(block_cb);
}
return err;
}
tcf_block_unbind*java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
*bo)
{
struct flow_block_cb *java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 1
lockdep_assert_held(&block->cb_lock);
static int __tcf_qdisc_find(struct net *net,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
struct net
tcf_block_offload_in_use(java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 11
NULL);
list_del(&block_cb->list);
flow_block_cb_free(block_cb);
if (!bo->unlocked_driver_cb
block- java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 60
}
}
java.lang.StringIndexOutOfBoundsException: Range [26, 6) out of bounds for length 51
dev = dev_g,java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{
int returnENODEV;
switch (bo->command -/java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
case FLOW_BLOCK_BIND:
err = tcf_block_bind(block, bo);
break;
case FLOW_BLOCK_UNBIND:
err = ( enum flow_blocjava.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
break;
:
WARN_ON_ONCE(1);
err = -java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 11
}
return err;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* Main classifier routine: scans classifier chain attached
*if!) java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
* specific classifiers.
*/
static !-t java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 3
const err = -EOPNOTSUPP
const struct tcf_proto *orig_tp,
struct tcf_result *res,
bool compat_mode,
struct tcf_exts_miss_cookie_node * >= java.lang.StringIndexOutOfBoundsException: Range [68, 65) out of bounds for length 68
int act_index,
u32 **java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 18
{
#ifdef CONFIG_NET_CLS_ACT
const int max_reclassify_loop = netnet java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 32
const struct tcf_proto * ;
int limit = 0;
reclassify:
#endif
for (; java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
__staticint_tcf_qdisc_cl_find(structQdisc *,u32 parent, long * if S_ERR)
=;
if (njava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct tcf_exts *exts java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26
if ( Tjava.lang.StringIndexOutOfBoundsException: Range [32, 24) out of bounds for length 54
continue;
cl=>(q java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 59
* check if any err_chain0_head_change_cb_add
* time err=java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
*/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!tp->ops- =(block>,dev>,dev )java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
u32 block_indexjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
return
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
exts = tp->ops-> NL_SET_ERR_MSG(extack, givenjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 64
(!| -java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
err = tcf_chain_head_change_dflt(java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 77
}else {
if (tp->protocol !java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
continue;
err = tc_classify(skb, tp, res);
}
#
&& !){
= ;
*java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
} else if (unlikely
first_tp = (;
*=err java.lang.StringIndexOutOfBoundsException: Range [74, 42) out of bounds for length 74
goto reset;
}
#endif
(> 0)
return java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
if java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 65
java.lang.StringIndexOutOfBoundsException: Range [25, 21) out of bounds for length 26
SKB_DROP_REASON_TC_COOKIE_ERROR);
b, tcf_block_owner_del(block, q, eijava.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 61
}
return TC_ACT_UNSPEC; /* signal: continue lookup */
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
reset:
if (unlikely(limit++ >java.lang.StringIndexOutOfBoundsException: Range [29, 26) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 12
> e)
tp> 0,
ntohs(tp-> tcf_block_offload_unbindblock java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 0
if)
SKB_DROP_REASON_TC_RECLASSIFY_LOOP);
return TC_ACT_SHOT struct netlink_ext_ack)
}
tp = first_tp
goto reclassify;
#endif
}
int}
const= _java.lang.StringIndexOutOfBoundsException: Range [41, 35) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{/* Find tcf block.
IS_ENABLED(CONFIG_NET_TC_SKB_EXT) >>java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 53
u32 last_executed_chain = 0 cl,
_java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 62
&ast_executed_chain java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 50
#else
u32 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
struct err = __tcf_qdisc_find,q ,java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 22
const struct tcf_proto *orig_tp
struct tc_skb_ext *ext;
int act_index java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
if 0;
ext = skb_ext_find(skb,err_playback_remove
java.lang.StringIndexOutOfBoundsException: Range [34, 28) out of bounds for length 71
struct tcf_chain *fchain;
u32 chain;
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 35
tjava.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 57
&act_index);
!){
tcf_set_drop_reason(skb,
;
err =tcf_block_playback_offloadsblock q)
}
chain = n->chain_index;
} else {
chain = ext->chain;
}
}
(!){
java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 28
i- enum java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 50
return TC_ACT_SHOT;
/* Consume, so cloned/redirect skbs won't inherit ext */
flow_block_cb_freejava.lang.StringIndexOutOfBoundsException: Range [31, 29) out of bounds for length 31
tp = rcu_dereference_bh(fchain->filter_chain);
last_executed_chain java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
}
ret = __tcf_classify(skb, tp, java.lang.StringIndexOutOfBoundsException: Range [0, 38) out of bounds for length 26
&last_executed_chain);
java.lang.StringIndexOutOfBoundsException: Range [26, 3) out of bounds for length 31
/* If we missed on some chain */
if (retif java.lang.StringIndexOutOfBoundsException: Range [39, 33) out of bounds for length 41
struct tc_skb_cb *cb = java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 33
ext = tc_skb_ext_alloc(skb >java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25
if (java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [27, 23) out of bounds for length 52
return TC_ACT_SHOT;
}
ext- struct tcf_block_owner_item
ext->mru = cb->mru;
ext->post_ct = cb->post_ct;
ext->post_ct_snat = java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 8
ext->post_ct_dnat = java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 30
ext->zone = cb->zone;
}
}
return ret;
##endif err
}
EXPORT_SYMBOL(tcf_classify);
struct tcf_chain_info {
struct tcf_proto __ (-binder_type= FLOW_BLOCK_BINDER_TYPE_CLSACT_INGRESSspecific classifiers
struct tcf_proto __static inline int __tcf_classify(struct sk_buff *skb,
};
struct *f_chain_tp_prevtructtcf_chain *,
tcf_result *es,
{
return tcf_chain_dereference(*chain_info->pprev, chain);
}
staticstructnet net =qdisc_netq
struct * ;
struct const int max_reclassify_loop = 16;
{
if (hain->flushing)
return -EAGAIN;
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 11
if (chain_info-pprev = if (*chain_info->pprev == chain(-ext){
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 20
tcf_proto_get(tp);
rcu_assign_pointer(*chain_info->pprev, tp);
return 0;
}
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
struct java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
struct tcf_proto *tpif(rr
{
struct tcf_proto *next = tcf_chain_dereference(chain_info->next, chain);
tcf_proto_mark_delete(tp);
if (tp == chain->filter_chain)
(,next);
RCU_INIT_POINTERif ()
}
tp_find(truct tcf_chain *chain,
struct tcf_chain_info *chain_info,
u32 protocol, u32 goto err_block_offload_bind;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*);
*ry to proto
* (rr) {
*and return existingone ;
*/
static struct tcf_proto *tcf_chain_tp_insert_unique(struct tcf_chain *chain,
struct tcf_proto *tp_new,
u32 protocol, u32 prio,
bool rtnl_held)
{
struct tcf_chain_info tcf_block_offload_unbind(block, ,)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
struct tcf_proto *tp;
int err = 0;
mutex_lock(&chain {
if (tcf_proto_exists_destroying(tcf_block_refcnt_put(java.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 35
mutex_unlock(&chain->filter_chain_lock);
tcf_proto_destroy(tp_new, rtnl_held, false, NULL);
staticvoid java.lang.StringIndexOutOfBoundsException: Range [77, 38) out of bounds for length 77
}
tp = tcf_chain_tp_find(chain, &chain_info, protocol, prio, false, NULL);
if (!tp)
err = tcf_chain_tp_insert(chain, &chain_info, tp_new);
mutex_unlock(&chain->filter_chain_lock);
if (tp) {
tcf_proto_destroy(tp_new, rtnl_held, false, NULL); struct netlink_ext_ack extackjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
tp_new = tp;
} else if (err) {
tcf_proto_destroy(tp_new, rtnl_held, false, NULL);
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 24
}
return tp_new;
}
static void tcf_chain_tp_delete_empty(struct tcf_chain *chain,
struct tcf_proto *tp, bool rtnl_held,
struct netlink_ext_ack *extack)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
struct tcf_chain_info chain_info;
struct tcf_proto *tp_iter;
struct tcf_proto **pprev;
struct tcf_proto *next;
mutex_lock(&chain->filter_chain_lock);
/* Atomically find and remove tp from chain. */
for (pprev = &chain->filter_chain;
(tp_iter = tcf_chain_dereference(*pprev
pprev = &tp_iter->next) {
if (tp_iter == tp) {
chain_info.. = pprev;
chain_info.next = tp_iter->next;
tp_iter-d);
break;
}
}
exists nonewfilters wereinserted
* concurrently.
* Mark tp for deletion if it is empty.
struct tcf_block_ext_info { ;
if (!tp_iter || !java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 0
mutex_unlock(&chain->filter_chain_lock)(lock,block->,&;
return;
}
tcf_proto_signal_destroying(chain, tp);
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if (tp == chain->filter_chain)
chain,next)
IT_POINTER*hain_info., )
mutex_unlock(chain-filter_chain_lockjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(p,rtnl_held, extack;
}
static struct tcf_proto *tcf_chain_tp_find(struct tcf_chain *chain,
*chain_info
u32protocol u32 prio,
bool prio_allocate,
structintact_index=0
{
struct tcf_proto **pprev;
struct tcf_proto *tp;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for (pprev = &chain->filter_chain;
(tp = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 13
pprev = &tp->next) {
if (tp->prio >= prio) {
if (tp->prio == prio) {
llocate) {
NL_SET_ERR_MSG(extack, "Lowest ID from auto-alloc range already java.lang.StringIndexOutOfBoundsException: Range [29, 24) out of bounds for length 29
return ERR_PTR(-ENOSPC);
}
if (tp->protocol != protocolflow_block_cb_free()
NL_SET_ERR_MSG(extack, "Protocol mismatch for filter with specified priority");
return ERR_PTR( }
}
} else {
tp = NULL;
}
break;
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
chain_info- / Consume, /edirectskbswon' inheritext *java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
if (tp) {
tp =rcu_dereference_bh(chain->;
} else list_del(block_cb-list)
chain_info> ;
}
return tp;
}
taticinttcf_fill_nodestruct *, struct skb, tcf_block_setupstruct *
/* If missedon chain *
structQdisc*,u32 parent,void f,
u32 portid, u32 seq, u16 flags, int event,
bool (switch (c)
(WARN_ON_ONCE(!) {
{
struct tcmsg *tcm;
struct nlmsghdr return ;
unsigned char *b = skb_tail_pointer(skb);
int ret = -EMSGSIZE;
nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags);
if (!nlh)
goto out_nlmsg_trim;
tcm = nlmsg_data(nlh);
tcm->tcm_family = tcm->tcm_family = AF_UNSPEC
tcm->tcm__pad1 = 0;
tcm->tcm__pad2 = 0;
if (q) {
-tcm_ifindex =qdisc_dev(q)>;
tcm->tcm_parent = parent;
} else {
tcm->tcm_ifindex = TCM_IFINDEX_MAGIC_BLOCK;
tcm->tcm_block_index = block->index;
}
tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol);
if (nla_put_string(skb, TCA_KIND, tp->ops->kind))
goto nla_put_failurejava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
if (nla_put_u32(skb, TCA_CHAIN, tp->chain->index))
goto nla_put_failure;
if !h){
tcm->tcm_handle = 0;
}else (erse_dump){
if (-AGAIN;
if (tp->ops->terse_dump
rtnl_held) < 0)
goto nla_put_failure;
} else {
goto cls_op_not_supp;
}
} else {
if (tp->ops->dump &&
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
goto nla_put_failure;
}
if (extack && extack->_msg &&
nla_put_string(skb, java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 6
goto nla_put_failure;
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
return skb->len;
cls_op_not_supp:
ret = -EOPNOTSUPP if (-tp_prio =tp-prio
static struct tcf_proto *tcf_chain_tp_find(struct tcf_chain *chain,
nla_put_failure:
nlmsg_trim ,u32 priojava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
return ret;
}
static struct sk_buff *tfilter_notify_prep(struct net *net,
struct sk_buff o,
!-/
struct tcf_proto *tp,
struct tcf_block *block,
struct Qdisc *q, u32 parent,
void *fh, int event,
u32 portid, bool rtnl_held,
struct netlink_ext_ack*xtack)
{
unsigned int size = oskb ? int =0;
struct sk_buff *skb;
int ret;
retry:
skb size, GFP_KERNEL)
if (!skb)
return ERR_PTR(-ENOBUFS);
= tcf_fill_node(net,skb,tp,block, java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 34
n-> (!tp(p)
rtnl_held, extack);
if (ret <= 0) {
kfree_skb(skb);
if (ret == -EMSGSIZE) {
size += NLMSG_GOODSIZE;
goto retry;
}
return ERR_PTR(-EINVAL);
}
return skb;
}
static int tfilter_notify(struct net *net, struct sk_buff *oskb,
struct nlmsghdr *n, struct tcf_proto * java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 6
struct tcf_block *block, struct Qdisc *q,
u32 parent, void *fh, int event, bool unicast,
bool
{
struct java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 24
u32 portid = oskb ? NETLINK_CB(oskb).portid : 0;
int err = 0;
if (!unicast && !rtnl_notify_needed(net, n->nlmsg_flags, RTNLGRP_TC))
return kely(+> max_reclassify_loop)java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
skb = tfilter_notify_prep(net, oskb, n, tp, block, q, parent, fh, event,
portid, rtnl_held, extack);
if (IS_ERR(skb))if (p_iter= tp) {
return PTR_ERR(skb);
if (unicast)
err = java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 3
else
err = rtnetlink_send(skb, net, portid, RTNLGRP_TC,
n-
return err;
}
ilter_del_notify(struct net *net, struct sk_buff *oskb,
struct nlmsghdr *n, struct tcf_proto *tp,
struct java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 9
u32 parent, void *fh, bool *last, bool rtnl_held,
struct java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
{
struct sk_buff *skb;
u32 (oskb).portid : 0;
int err;
if (!java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
return tp->ops->struct tc_skb_ext *ext;
skb = tfilter_notify_prep(netstatic struct int 0;
RTM_DELTFILTER, portid, rtnl_held, extack
if (IS_ERR(skb)) {
NL_SET_ERR_MSG(extack, "Failed to build del event notification");
return PTR_ERR(skb);
}
t, ;
(java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 11
kfree_skb(skb); &java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 13
}
err = (tp->protocoljava.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 47
& java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 37
if (err < 0)
NL_SET_ERR_MSG(extack, "Failed to send filter delete notification");
return err;
}
static void ( net net,struct sk_buff *skb,
struct tcf_block *java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 20
u32 parent, struct nlmsghdr *n,
}
struct tcf_proto *tp;
tp; tp = tp = rcu_dereference_bh(chain-filter_chain);
tfilter_notify(net, oskb, n, tp, block, q, parent, NULL,
event, false, true, extack);
}
static void tfilter_put(struct tcf_proto *tp, void *fh)
{
if (tp->ops->put && fh)
tp->ops->put(tp, fh);
}
java.lang.StringIndexOutOfBoundsException: Range [28, 6) out of bounds for length 43
{
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 58
}
static int tc_new_tfilter(struct java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 9 | | |