Loading include/linux/skbuff.h +4 −0 Original line number Diff line number Diff line Loading @@ -738,7 +738,11 @@ struct sk_buff { #endif __u8 ipvs_property:1; __u8 inner_protocol_type:1; __u8 fast_forwarded:1; __u8 remcsum_offload:1; /*4 or 6 bit hole */ #ifdef CONFIG_NET_SWITCHDEV __u8 offload_fwd_mark:1; #endif Loading include/net/netfilter/nf_conntrack.h +2 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,8 @@ struct nf_conn { /* Extensions */ struct nf_ct_ext *ext; void *sfe_entry; /* Storage reserved for other modules, must be the last member */ union nf_conntrack_proto proto; }; Loading include/net/netfilter/nf_conntrack_core.h +1 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ bool nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse, const struct nf_conntrack_tuple *orig, const struct nf_conntrack_l3proto *l3proto, const struct nf_conntrack_l4proto *l4proto); extern void (*delete_sfe_entry)(struct nf_conn *ct); /* Find a connection corresponding to a tuple. */ struct nf_conntrack_tuple_hash * Loading net/core/dev.c +12 −0 Original line number Diff line number Diff line Loading @@ -4103,6 +4103,9 @@ static inline int nf_ingress(struct sk_buff *skb, struct packet_type **pt_prev, return 0; } int (*athrs_fast_nat_recv)(struct sk_buff *skb) __rcu __read_mostly; EXPORT_SYMBOL(athrs_fast_nat_recv); static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) { struct packet_type *ptype, *pt_prev; Loading @@ -4111,6 +4114,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) bool deliver_exact = false; int ret = NET_RX_DROP; __be16 type; int (*fast_recv)(struct sk_buff *skb); net_timestamp_check(!netdev_tstamp_prequeue, skb); Loading Loading @@ -4170,6 +4174,14 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) goto out; } #endif fast_recv = rcu_dereference(athrs_fast_nat_recv); if (fast_recv) { if (fast_recv(skb)) { ret = NET_RX_SUCCESS; goto out; } } #ifdef CONFIG_NET_CLS_ACT skb->tc_verd = 0; ncls: Loading net/netfilter/nf_conntrack_core.c +15 −0 Original line number Diff line number Diff line Loading @@ -381,11 +381,15 @@ void nf_ct_tmpl_free(struct nf_conn *tmpl) } EXPORT_SYMBOL_GPL(nf_ct_tmpl_free); void (*delete_sfe_entry)(struct nf_conn *ct) __rcu __read_mostly; EXPORT_SYMBOL(delete_sfe_entry); static void destroy_conntrack(struct nf_conntrack *nfct) { struct nf_conn *ct = (struct nf_conn *)nfct; struct nf_conntrack_l4proto *l4proto; void (*delete_entry)(struct nf_conn *ct); pr_debug("destroy_conntrack(%pK)\n", ct); NF_CT_ASSERT(atomic_read(&nfct->use) == 0); Loading @@ -394,6 +398,17 @@ destroy_conntrack(struct nf_conntrack *nfct) nf_ct_tmpl_free(ct); return; } if (ct->sfe_entry) { delete_entry = rcu_dereference(delete_sfe_entry); if (delete_entry) delete_entry(ct); } /* To make sure we don't get any weird locking issues here: * destroy_conntrack() MUST NOT be called with a write lock * to nf_conntrack_lock!!! -HW */ rcu_read_lock(); l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct)); if (l4proto->destroy) Loading Loading
include/linux/skbuff.h +4 −0 Original line number Diff line number Diff line Loading @@ -738,7 +738,11 @@ struct sk_buff { #endif __u8 ipvs_property:1; __u8 inner_protocol_type:1; __u8 fast_forwarded:1; __u8 remcsum_offload:1; /*4 or 6 bit hole */ #ifdef CONFIG_NET_SWITCHDEV __u8 offload_fwd_mark:1; #endif Loading
include/net/netfilter/nf_conntrack.h +2 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,8 @@ struct nf_conn { /* Extensions */ struct nf_ct_ext *ext; void *sfe_entry; /* Storage reserved for other modules, must be the last member */ union nf_conntrack_proto proto; }; Loading
include/net/netfilter/nf_conntrack_core.h +1 −0 Original line number Diff line number Diff line Loading @@ -50,6 +50,7 @@ bool nf_ct_invert_tuple(struct nf_conntrack_tuple *inverse, const struct nf_conntrack_tuple *orig, const struct nf_conntrack_l3proto *l3proto, const struct nf_conntrack_l4proto *l4proto); extern void (*delete_sfe_entry)(struct nf_conn *ct); /* Find a connection corresponding to a tuple. */ struct nf_conntrack_tuple_hash * Loading
net/core/dev.c +12 −0 Original line number Diff line number Diff line Loading @@ -4103,6 +4103,9 @@ static inline int nf_ingress(struct sk_buff *skb, struct packet_type **pt_prev, return 0; } int (*athrs_fast_nat_recv)(struct sk_buff *skb) __rcu __read_mostly; EXPORT_SYMBOL(athrs_fast_nat_recv); static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) { struct packet_type *ptype, *pt_prev; Loading @@ -4111,6 +4114,7 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) bool deliver_exact = false; int ret = NET_RX_DROP; __be16 type; int (*fast_recv)(struct sk_buff *skb); net_timestamp_check(!netdev_tstamp_prequeue, skb); Loading Loading @@ -4170,6 +4174,14 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) goto out; } #endif fast_recv = rcu_dereference(athrs_fast_nat_recv); if (fast_recv) { if (fast_recv(skb)) { ret = NET_RX_SUCCESS; goto out; } } #ifdef CONFIG_NET_CLS_ACT skb->tc_verd = 0; ncls: Loading
net/netfilter/nf_conntrack_core.c +15 −0 Original line number Diff line number Diff line Loading @@ -381,11 +381,15 @@ void nf_ct_tmpl_free(struct nf_conn *tmpl) } EXPORT_SYMBOL_GPL(nf_ct_tmpl_free); void (*delete_sfe_entry)(struct nf_conn *ct) __rcu __read_mostly; EXPORT_SYMBOL(delete_sfe_entry); static void destroy_conntrack(struct nf_conntrack *nfct) { struct nf_conn *ct = (struct nf_conn *)nfct; struct nf_conntrack_l4proto *l4proto; void (*delete_entry)(struct nf_conn *ct); pr_debug("destroy_conntrack(%pK)\n", ct); NF_CT_ASSERT(atomic_read(&nfct->use) == 0); Loading @@ -394,6 +398,17 @@ destroy_conntrack(struct nf_conntrack *nfct) nf_ct_tmpl_free(ct); return; } if (ct->sfe_entry) { delete_entry = rcu_dereference(delete_sfe_entry); if (delete_entry) delete_entry(ct); } /* To make sure we don't get any weird locking issues here: * destroy_conntrack() MUST NOT be called with a write lock * to nf_conntrack_lock!!! -HW */ rcu_read_lock(); l4proto = __nf_ct_l4proto_find(nf_ct_l3num(ct), nf_ct_protonum(ct)); if (l4proto->destroy) Loading