/linux/drivers/net/ethernet/huawei/hinic/ |
H A D | hinic_hw_api_cmd.c | 49 #define MASKED_IDX(chain, idx) ((idx) & ((chain)->num_cells - 1)) argument 89 static void set_prod_idx(struct hinic_api_cmd_chain *chain) in set_prod_idx() argument 91 enum hinic_api_cmd_chain_type chain_type = chain->chain_type; in set_prod_idx() 92 struct hinic_hwif *hwif = chain->hwif; in set_prod_idx() 100 prod_idx |= HINIC_API_CMD_PI_SET(chain->prod_idx, IDX); in set_prod_idx() 105 static u32 get_hw_cons_idx(struct hinic_api_cmd_chain *chain) in get_hw_cons_idx() argument 109 addr = HINIC_CSR_API_CMD_STATUS_ADDR(chain->chain_type); in get_hw_cons_idx() 110 val = hinic_hwif_read_reg(chain->hwif, addr); in get_hw_cons_idx() 115 static void dump_api_chain_reg(struct hinic_api_cmd_chain *chain) in dump_api_chain_reg() argument 119 addr = HINIC_CSR_API_CMD_STATUS_ADDR(chain->chain_type); in dump_api_chain_reg() [all …]
|
/linux/drivers/net/ethernet/qlogic/qed/ |
H A D | qed_chain.c | 10 static void qed_chain_init(struct qed_chain *chain, in qed_chain_init() argument 14 memset(chain, 0, sizeof(*chain)); in qed_chain_init() 16 chain->elem_size = params->elem_size; in qed_chain_init() 17 chain->intended_use = params->intended_use; in qed_chain_init() 18 chain->mode = params->mode; in qed_chain_init() 19 chain->cnt_type = params->cnt_type; in qed_chain_init() 21 chain->elem_per_page = ELEMS_PER_PAGE(params->elem_size, in qed_chain_init() 23 chain->usable_per_page = USABLE_ELEMS_PER_PAGE(params->elem_size, in qed_chain_init() 26 chain->elem_unusable = UNUSABLE_ELEMS_PER_PAGE(params->elem_size, in qed_chain_init() 29 chain->elem_per_page_mask = chain->elem_per_page - 1; in qed_chain_init() [all …]
|
/linux/tools/testing/selftests/net/forwarding/ |
H A D | tc_chains.sh | 38 tc filter add dev $h2 ingress chain 1 protocol ip pref 1 handle 1101 \ 45 check_fail $? "matched on filter in unreachable chain" 47 tc filter del dev $h2 ingress chain 1 protocol ip pref 1 handle 1101 \ 50 log_test "unreachable chain ($tcflags)" 57 tc filter add dev $h2 ingress chain 1 protocol ip pref 1 handle 1101 \ 62 $tcflags dst_mac $h2mac action goto chain 1 71 check_err $? "Did not match on correct filter with goto chain action" 74 check_err $? "Did not match on correct filter in chain 1" 78 tc filter del dev $h2 ingress chain 1 protocol ip pref 1 handle 1101 \ 81 log_test "gact goto chain ($tcflags)" [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/lib/ |
H A D | fs_chains.c | 43 u32 chain; member 55 u32 chain; member 68 struct fs_chain *chain; member 77 .key_offset = offsetof(struct fs_chain, chain), 78 .key_len = sizeof_field(struct fs_chain, chain), 153 u32 chain, u32 prio, u32 level) in mlx5_chains_create_table() argument 164 sz = (chain == mlx5_chains_get_nf_ft_chain(chains)) ? in mlx5_chains_create_table() 174 /* The root table(chain 0, prio 1, level 0) is required to be in mlx5_chains_create_table() 180 (chain == 0 && prio == 1 && level == 0)) { in mlx5_chains_create_table() 184 mlx5_get_fdb_sub_ns(chains->dev, chain) : in mlx5_chains_create_table() [all …]
|
/linux/drivers/net/wireless/ath/ath9k/ |
H A D | ar9003_rtt.c | 29 * There is an internal table (i.e. the rtt) for each chain (or bank). 72 static void ar9003_hw_rtt_load_hist_entry(struct ath_hw *ah, u8 chain, in ar9003_hw_rtt_load_hist_entry() argument 78 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_1_B(chain), val); in ar9003_hw_rtt_load_hist_entry() 83 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val); in ar9003_hw_rtt_load_hist_entry() 87 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val); in ar9003_hw_rtt_load_hist_entry() 90 if (!ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), in ar9003_hw_rtt_load_hist_entry() 96 REG_WRITE(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), val); in ar9003_hw_rtt_load_hist_entry() 99 ath9k_hw_wait(ah, AR_PHY_RTT_TABLE_SW_INTF_B(chain), in ar9003_hw_rtt_load_hist_entry() 106 int chain, i; in ar9003_hw_rtt_load_hist() local 108 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { in ar9003_hw_rtt_load_hist() [all …]
|
H A D | link.c | 182 int chain; in ath_paprd_activate() local 190 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { in ath_paprd_activate() 191 if (!(ah->txchainmask & BIT(chain))) in ath_paprd_activate() 194 ar9003_paprd_populate_single_table(ah, caldata, chain); in ath_paprd_activate() 201 static bool ath_paprd_send_frame(struct ath_softc *sc, struct sk_buff *skb, int chain) in ath_paprd_send_frame() argument 222 txctl.paprd = BIT(chain); in ath_paprd_send_frame() 235 "Timeout waiting for paprd training on TX chain %d\n", in ath_paprd_send_frame() 236 chain); in ath_paprd_send_frame() 252 int chain; in ath_paprd_calibrate() local 282 for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) { in ath_paprd_calibrate() [all …]
|
/linux/net/netfilter/ |
H A D | nft_immediate.c | 74 struct nft_chain *chain = priv->data.verdict.chain; in nft_immediate_init() local 79 err = nf_tables_bind_chain(ctx, chain); in nft_immediate_init() 101 struct nft_chain *chain; in nft_immediate_activate() local 108 chain = data->verdict.chain; in nft_immediate_activate() 109 if (!nft_chain_binding(chain)) in nft_immediate_activate() 113 chain_ctx.chain = chain; in nft_immediate_activate() 115 list_for_each_entry(rule, &chain->rules, list) in nft_immediate_activate() 118 nft_clear(ctx->net, chain); in nft_immediate_activate() 129 struct nft_chain *chain, in nft_immediate_chain_deactivate() argument 136 chain_ctx.chain = chain; in nft_immediate_chain_deactivate() [all …]
|
H A D | nf_tables_offload.c | 268 static int nft_flow_offload_cmd(const struct nft_chain *chain, in nft_flow_offload_cmd() 277 if (!nft_is_base_chain(chain)) in nft_flow_offload_cmd() 280 basechain = nft_base_chain(chain); in nft_flow_offload_cmd() 288 static int nft_flow_offload_rule(const struct nft_chain *chain, in nft_flow_offload_rule() 295 return nft_flow_offload_cmd(chain, rule, flow, command, &cls_flow); in nft_flow_rule_stats() 298 int nft_flow_rule_stats(const struct nft_chain *chain, in nft_flow_rule_stats() 305 err = nft_flow_offload_cmd(chain, rule, NULL, FLOW_CLS_STATS, in nft_flow_rule_stats() 331 struct nft_chain *chain; in nft_flow_offload_unbind() 334 chain = &basechain->chain; in nft_flow_offload_unbind() 264 nft_flow_offload_cmd(const struct nft_chain * chain,const struct nft_rule * rule,struct nft_flow_rule * flow,enum flow_cls_command command,struct flow_cls_offload * cls_flow) nft_flow_offload_cmd() argument 284 nft_flow_offload_rule(const struct nft_chain * chain,struct nft_rule * rule,struct nft_flow_rule * flow,enum flow_cls_command command) nft_flow_offload_rule() argument 294 nft_flow_rule_stats(const struct nft_chain * chain,const struct nft_rule * rule) nft_flow_rule_stats() argument 327 struct nft_chain *chain; nft_flow_offload_unbind() local 383 nft_block_offload_cmd(struct nft_base_chain * chain,struct net_device * dev,enum flow_block_command cmd) nft_block_offload_cmd() argument 490 nft_flow_offload_chain(struct nft_chain * chain,u8 * ppolicy,enum flow_block_command cmd) nft_flow_offload_chain() argument 627 struct nft_chain *chain; __nft_offload_get_chain() local 663 struct nft_chain *chain; nft_offload_netdev_event() local [all...] |
H A D | nf_tables_api.c | 137 struct nft_chain *chain, in nft_ctx_init() argument 144 ctx->chain = chain; in nft_ctx_init() 239 struct nft_chain *chain, bool bind) in __nft_chain_trans_bind() argument 245 if (!nft_chain_binding(chain)) in __nft_chain_trans_bind() 252 if (nft_trans_chain(trans) == chain) in __nft_chain_trans_bind() 256 if (nft_trans_rule_chain(trans) == chain) in __nft_chain_trans_bind() 264 struct nft_chain *chain) in nft_chain_trans_bind() argument 266 __nft_chain_trans_bind(ctx, chain, true); in nft_chain_trans_bind() 269 int nf_tables_bind_chain(const struct nft_ctx *ctx, struct nft_chain *chain) in nf_tables_bind_chain() argument 271 if (!nft_chain_binding(chain)) in nf_tables_bind_chain() [all …]
|
/linux/net/sched/ |
H A D | cls_api.c | 54 const struct tcf_chain *chain; member 91 n->chain_index = tp->chain->index; in tcf_exts_miss_cookie_base_alloc() 92 n->chain = tp->chain; in tcf_exts_miss_cookie_base_alloc() 174 return jhash_3words(tp->chain->index, tp->prio, in destroy_obj_hashfn() 178 static void tcf_proto_signal_destroying(struct tcf_chain *chain, in tcf_proto_signal_destroying() argument 181 struct tcf_block *block = chain->block; in tcf_proto_signal_destroying() 192 return tp1->chain->index == tp2->chain->index && in tcf_proto_cmp() 197 static bool tcf_proto_exists_destroying(struct tcf_chain *chain, in tcf_proto_exists_destroying() argument 205 hash_for_each_possible_rcu(chain->block->proto_destroy_ht, iter, in tcf_proto_exists_destroying() 218 tcf_proto_signal_destroyed(struct tcf_chain *chain, struct tcf_proto *tp) in tcf_proto_signal_destroyed() argument [all …]
|
/linux/kernel/ |
H A D | notifier.c | 13 * Notifier chain core routines. The exported routines below 55 * @nl: Pointer to head of the blocking notifier chain 102 * @nl: Pointer to head of the blocking notifier chain 108 * NOTE: It is important the @nl chain doesn't change between the two 128 * Atomic notifier chain routines. Registration and unregistration 133 * atomic_notifier_chain_register - Add notifier to an atomic notifier chain 134 * @nh: Pointer to head of the atomic notifier chain 135 * @n: New entry in notifier chain 137 * Adds a notifier to an atomic notifier chain. 155 * atomic_notifier_chain_register_unique_prio - Add notifier to an atomic notifier chain [all …]
|
/linux/net/batman-adv/ |
H A D | fragmentation.c | 31 * batadv_frag_clear_chain() - delete entries in the fragment buffer chain 32 * @head: head of chain with entries. 33 * @dropped: whether the chain is cleared because all fragments are dropped 62 struct batadv_frag_table_entry *chain; in batadv_frag_purge_orig() local 66 chain = &orig_node->fragments[i]; in batadv_frag_purge_orig() 67 spin_lock_bh(&chain->lock); in batadv_frag_purge_orig() 69 if (!check_cb || check_cb(chain)) { in batadv_frag_purge_orig() 70 batadv_frag_clear_chain(&chain->fragment_list, true); in batadv_frag_purge_orig() 71 chain->size = 0; in batadv_frag_purge_orig() 74 spin_unlock_bh(&chain->lock); in batadv_frag_purge_orig() [all …]
|
/linux/include/linux/qed/ |
H A D | qed_chain.h | 22 /* Chain is a single page (next ptr) is not required */ 30 QED_CHAIN_USE_TO_PRODUCE, /* Chain starts empty */ 31 QED_CHAIN_USE_TO_CONSUME, /* Chain starts full */ 32 QED_CHAIN_USE_TO_CONSUME_PRODUCE, /* Chain starts empty */ 36 /* The chain's size/prod/cons are kept in 16-bit variables */ 39 /* The chain's size/prod/cons are kept in 32-bit variables */ 76 /* Fastpath portion of the chain - required for commands such 88 * chain pages, respectively to the physical addresses 120 /* Slowpath of the chain - required for initialization and destruction, 133 /* Address of first page of the chain - the address is required [all …]
|
/linux/drivers/s390/cio/ |
H A D | vfio_ccw_cp.c | 34 /* Guest physical address of the current chain. */ 36 /* Count of the valid ccws in chain. */ 294 * @head: address of the beginning of a CCW chain 295 * @len: number of CCWs within the chain 297 * Determine whether the address of a CCW (whether a new chain, 320 struct ccwchain *chain; in ccwchain_alloc() local 322 chain = kzalloc(sizeof(*chain), GFP_KERNEL); in ccwchain_alloc() 323 if (!chain) in ccwchain_alloc() 326 chain->ch_ccw = kcalloc(len, sizeof(*chain->ch_ccw), GFP_DMA | GFP_KERNEL); in ccwchain_alloc() 327 if (!chain->ch_ccw) in ccwchain_alloc() [all …]
|
/linux/include/linux/ |
H A D | dma-fence-chain.h | 3 * fence-chain: chain fences together in a timeline 18 * struct dma_fence_chain - fence to represent an node of a fence chain 20 * @prev: previous fence of the chain 35 * complection of the fence chain. Never used at the same time 74 * inside the chain object, otherwise it returns the fence itself. 79 struct dma_fence_chain *chain = to_dma_fence_chain(fence); in dma_fence_chain_contained() local 81 return chain ? chain->fence : fence; in dma_fence_chain_contained() 98 * @chain: chain node to free 105 static inline void dma_fence_chain_free(struct dma_fence_chain *chain) in dma_fence_chain_free() argument 107 kfree(chain); in dma_fence_chain_free() [all …]
|
/linux/fs/minix/ |
H A D | itree_common.c | 33 Indirect chain[DEPTH], in get_branch() 37 Indirect *p = chain; in get_branch() 42 add_chain (chain, NULL, i_data(inode) + *offsets); in get_branch() 50 if (!verify_chain(chain, p)) in get_branch() 116 Indirect chain[DEPTH], in splice_branch() 125 if (!verify_chain(chain, where-1) || *where->p) in splice_branch() 157 Indirect chain[DEPTH]; in get_block() local 166 partial = get_branch(inode, depth, offsets, chain, &err); in get_block() 171 map_bh(bh, inode->i_sb, block_to_cpu(chain[depth-1].key)); in get_block() 173 partial = chain+depth-1; /* the whole chain */ in get_block() [all …]
|
/linux/tools/testing/selftests/drivers/net/ocelot/ |
H A D | tc_flower_chains.sh | 19 # Helpers to map a VCAP IS1 and VCAP IS2 lookup and policy to a chain number 93 # separate chain number. For correct rule offloading, it is mandatory that each 97 # A chain can only be used if there is a GOTO action correctly set up from the 117 tc filter add dev $eth ingress chain 0 pref 49152 flower \ 118 skip_sw action goto chain $(IS1 0) 119 tc filter add dev $eth ingress chain $(IS1 0) pref 49152 \ 120 flower skip_sw action goto chain $(IS1 1) 121 tc filter add dev $eth ingress chain $(IS1 1) pref 49152 \ 122 flower skip_sw action goto chain $(IS1 2) 123 tc filter add dev $eth ingress chain $(IS1 2) pref 49152 \ [all …]
|
/linux/fs/xfs/ |
H A D | xfs_hooks.c | 15 /* Initialize a notifier chain. */ 18 struct xfs_hooks *chain) in xfs_hooks_init() argument 20 BLOCKING_INIT_NOTIFIER_HEAD(&chain->head); in xfs_hooks_init() 26 struct xfs_hooks *chain, in xfs_hooks_add() argument 32 return blocking_notifier_chain_register(&chain->head, &hook->nb); in xfs_hooks_add() 38 struct xfs_hooks *chain, in xfs_hooks_del() argument 41 blocking_notifier_chain_unregister(&chain->head, &hook->nb); in xfs_hooks_del() 47 struct xfs_hooks *chain, in xfs_hooks_call() argument 51 return blocking_notifier_call_chain(&chain->head, val, priv); in xfs_hooks_call()
|
/linux/tools/testing/selftests/tc-testing/tc-tests/infra/ |
H A D | filter.json | 4 … "name": "Soft lockup alarm will be not generated after delete the prio 0 filter of the chain", 7 "chain" 14 "$TC chain add dev $DUMMY", 15 "$TC filter del dev $DUMMY chain 0 parent 1: prio 0" 17 "cmdUnderTest": "$TC filter add dev $DUMMY chain 0 parent 1:", 19 "verifyCmd": "$TC chain ls dev $DUMMY", 20 "matchPattern": "chain parent 1: chain 0",
|
/linux/fs/ext4/ |
H A D | indirect.c | 115 * ext4_get_branch - read the chain of indirect blocks leading to data 117 * @depth: depth of the chain (1 - direct pointer, etc.) 119 * @chain: place to store the result 124 * (incomplete one) otherwise. Upon the return chain[i].key contains 125 * the number of (i+1)-th block in the chain (as it is stored in memory, 126 * i.e. little-endian 32-bit), chain[i].p contains the address of that 128 * for i>0) and chain[i].bh points to the buffer_head of i-th indirect 130 * numbers of the chain, addresses they were taken from (and where we can 131 * verify that chain did not change) and buffer_heads hosting these 139 * the whole chain, all way to the data (returns %NULL, *err == 0). [all …]
|
/linux/fs/lockd/ |
H A D | host.c | 37 #define for_each_host(host, chain, table) \ argument 38 for ((chain) = (table); \ 39 (chain) < (table) + NLM_HOST_NRHASH; ++(chain)) \ 40 hlist_for_each_entry((host), (chain), h_hash) 42 #define for_each_host_safe(host, next, chain, table) \ argument 43 for ((chain) = (table); \ 44 (chain) < (table) + NLM_HOST_NRHASH; ++(chain)) \ 46 (chain), h_hash) 236 struct hlist_head *chain; in nlmclnt_lookup_host() local 247 chain = &nlm_client_hosts[nlm_hash_address(sap)]; in nlmclnt_lookup_host() [all …]
|
/linux/fs/ext2/ |
H A D | inode.c | 206 * ext2_get_branch - read the chain of indirect blocks leading to data 208 * @depth: depth of the chain (1 - direct pointer, etc.) 210 * @chain: place to store the result 215 * (incomplete one) otherwise. Upon the return chain[i].key contains 216 * the number of (i+1)-th block in the chain (as it is stored in memory, 217 * i.e. little-endian 32-bit), chain[i].p contains the address of that 219 * for i>0) and chain[i].bh points to the buffer_head of i-th indirect 221 * numbers of the chain, addresses they were taken from (and where we can 222 * verify that chain did not change) and buffer_heads hosting these 229 * or when it notices that chain had been changed while it was reading [all …]
|
/linux/tools/testing/selftests/net/netfilter/ |
H A D | nft_queue.sh | 5 # 2. support running nfqueue from more than one base chain 92 chain nfq { 96 chain pre { 100 chain input { 104 chain forward { 109 chain output { 115 chain post { 128 chain pre { 132 chain input { 136 chain forwar [all...] |
/linux/tools/testing/selftests/tc-testing/tc-tests/filters/ |
H A D | flow.json | 18 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst … 40 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst.… 62 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst … 84 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst … 106 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys dst … 128 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys src … 150 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys prot… 172 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys prot… 194 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys prot… 216 …"matchPattern": "filter parent ffff: protocol ip pref 1 flow chain [0-9]+ handle 0x1 map keys iif … [all …]
|
/linux/drivers/mtd/ |
H A D | inftlcore.c | 196 * This function is used when the give Virtual Unit Chain. 257 "Virtual Unit Chain %d!\n", thisVUC); in INFTL_foldchain() 263 * 512-byte block within the Chain. in INFTL_foldchain() 299 "Unit Chain 0x%x\n", thisVUC); in INFTL_foldchain() 308 * Chain, and the Erase Unit into which we are supposed to be copying. in INFTL_foldchain() 311 pr_debug("INFTL: folding chain %d into unit %d\n", thisVUC, targetEUN); in INFTL_foldchain() 356 * Newest unit in chain now contains data from _all_ older units. in INFTL_foldchain() 357 * So go through and erase each unit in chain, oldest first. (This in INFTL_foldchain() 361 pr_debug("INFTL: want to erase virtual chain %d\n", thisVUC); in INFTL_foldchain() 364 /* Find oldest unit in chain. */ in INFTL_foldchain() [all …]
|