Lines Matching refs:p
31 struct tcf_skbmod_params *p; in tcf_skbmod_act() local
42 p = rcu_dereference_bh(d->skbmod_p); in tcf_skbmod_act()
43 flags = p->flags; in tcf_skbmod_act()
70 ether_addr_copy(eth_hdr(skb)->h_dest, p->eth_dst); in tcf_skbmod_act()
72 ether_addr_copy(eth_hdr(skb)->h_source, p->eth_src); in tcf_skbmod_act()
74 eth_hdr(skb)->h_proto = p->eth_type; in tcf_skbmod_act()
111 struct tcf_skbmod_params *p, *p_old; in tcf_skbmod_init() local
189 p = kzalloc(sizeof(struct tcf_skbmod_params), GFP_KERNEL); in tcf_skbmod_init()
190 if (unlikely(!p)) { in tcf_skbmod_init()
195 p->flags = lflags; in tcf_skbmod_init()
204 ether_addr_copy(p->eth_dst, daddr); in tcf_skbmod_init()
206 ether_addr_copy(p->eth_src, saddr); in tcf_skbmod_init()
208 p->eth_type = htons(eth_type); in tcf_skbmod_init()
210 rcu_assign_pointer(d->skbmod_p, p); in tcf_skbmod_init()
231 struct tcf_skbmod_params *p; in tcf_skbmod_cleanup() local
233 p = rcu_dereference_protected(d->skbmod_p, 1); in tcf_skbmod_cleanup()
234 if (p) in tcf_skbmod_cleanup()
235 kfree_rcu(p, rcu); in tcf_skbmod_cleanup()
243 struct tcf_skbmod_params *p; in tcf_skbmod_dump() local
253 p = rcu_dereference_protected(d->skbmod_p, in tcf_skbmod_dump()
255 opt.flags = p->flags; in tcf_skbmod_dump()
258 if ((p->flags & SKBMOD_F_DMAC) && in tcf_skbmod_dump()
259 nla_put(skb, TCA_SKBMOD_DMAC, ETH_ALEN, p->eth_dst)) in tcf_skbmod_dump()
261 if ((p->flags & SKBMOD_F_SMAC) && in tcf_skbmod_dump()
262 nla_put(skb, TCA_SKBMOD_SMAC, ETH_ALEN, p->eth_src)) in tcf_skbmod_dump()
264 if ((p->flags & SKBMOD_F_ETYPE) && in tcf_skbmod_dump()
265 nla_put_u16(skb, TCA_SKBMOD_ETYPE, ntohs(p->eth_type))) in tcf_skbmod_dump()