* [Patch net-next] net: remove skb_sender_cpu_clear()
@ 2016-02-28 4:19 Cong Wang
2016-02-29 18:50 ` Daniel Borkmann
2016-03-01 22:36 ` David Miller
0 siblings, 2 replies; 5+ messages in thread
From: Cong Wang @ 2016-02-28 4:19 UTC (permalink / raw)
To: netdev; +Cc: Cong Wang, Eric Dumazet
After commit 52bd2d62ce67 ("net: better skb->sender_cpu and skb->napi_id cohabitation")
skb_sender_cpu_clear() becomes empty and can be removed.
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
---
include/linux/skbuff.h | 4 ----
net/bridge/br_forward.c | 1 -
net/core/filter.c | 2 --
net/core/skbuff.c | 1 -
net/ipv4/ip_forward.c | 1 -
net/ipv6/ip6_output.c | 1 -
net/netfilter/ipvs/ip_vs_xmit.c | 6 ------
net/netfilter/nf_dup_netdev.c | 1 -
net/sched/act_mirred.c | 1 -
9 files changed, 18 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index eab4f8f..797cefb 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -1161,10 +1161,6 @@ static inline void skb_copy_hash(struct sk_buff *to, const struct sk_buff *from)
to->l4_hash = from->l4_hash;
};
-static inline void skb_sender_cpu_clear(struct sk_buff *skb)
-{
-}
-
#ifdef NET_SKBUFF_DATA_USES_OFFSET
static inline unsigned char *skb_end_pointer(const struct sk_buff *skb)
{
diff --git a/net/bridge/br_forward.c b/net/bridge/br_forward.c
index fcdb86d..f47759f 100644
--- a/net/bridge/br_forward.c
+++ b/net/bridge/br_forward.c
@@ -44,7 +44,6 @@ int br_dev_queue_push_xmit(struct net *net, struct sock *sk, struct sk_buff *skb
skb_push(skb, ETH_HLEN);
br_drop_fake_rtable(skb);
- skb_sender_cpu_clear(skb);
if (skb->ip_summed == CHECKSUM_PARTIAL &&
(skb->protocol == htons(ETH_P_8021Q) ||
diff --git a/net/core/filter.c b/net/core/filter.c
index a3aba15..5e2a3b5 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -1597,7 +1597,6 @@ static u64 bpf_clone_redirect(u64 r1, u64 ifindex, u64 flags, u64 r4, u64 r5)
}
skb2->dev = dev;
- skb_sender_cpu_clear(skb2);
return dev_queue_xmit(skb2);
}
@@ -1650,7 +1649,6 @@ int skb_do_redirect(struct sk_buff *skb)
}
skb->dev = dev;
- skb_sender_cpu_clear(skb);
return dev_queue_xmit(skb);
}
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 488566b..7af7ec6 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4302,7 +4302,6 @@ void skb_scrub_packet(struct sk_buff *skb, bool xnet)
skb->skb_iif = 0;
skb->ignore_df = 0;
skb_dst_drop(skb);
- skb_sender_cpu_clear(skb);
secpath_reset(skb);
nf_reset(skb);
nf_reset_trace(skb);
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c
index da0d7ce..af18f1e 100644
--- a/net/ipv4/ip_forward.c
+++ b/net/ipv4/ip_forward.c
@@ -71,7 +71,6 @@ static int ip_forward_finish(struct net *net, struct sock *sk, struct sk_buff *s
if (unlikely(opt->optlen))
ip_forward_options(skb);
- skb_sender_cpu_clear(skb);
return dst_output(net, sk, skb);
}
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index a163102..9428345 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -332,7 +332,6 @@ static int ip6_forward_proxy_check(struct sk_buff *skb)
static inline int ip6_forward_finish(struct net *net, struct sock *sk,
struct sk_buff *skb)
{
- skb_sender_cpu_clear(skb);
return dst_output(net, sk, skb);
}
diff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c
index a3f5cd9..dc196a0 100644
--- a/net/netfilter/ipvs/ip_vs_xmit.c
+++ b/net/netfilter/ipvs/ip_vs_xmit.c
@@ -531,8 +531,6 @@ static inline int ip_vs_tunnel_xmit_prepare(struct sk_buff *skb,
if (ret == NF_ACCEPT) {
nf_reset(skb);
skb_forward_csum(skb);
- if (!skb->sk)
- skb_sender_cpu_clear(skb);
}
return ret;
}
@@ -573,8 +571,6 @@ static inline int ip_vs_nat_send_or_cont(int pf, struct sk_buff *skb,
if (!local) {
skb_forward_csum(skb);
- if (!skb->sk)
- skb_sender_cpu_clear(skb);
NF_HOOK(pf, NF_INET_LOCAL_OUT, cp->ipvs->net, NULL, skb,
NULL, skb_dst(skb)->dev, dst_output);
} else
@@ -595,8 +591,6 @@ static inline int ip_vs_send_or_cont(int pf, struct sk_buff *skb,
if (!local) {
ip_vs_drop_early_demux_sk(skb);
skb_forward_csum(skb);
- if (!skb->sk)
- skb_sender_cpu_clear(skb);
NF_HOOK(pf, NF_INET_LOCAL_OUT, cp->ipvs->net, NULL, skb,
NULL, skb_dst(skb)->dev, dst_output);
} else
diff --git a/net/netfilter/nf_dup_netdev.c b/net/netfilter/nf_dup_netdev.c
index 8414ee1..7ec6972 100644
--- a/net/netfilter/nf_dup_netdev.c
+++ b/net/netfilter/nf_dup_netdev.c
@@ -31,7 +31,6 @@ void nf_dup_netdev_egress(const struct nft_pktinfo *pkt, int oif)
skb_push(skb, skb->mac_len);
skb->dev = dev;
- skb_sender_cpu_clear(skb);
dev_queue_xmit(skb);
}
EXPORT_SYMBOL_GPL(nf_dup_netdev_egress);
diff --git a/net/sched/act_mirred.c b/net/sched/act_mirred.c
index 6b284d9..e8a760c 100644
--- a/net/sched/act_mirred.c
+++ b/net/sched/act_mirred.c
@@ -182,7 +182,6 @@ static int tcf_mirred(struct sk_buff *skb, const struct tc_action *a,
skb2->skb_iif = skb->dev->ifindex;
skb2->dev = dev;
- skb_sender_cpu_clear(skb2);
err = dev_queue_xmit(skb2);
if (err) {
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Patch net-next] net: remove skb_sender_cpu_clear()
2016-02-28 4:19 [Patch net-next] net: remove skb_sender_cpu_clear() Cong Wang
@ 2016-02-29 18:50 ` Daniel Borkmann
2016-02-29 18:55 ` Cong Wang
2016-03-01 22:36 ` David Miller
1 sibling, 1 reply; 5+ messages in thread
From: Daniel Borkmann @ 2016-02-29 18:50 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, Eric Dumazet
On 02/28/2016 05:19 AM, Cong Wang wrote:
> After commit 52bd2d62ce67 ("net: better skb->sender_cpu and skb->napi_id cohabitation")
> skb_sender_cpu_clear() becomes empty and can be removed.
>
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Wasn't the intention to keep this helper as a marker when packet
crosses domains from RX to TX, see discussion here:
https://patchwork.ozlabs.org/patch/527167/
Maybe better to rename it and add a comment into the helper to
make the intention more clear?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch net-next] net: remove skb_sender_cpu_clear()
2016-02-29 18:50 ` Daniel Borkmann
@ 2016-02-29 18:55 ` Cong Wang
2016-02-29 19:30 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: Cong Wang @ 2016-02-29 18:55 UTC (permalink / raw)
To: Daniel Borkmann; +Cc: Linux Kernel Network Developers, Eric Dumazet
On Mon, Feb 29, 2016 at 10:50 AM, Daniel Borkmann <daniel@iogearbox.net> wrote:
> On 02/28/2016 05:19 AM, Cong Wang wrote:
>>
>> After commit 52bd2d62ce67 ("net: better skb->sender_cpu and skb->napi_id
>> cohabitation")
>> skb_sender_cpu_clear() becomes empty and can be removed.
>>
>> Cc: Eric Dumazet <edumazet@google.com>
>> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
>
>
> Wasn't the intention to keep this helper as a marker when packet
> crosses domains from RX to TX, see discussion here:
>
> https://patchwork.ozlabs.org/patch/527167/
>
> Maybe better to rename it and add a comment into the helper to
> make the intention more clear?
Since when we need an empty function to mark some call path?
Isn't this supposed to be done by comments or documents?
BTW, I myself even don't think we need any comment, people
who touches it should understand it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch net-next] net: remove skb_sender_cpu_clear()
2016-02-29 18:55 ` Cong Wang
@ 2016-02-29 19:30 ` Eric Dumazet
0 siblings, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2016-02-29 19:30 UTC (permalink / raw)
To: Cong Wang; +Cc: Daniel Borkmann, Linux Kernel Network Developers, Eric Dumazet
On lun., 2016-02-29 at 10:55 -0800, Cong Wang wrote:
> On Mon, Feb 29, 2016 at 10:50 AM, Daniel Borkmann <daniel@iogearbox.net> wrote:
> > On 02/28/2016 05:19 AM, Cong Wang wrote:
> >>
> >> After commit 52bd2d62ce67 ("net: better skb->sender_cpu and skb->napi_id
> >> cohabitation")
> >> skb_sender_cpu_clear() becomes empty and can be removed.
> >>
> >> Cc: Eric Dumazet <edumazet@google.com>
> >> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
> >
> >
> > Wasn't the intention to keep this helper as a marker when packet
> > crosses domains from RX to TX, see discussion here:
> >
> > https://patchwork.ozlabs.org/patch/527167/
> >
> > Maybe better to rename it and add a comment into the helper to
> > make the intention more clear?
>
> Since when we need an empty function to mark some call path?
> Isn't this supposed to be done by comments or documents?
>
> BTW, I myself even don't think we need any comment, people
> who touches it should understand it.
I have no objections for this patch.
If we keep the helper, a better name would be needed anyway.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Patch net-next] net: remove skb_sender_cpu_clear()
2016-02-28 4:19 [Patch net-next] net: remove skb_sender_cpu_clear() Cong Wang
2016-02-29 18:50 ` Daniel Borkmann
@ 2016-03-01 22:36 ` David Miller
1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2016-03-01 22:36 UTC (permalink / raw)
To: xiyou.wangcong; +Cc: netdev, edumazet
From: Cong Wang <xiyou.wangcong@gmail.com>
Date: Sat, 27 Feb 2016 20:19:54 -0800
> After commit 52bd2d62ce67 ("net: better skb->sender_cpu and skb->napi_id cohabitation")
> skb_sender_cpu_clear() becomes empty and can be removed.
>
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-03-01 22:37 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-28 4:19 [Patch net-next] net: remove skb_sender_cpu_clear() Cong Wang
2016-02-29 18:50 ` Daniel Borkmann
2016-02-29 18:55 ` Cong Wang
2016-02-29 19:30 ` Eric Dumazet
2016-03-01 22:36 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).