* [PATCH Resend] core: should call pskb_expand_head if skb header is cloned in skb_gso_segment in rx path
@ 2013-04-01 2:37 roy.qing.li
2013-04-02 12:32 ` Cong Wang
0 siblings, 1 reply; 5+ messages in thread
From: roy.qing.li @ 2013-04-01 2:37 UTC (permalink / raw)
To: netdev; +Cc: amwang
From: Li RongQing <roy.qing.li@gmail.com>
12b0004d1d1 (adjust skb_gso_segment() for calling in rx path) tries to kill warnings
by checking if ip_summed is CHECK_NONE or not in rx path, since if skb_gso_segment()
is called on rx path, and ->ip_summed has different meaning.
but this maybe break skb if skb header is cloned, and not expand the header, since when
step into skb_mac_gso_segment(), which will still check ip_summed with CHECKSUM_PARTIAL,
then do gso_send_check(). and after __skb_gso_segment() in queue_gso_packets() of
openvswitch, queue_userspace_packet() still checks ip_summed with CHECKSUM_PARTIAL,
and do checksum.
so I think it is enough to ignore the warning in rx path.
Cc: Cong Wang <amwang@redhat.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
---
net/core/dev.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index de930b7..bf0e586 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2269,17 +2269,6 @@ struct sk_buff *skb_mac_gso_segment(struct sk_buff *skb,
}
EXPORT_SYMBOL(skb_mac_gso_segment);
-
-/* openvswitch calls this on rx path, so we need a different check.
- */
-static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
-{
- if (tx_path)
- return skb->ip_summed != CHECKSUM_PARTIAL;
- else
- return skb->ip_summed == CHECKSUM_NONE;
-}
-
/**
* __skb_gso_segment - Perform segmentation on skb.
* @skb: buffer to segment
@@ -2294,10 +2283,11 @@ static inline bool skb_needs_check(struct sk_buff *skb, bool tx_path)
struct sk_buff *__skb_gso_segment(struct sk_buff *skb,
netdev_features_t features, bool tx_path)
{
- if (unlikely(skb_needs_check(skb, tx_path))) {
+ if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
int err;
- skb_warn_bad_offload(skb);
+ if (tx_path)
+ skb_warn_bad_offload(skb);
if (skb_header_cloned(skb) &&
(err = pskb_expand_head(skb, 0, 0, GFP_ATOMIC)))
--
1.7.10.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH Resend] core: should call pskb_expand_head if skb header is cloned in skb_gso_segment in rx path
2013-04-01 2:37 [PATCH Resend] core: should call pskb_expand_head if skb header is cloned in skb_gso_segment in rx path roy.qing.li
@ 2013-04-02 12:32 ` Cong Wang
2013-04-03 0:51 ` RongQing Li
0 siblings, 1 reply; 5+ messages in thread
From: Cong Wang @ 2013-04-02 12:32 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev
On Mon, 2013-04-01 at 10:37 +0800, roy.qing.li@gmail.com wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
>
> 12b0004d1d1 (adjust skb_gso_segment() for calling in rx path) tries to kill warnings
> by checking if ip_summed is CHECK_NONE or not in rx path, since if skb_gso_segment()
> is called on rx path, and ->ip_summed has different meaning.
>
> but this maybe break skb if skb header is cloned, and not expand the header, since when
> step into skb_mac_gso_segment(), which will still check ip_summed with CHECKSUM_PARTIAL,
> then do gso_send_check(). and after __skb_gso_segment() in queue_gso_packets() of
> openvswitch, queue_userspace_packet() still checks ip_summed with CHECKSUM_PARTIAL,
> and do checksum.
>
> so I think it is enough to ignore the warning in rx path.
>
Did you see any bogus warning triggered by it?
BTW, please Cc all the people involved in the original commit you
mentioned above.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH Resend] core: should call pskb_expand_head if skb header is cloned in skb_gso_segment in rx path
2013-04-02 12:32 ` Cong Wang
@ 2013-04-03 0:51 ` RongQing Li
2013-04-03 1:19 ` Eric Dumazet
0 siblings, 1 reply; 5+ messages in thread
From: RongQing Li @ 2013-04-03 0:51 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev, jesse, pshelar, herbert, edumazet
No, I just read and analyze it, and think it is bogus.
2013/4/2 Cong Wang <amwang@redhat.com>:
> On Mon, 2013-04-01 at 10:37 +0800, roy.qing.li@gmail.com wrote:
>> From: Li RongQing <roy.qing.li@gmail.com>
>>
>> 12b0004d1d1 (adjust skb_gso_segment() for calling in rx path) tries to kill warnings
>> by checking if ip_summed is CHECK_NONE or not in rx path, since if skb_gso_segment()
>> is called on rx path, and ->ip_summed has different meaning.
>>
>> but this maybe break skb if skb header is cloned, and not expand the header, since when
>> step into skb_mac_gso_segment(), which will still check ip_summed with CHECKSUM_PARTIAL,
>> then do gso_send_check(). and after __skb_gso_segment() in queue_gso_packets() of
>> openvswitch, queue_userspace_packet() still checks ip_summed with CHECKSUM_PARTIAL,
>> and do checksum.
>>
>> so I think it is enough to ignore the warning in rx path.
>>
>
> Did you see any bogus warning triggered by it?
>
> BTW, please Cc all the people involved in the original commit you
> mentioned above.
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH Resend] core: should call pskb_expand_head if skb header is cloned in skb_gso_segment in rx path
2013-04-03 0:51 ` RongQing Li
@ 2013-04-03 1:19 ` Eric Dumazet
2013-04-03 1:44 ` RongQing Li
0 siblings, 1 reply; 5+ messages in thread
From: Eric Dumazet @ 2013-04-03 1:19 UTC (permalink / raw)
To: RongQing Li; +Cc: Cong Wang, netdev, jesse, pshelar, herbert, edumazet
On Wed, 2013-04-03 at 08:51 +0800, RongQing Li wrote:
> No, I just read and analyze it, and think it is bogus.
Please rewrite the changelog, because I read it several times and could
not understand it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH Resend] core: should call pskb_expand_head if skb header is cloned in skb_gso_segment in rx path
2013-04-03 1:19 ` Eric Dumazet
@ 2013-04-03 1:44 ` RongQing Li
0 siblings, 0 replies; 5+ messages in thread
From: RongQing Li @ 2013-04-03 1:44 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Cong Wang, netdev, jesse, pshelar, Herbert Xu, edumazet
OK.
2013/4/3 Eric Dumazet <eric.dumazet@gmail.com>:
> On Wed, 2013-04-03 at 08:51 +0800, RongQing Li wrote:
>> No, I just read and analyze it, and think it is bogus.
>
> Please rewrite the changelog, because I read it several times and could
> not understand it.
>
>
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-03 1:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-01 2:37 [PATCH Resend] core: should call pskb_expand_head if skb header is cloned in skb_gso_segment in rx path roy.qing.li
2013-04-02 12:32 ` Cong Wang
2013-04-03 0:51 ` RongQing Li
2013-04-03 1:19 ` Eric Dumazet
2013-04-03 1:44 ` RongQing Li
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).