* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 12:45 ` Eric Dumazet
@ 2012-09-20 12:46 ` Eric Dumazet
2012-09-20 12:50 ` Johannes Berg
2012-09-20 12:47 ` Johannes Berg
2012-09-20 12:58 ` Artem Bityutskiy
2 siblings, 1 reply; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 12:46 UTC (permalink / raw)
To: Johannes Berg; +Cc: artem.bityutskiy, linux-wireless, netdev
Or its the lines with CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS ?
What arch is it ?
On Thu, Sep 20, 2012 at 2:45 PM, Eric Dumazet <edumazet@google.com> wrote:
> I guess you only need to make sure 14 bytes of ethernet header are
> available before eth_type_trans(skb, dev);
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 61c621e..ffe5f84 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1795,9 +1795,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>
> if (skb) {
> /* deliver to local stack */
> - skb->protocol = eth_type_trans(skb, dev);
> - memset(skb->cb, 0, sizeof(skb->cb));
> - netif_receive_skb(skb);
> + if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
> + skb->protocol = eth_type_trans(skb, dev);
> + memset(skb->cb, 0, sizeof(skb->cb));
> + netif_receive_skb(skb);
> + } else {
> + kfree_skb(skb);
> + }
> }
> }
>
>
> On Thu, Sep 20, 2012 at 2:40 PM, Eric Dumazet <edumazet@google.com> wrote:
>> OK, but which netif_receive_skb(), as I count 5 occurrences in
>> net/mac80211/rx.c ?
>>
>> Instead of skb_linearize() calls
>>
>> you could try several values of XXX in
>>
>> pskb_may_pull(skb, XXX)
>>
>> So that you make sure XXX bytes are available in skb->head, and not
>> the whole frame.
>>
>> One you know the limit for XXX, it might give a clue where a
>> pskb_may_pull(skb, XXX) is missing.
>>
>> On Thu, Sep 20, 2012 at 2:35 PM, Johannes Berg
>> <johannes@sipsolutions.net> wrote:
>>> Hi,
>>>
>>>> > 56138f5 iwlwifi: dont pull too much payload in skb head
>>>> > 3edaf3e mac80211: manage AP netdev carrier state
>>>>
>>>> The second patch (AP carrier state) actually exposed a connman issue
>>>> which I fixed and submitted a connman patch:
>>>> http://lists.connman.net/pipermail/connman/2012-September/011232.html
>>>>
>>>> However, Eric's patch still causes tethering problems to me.
>>>
>>>
>>> Let me recap a bit. Artem is using connman, which sets up the wifi
>>> interface as part of a bridge. It runs wpa_supplicant to create an AP
>>> (only AP and mesh mode interfaces can be bridged anyway).
>>>
>>>
>>> Eric, you said:
>>>
>>>> I would say some part of the stack assumes a header (I dont know wich
>>>> one ?) is pulled in skb->head/data, and thats a bug.
>>>>
>>>> Always use pskb_may_pull(skb, XXX) to make sure you can access XXX
>>>> bytes in skb->data
>>>
>>> I thought we'd figure out which part of the stack assumes a header, so I
>>> asked Artem to test a one-line patch which adds "skb_linearize()" before
>>> "netif_receive_skb()" in mac80211. This makes it work, but I'm not sure
>>> where after that the bad assumption might be.
>>>
>>> johannes
>>>
^ permalink raw reply [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 12:45 ` Eric Dumazet
2012-09-20 12:46 ` Eric Dumazet
@ 2012-09-20 12:47 ` Johannes Berg
2012-09-20 12:48 ` Eric Dumazet
2012-09-20 12:51 ` Johannes Berg
2012-09-20 12:58 ` Artem Bityutskiy
2 siblings, 2 replies; 58+ messages in thread
From: Johannes Berg @ 2012-09-20 12:47 UTC (permalink / raw)
To: Eric Dumazet; +Cc: artem.bityutskiy, linux-wireless, netdev
On Thu, 2012-09-20 at 14:45 +0200, Eric Dumazet wrote:
> I guess you only need to make sure 14 bytes of ethernet header are
> available before eth_type_trans(skb, dev);
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 61c621e..ffe5f84 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1795,9 +1795,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>
> if (skb) {
> /* deliver to local stack */
> - skb->protocol = eth_type_trans(skb, dev);
> - memset(skb->cb, 0, sizeof(skb->cb));
> - netif_receive_skb(skb);
> + if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
> + skb->protocol = eth_type_trans(skb, dev);
> + memset(skb->cb, 0, sizeof(skb->cb));
> + netif_receive_skb(skb);
> + } else {
> + kfree_skb(skb);
> + }
> }
> }
Yeah I was looking at the same code just now. However, we had actually
inserted the skb_linearize() *after* eth_type_trans(), so I'm confused.
Maybe it still works, more or less by accident?
johannes
^ permalink raw reply [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 12:48 ` Eric Dumazet
0 siblings, 0 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 12:48 UTC (permalink / raw)
To: Johannes Berg; +Cc: artem.bityutskiy, linux-wireless, netdev
Or its a buggy protocol ?
IP/UDP/TCP definitely works, but maybe another protocol assumes its
header is in skb->head
On Thu, Sep 20, 2012 at 2:47 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2012-09-20 at 14:45 +0200, Eric Dumazet wrote:
>> I guess you only need to make sure 14 bytes of ethernet header are
>> available before eth_type_trans(skb, dev);
>>
>> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
>> index 61c621e..ffe5f84 100644
>> --- a/net/mac80211/rx.c
>> +++ b/net/mac80211/rx.c
>> @@ -1795,9 +1795,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>>
>> if (skb) {
>> /* deliver to local stack */
>> - skb->protocol = eth_type_trans(skb, dev);
>> - memset(skb->cb, 0, sizeof(skb->cb));
>> - netif_receive_skb(skb);
>> + if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
>> + skb->protocol = eth_type_trans(skb, dev);
>> + memset(skb->cb, 0, sizeof(skb->cb));
>> + netif_receive_skb(skb);
>> + } else {
>> + kfree_skb(skb);
>> + }
>> }
>> }
>
> Yeah I was looking at the same code just now. However, we had actually
> inserted the skb_linearize() *after* eth_type_trans(), so I'm confused.
> Maybe it still works, more or less by accident?
>
> johannes
>
^ permalink raw reply [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 12:48 ` Eric Dumazet
0 siblings, 0 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 12:48 UTC (permalink / raw)
To: Johannes Berg
Cc: artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev
Or its a buggy protocol ?
IP/UDP/TCP definitely works, but maybe another protocol assumes its
header is in skb->head
On Thu, Sep 20, 2012 at 2:47 PM, Johannes Berg
<johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote:
> On Thu, 2012-09-20 at 14:45 +0200, Eric Dumazet wrote:
>> I guess you only need to make sure 14 bytes of ethernet header are
>> available before eth_type_trans(skb, dev);
>>
>> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
>> index 61c621e..ffe5f84 100644
>> --- a/net/mac80211/rx.c
>> +++ b/net/mac80211/rx.c
>> @@ -1795,9 +1795,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>>
>> if (skb) {
>> /* deliver to local stack */
>> - skb->protocol = eth_type_trans(skb, dev);
>> - memset(skb->cb, 0, sizeof(skb->cb));
>> - netif_receive_skb(skb);
>> + if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
>> + skb->protocol = eth_type_trans(skb, dev);
>> + memset(skb->cb, 0, sizeof(skb->cb));
>> + netif_receive_skb(skb);
>> + } else {
>> + kfree_skb(skb);
>> + }
>> }
>> }
>
> Yeah I was looking at the same code just now. However, we had actually
> inserted the skb_linearize() *after* eth_type_trans(), so I'm confused.
> Maybe it still works, more or less by accident?
>
> johannes
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 12:48 ` Eric Dumazet
(?)
@ 2012-09-20 12:50 ` Johannes Berg
2012-09-20 12:51 ` Eric Dumazet
-1 siblings, 1 reply; 58+ messages in thread
From: Johannes Berg @ 2012-09-20 12:50 UTC (permalink / raw)
To: Eric Dumazet; +Cc: artem.bityutskiy, linux-wireless, netdev
On Thu, 2012-09-20 at 14:48 +0200, Eric Dumazet wrote:
> Or its a buggy protocol ?
>
> IP/UDP/TCP definitely works, but maybe another protocol assumes its
> header is in skb->head
It could be, I think it failed either on EAPOL (which is just userspace
registering a protocol socket) or DHCP (same?)
johannes
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 12:51 ` Eric Dumazet
0 siblings, 0 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 12:51 UTC (permalink / raw)
To: Johannes Berg; +Cc: artem.bityutskiy, linux-wireless, netdev
So its using a RAW socket ?
On Thu, Sep 20, 2012 at 2:50 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2012-09-20 at 14:48 +0200, Eric Dumazet wrote:
>> Or its a buggy protocol ?
>>
>> IP/UDP/TCP definitely works, but maybe another protocol assumes its
>> header is in skb->head
>
> It could be, I think it failed either on EAPOL (which is just userspace
> registering a protocol socket) or DHCP (same?)
>
> johannes
>
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 12:51 ` Eric Dumazet
0 siblings, 0 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 12:51 UTC (permalink / raw)
To: Johannes Berg
Cc: artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev
So its using a RAW socket ?
On Thu, Sep 20, 2012 at 2:50 PM, Johannes Berg
<johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote:
> On Thu, 2012-09-20 at 14:48 +0200, Eric Dumazet wrote:
>> Or its a buggy protocol ?
>>
>> IP/UDP/TCP definitely works, but maybe another protocol assumes its
>> header is in skb->head
>
> It could be, I think it failed either on EAPOL (which is just userspace
> registering a protocol socket) or DHCP (same?)
>
> johannes
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 12:54 ` Johannes Berg
0 siblings, 0 replies; 58+ messages in thread
From: Johannes Berg @ 2012-09-20 12:54 UTC (permalink / raw)
To: Eric Dumazet; +Cc: artem.bityutskiy, linux-wireless, netdev
On Thu, 2012-09-20 at 14:51 +0200, Eric Dumazet wrote:
> So its using a RAW socket ?
Yes:
socket(PF_PACKET, SOCK_RAW, htons(ETH_P_EAPOL))
johannes
> On Thu, Sep 20, 2012 at 2:50 PM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> > On Thu, 2012-09-20 at 14:48 +0200, Eric Dumazet wrote:
> >> Or its a buggy protocol ?
> >>
> >> IP/UDP/TCP definitely works, but maybe another protocol assumes its
> >> header is in skb->head
> >
> > It could be, I think it failed either on EAPOL (which is just userspace
> > registering a protocol socket) or DHCP (same?)
> >
> > johannes
> >
>
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 12:54 ` Johannes Berg
0 siblings, 0 replies; 58+ messages in thread
From: Johannes Berg @ 2012-09-20 12:54 UTC (permalink / raw)
To: Eric Dumazet
Cc: artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA,
linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev
On Thu, 2012-09-20 at 14:51 +0200, Eric Dumazet wrote:
> So its using a RAW socket ?
Yes:
socket(PF_PACKET, SOCK_RAW, htons(ETH_P_EAPOL))
johannes
> On Thu, Sep 20, 2012 at 2:50 PM, Johannes Berg
> <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org> wrote:
> > On Thu, 2012-09-20 at 14:48 +0200, Eric Dumazet wrote:
> >> Or its a buggy protocol ?
> >>
> >> IP/UDP/TCP definitely works, but maybe another protocol assumes its
> >> header is in skb->head
> >
> > It could be, I think it failed either on EAPOL (which is just userspace
> > registering a protocol socket) or DHCP (same?)
> >
> > johannes
> >
>
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 12:47 ` Johannes Berg
2012-09-20 12:48 ` Eric Dumazet
@ 2012-09-20 12:51 ` Johannes Berg
1 sibling, 0 replies; 58+ messages in thread
From: Johannes Berg @ 2012-09-20 12:51 UTC (permalink / raw)
To: Eric Dumazet; +Cc: artem.bityutskiy, linux-wireless, netdev
On Thu, 2012-09-20 at 14:47 +0200, Johannes Berg wrote:
> > if (skb) {
> > /* deliver to local stack */
> > - skb->protocol = eth_type_trans(skb, dev);
> > - memset(skb->cb, 0, sizeof(skb->cb));
> > - netif_receive_skb(skb);
> > + if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
> > + skb->protocol = eth_type_trans(skb, dev);
> > + memset(skb->cb, 0, sizeof(skb->cb));
> > + netif_receive_skb(skb);
> > + } else {
> > + kfree_skb(skb);
> > + }
> > }
> > }
>
> Yeah I was looking at the same code just now. However, we had actually
> inserted the skb_linearize() *after* eth_type_trans(), so I'm confused.
Ok actually, by the time we get here the ethernet header must be in the
skb head because we construct it from the 802.11 and llc/snap header.
johannes
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 12:58 ` Artem Bityutskiy
0 siblings, 0 replies; 58+ messages in thread
From: Artem Bityutskiy @ 2012-09-20 12:58 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Johannes Berg, linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]
On Thu, 2012-09-20 at 14:45 +0200, Eric Dumazet wrote:
> I guess you only need to make sure 14 bytes of ethernet header are
> available before eth_type_trans(skb, dev);
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 61c621e..ffe5f84 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1795,9 +1795,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>
> if (skb) {
> /* deliver to local stack */
> - skb->protocol = eth_type_trans(skb, dev);
> - memset(skb->cb, 0, sizeof(skb->cb));
> - netif_receive_skb(skb);
> + if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
> + skb->protocol = eth_type_trans(skb, dev);
> + memset(skb->cb, 0, sizeof(skb->cb));
> + netif_receive_skb(skb);
> + } else {
> + kfree_skb(skb);
> + }
> }
> }
Does not help, this one does:
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 61c621e..6888586 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1797,6 +1797,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
/* deliver to local stack */
skb->protocol = eth_type_trans(skb, dev);
memset(skb->cb, 0, sizeof(skb->cb));
+ skb_linearize(skb);
netif_receive_skb(skb);
}
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 12:58 ` Artem Bityutskiy
0 siblings, 0 replies; 58+ messages in thread
From: Artem Bityutskiy @ 2012-09-20 12:58 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Johannes Berg, linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev
[-- Attachment #1: Type: text/plain, Size: 1569 bytes --]
On Thu, 2012-09-20 at 14:45 +0200, Eric Dumazet wrote:
> I guess you only need to make sure 14 bytes of ethernet header are
> available before eth_type_trans(skb, dev);
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 61c621e..ffe5f84 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1795,9 +1795,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>
> if (skb) {
> /* deliver to local stack */
> - skb->protocol = eth_type_trans(skb, dev);
> - memset(skb->cb, 0, sizeof(skb->cb));
> - netif_receive_skb(skb);
> + if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
> + skb->protocol = eth_type_trans(skb, dev);
> + memset(skb->cb, 0, sizeof(skb->cb));
> + netif_receive_skb(skb);
> + } else {
> + kfree_skb(skb);
> + }
> }
> }
Does not help, this one does:
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 61c621e..6888586 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1797,6 +1797,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
/* deliver to local stack */
skb->protocol = eth_type_trans(skb, dev);
memset(skb->cb, 0, sizeof(skb->cb));
+ skb_linearize(skb);
netif_receive_skb(skb);
}
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 13:04 ` Eric Dumazet
0 siblings, 0 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 13:04 UTC (permalink / raw)
To: artem.bityutskiy; +Cc: Johannes Berg, linux-wireless, netdev
Try to pull 40 bytes : Thats OK for tcp performance, because 40 bytes
is the minimum size of IP+TCP headers
pskb_may_pull(skb, 40);
(instead of your skb_linearize(skb);)
On Thu, Sep 20, 2012 at 2:58 PM, Artem Bityutskiy
<artem.bityutskiy@linux.intel.com> wrote:
> On Thu, 2012-09-20 at 14:45 +0200, Eric Dumazet wrote:
>> I guess you only need to make sure 14 bytes of ethernet header are
>> available before eth_type_trans(skb, dev);
>>
>> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
>> index 61c621e..ffe5f84 100644
>> --- a/net/mac80211/rx.c
>> +++ b/net/mac80211/rx.c
>> @@ -1795,9 +1795,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>>
>> if (skb) {
>> /* deliver to local stack */
>> - skb->protocol = eth_type_trans(skb, dev);
>> - memset(skb->cb, 0, sizeof(skb->cb));
>> - netif_receive_skb(skb);
>> + if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
>> + skb->protocol = eth_type_trans(skb, dev);
>> + memset(skb->cb, 0, sizeof(skb->cb));
>> + netif_receive_skb(skb);
>> + } else {
>> + kfree_skb(skb);
>> + }
>> }
>> }
>
> Does not help, this one does:
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 61c621e..6888586 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1797,6 +1797,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
> /* deliver to local stack */
> skb->protocol = eth_type_trans(skb, dev);
> memset(skb->cb, 0, sizeof(skb->cb));
> + skb_linearize(skb);
> netif_receive_skb(skb);
> }
>
> --
> Best Regards,
> Artem Bityutskiy
^ permalink raw reply [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 13:04 ` Eric Dumazet
0 siblings, 0 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 13:04 UTC (permalink / raw)
To: artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA
Cc: Johannes Berg, linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev
Try to pull 40 bytes : Thats OK for tcp performance, because 40 bytes
is the minimum size of IP+TCP headers
pskb_may_pull(skb, 40);
(instead of your skb_linearize(skb);)
On Thu, Sep 20, 2012 at 2:58 PM, Artem Bityutskiy
<artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> wrote:
> On Thu, 2012-09-20 at 14:45 +0200, Eric Dumazet wrote:
>> I guess you only need to make sure 14 bytes of ethernet header are
>> available before eth_type_trans(skb, dev);
>>
>> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
>> index 61c621e..ffe5f84 100644
>> --- a/net/mac80211/rx.c
>> +++ b/net/mac80211/rx.c
>> @@ -1795,9 +1795,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>>
>> if (skb) {
>> /* deliver to local stack */
>> - skb->protocol = eth_type_trans(skb, dev);
>> - memset(skb->cb, 0, sizeof(skb->cb));
>> - netif_receive_skb(skb);
>> + if (pskb_may_pull(skb, sizeof(struct ethhdr))) {
>> + skb->protocol = eth_type_trans(skb, dev);
>> + memset(skb->cb, 0, sizeof(skb->cb));
>> + netif_receive_skb(skb);
>> + } else {
>> + kfree_skb(skb);
>> + }
>> }
>> }
>
> Does not help, this one does:
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 61c621e..6888586 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1797,6 +1797,7 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
> /* deliver to local stack */
> skb->protocol = eth_type_trans(skb, dev);
> memset(skb->cb, 0, sizeof(skb->cb));
> + skb_linearize(skb);
> netif_receive_skb(skb);
> }
>
> --
> Best Regards,
> Artem Bityutskiy
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 13:15 ` Eric Dumazet
0 siblings, 0 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 13:15 UTC (permalink / raw)
To: Eric Dumazet; +Cc: artem.bityutskiy, Johannes Berg, linux-wireless, netdev
On Thu, 2012-09-20 at 15:04 +0200, Eric Dumazet wrote:
> Try to pull 40 bytes : Thats OK for tcp performance, because 40 bytes
> is the minimum size of IP+TCP headers
>
> pskb_may_pull(skb, 40);
>
> (instead of your skb_linearize(skb);)
Oh well, I just realize all these mails were on netdev.
Sorry for the noise.
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-20 13:15 ` Eric Dumazet
0 siblings, 0 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 13:15 UTC (permalink / raw)
To: Eric Dumazet
Cc: artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA, Johannes Berg,
linux-wireless-u79uwXL29TY76Z2rM5mHXA, netdev
On Thu, 2012-09-20 at 15:04 +0200, Eric Dumazet wrote:
> Try to pull 40 bytes : Thats OK for tcp performance, because 40 bytes
> is the minimum size of IP+TCP headers
>
> pskb_may_pull(skb, 40);
>
> (instead of your skb_linearize(skb);)
Oh well, I just realize all these mails were on netdev.
Sorry for the noise.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 13:04 ` Eric Dumazet
(?)
(?)
@ 2012-09-20 13:22 ` Artem Bityutskiy
2012-09-20 13:22 ` Eric Dumazet
2012-09-20 14:25 ` Eric Dumazet
-1 siblings, 2 replies; 58+ messages in thread
From: Artem Bityutskiy @ 2012-09-20 13:22 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Johannes Berg, linux-wireless, netdev
[-- Attachment #1: Type: text/plain, Size: 1178 bytes --]
On Thu, 2012-09-20 at 15:04 +0200, Eric Dumazet wrote:
> Try to pull 40 bytes : Thats OK for tcp performance, because 40 bytes
> is the minimum size of IP+TCP headers
>
> pskb_may_pull(skb, 40);
OK, I've tried almost this (see below) and it solves my issue:
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 965e6ec..7f079d0 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1798,9 +1798,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
if (skb) {
/* deliver to local stack */
- skb->protocol = eth_type_trans(skb, dev);
- memset(skb->cb, 0, sizeof(skb->cb));
- netif_receive_skb(skb);
+ if (pskb_may_pull(skb, 40)) {
+ skb->protocol = eth_type_trans(skb, dev);
+ memset(skb->cb, 0, sizeof(skb->cb));
+ netif_receive_skb(skb);
+ } else {
+ kfree_skb(skb);
+ }
}
}
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 13:22 ` Artem Bityutskiy
@ 2012-09-20 13:22 ` Eric Dumazet
2012-09-20 13:39 ` Artem Bityutskiy
2012-09-20 14:25 ` Eric Dumazet
1 sibling, 1 reply; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 13:22 UTC (permalink / raw)
To: artem.bityutskiy; +Cc: Eric Dumazet, Johannes Berg, linux-wireless, netdev
On Thu, 2012-09-20 at 16:22 +0300, Artem Bityutskiy wrote:
>
> OK, I've tried almost this (see below) and it solves my issue:
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 965e6ec..7f079d0 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1798,9 +1798,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>
> if (skb) {
> /* deliver to local stack */
> - skb->protocol = eth_type_trans(skb, dev);
> - memset(skb->cb, 0, sizeof(skb->cb));
> - netif_receive_skb(skb);
> + if (pskb_may_pull(skb, 40)) {
> + skb->protocol = eth_type_trans(skb, dev);
> + memset(skb->cb, 0, sizeof(skb->cb));
> + netif_receive_skb(skb);
> + } else {
> + kfree_skb(skb);
> + }
> }
> }
>
OK but you cant do that, or small frames will be dropped.
Anyway its a hack, we should find the buggy layer.
You could use dropwatch (drop_monitor) to check where frame is dropped.
modprobe drop_monitor
dropwatch -l kas
^ permalink raw reply [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 13:22 ` Eric Dumazet
@ 2012-09-20 13:39 ` Artem Bityutskiy
2012-09-20 13:41 ` Eric Dumazet
0 siblings, 1 reply; 58+ messages in thread
From: Artem Bityutskiy @ 2012-09-20 13:39 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Eric Dumazet, Johannes Berg, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1577 bytes --]
On Thu, 2012-09-20 at 15:22 +0200, Eric Dumazet wrote:
> On Thu, 2012-09-20 at 16:22 +0300, Artem Bityutskiy wrote:
>
> >
> > OK, I've tried almost this (see below) and it solves my issue:
> >
> > diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> > index 965e6ec..7f079d0 100644
> > --- a/net/mac80211/rx.c
> > +++ b/net/mac80211/rx.c
> > @@ -1798,9 +1798,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
> >
> > if (skb) {
> > /* deliver to local stack */
> > - skb->protocol = eth_type_trans(skb, dev);
> > - memset(skb->cb, 0, sizeof(skb->cb));
> > - netif_receive_skb(skb);
> > + if (pskb_may_pull(skb, 40)) {
> > + skb->protocol = eth_type_trans(skb, dev);
> > + memset(skb->cb, 0, sizeof(skb->cb));
> > + netif_receive_skb(skb);
> > + } else {
> > + kfree_skb(skb);
> > + }
> > }
> > }
> >
>
> OK but you cant do that, or small frames will be dropped.
>
> Anyway its a hack, we should find the buggy layer.
>
> You could use dropwatch (drop_monitor) to check where frame is dropped.
>
> modprobe drop_monitor
> dropwatch -l kas
I do not have dropwatch in Tizen, I need to find the sources and compile
the user-space part. Any hint where to download it?
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 13:39 ` Artem Bityutskiy
@ 2012-09-20 13:41 ` Eric Dumazet
0 siblings, 0 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 13:41 UTC (permalink / raw)
To: artem.bityutskiy; +Cc: Eric Dumazet, Johannes Berg, linux-wireless
On Thu, 2012-09-20 at 16:39 +0300, Artem Bityutskiy wrote:
> On Thu, 2012-09-20 at 15:22 +0200, Eric Dumazet wrote:
> > OK but you cant do that, or small frames will be dropped.
> >
> > Anyway its a hack, we should find the buggy layer.
> >
> > You could use dropwatch (drop_monitor) to check where frame is dropped.
> >
> > modprobe drop_monitor
> > dropwatch -l kas
>
> I do not have dropwatch in Tizen, I need to find the sources and compile
> the user-space part. Any hint where to download it?
>
https://fedorahosted.org/dropwatch/
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 13:22 ` Artem Bityutskiy
2012-09-20 13:22 ` Eric Dumazet
@ 2012-09-20 14:25 ` Eric Dumazet
2012-09-20 14:37 ` Artem Bityutskiy
2012-09-21 17:24 ` David Miller
1 sibling, 2 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 14:25 UTC (permalink / raw)
To: artem.bityutskiy; +Cc: Eric Dumazet, Johannes Berg, linux-wireless, netdev
On Thu, 2012-09-20 at 16:22 +0300, Artem Bityutskiy wrote:
> On Thu, 2012-09-20 at 15:04 +0200, Eric Dumazet wrote:
> > Try to pull 40 bytes : Thats OK for tcp performance, because 40 bytes
> > is the minimum size of IP+TCP headers
> >
> > pskb_may_pull(skb, 40);
>
> OK, I've tried almost this (see below) and it solves my issue:
>
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 965e6ec..7f079d0 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -1798,9 +1798,13 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
>
> if (skb) {
> /* deliver to local stack */
> - skb->protocol = eth_type_trans(skb, dev);
> - memset(skb->cb, 0, sizeof(skb->cb));
> - netif_receive_skb(skb);
> + if (pskb_may_pull(skb, 40)) {
> + skb->protocol = eth_type_trans(skb, dev);
> + memset(skb->cb, 0, sizeof(skb->cb));
> + netif_receive_skb(skb);
> + } else {
> + kfree_skb(skb);
> + }
> }
> }
>
Please remove this hack and try the following bugfix in raw handler
icmp_filter() should not modify skb, or else its caller should not
assume ip_hdr() is unchanged.
net/ipv4/raw.c | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index f242578..3fa8c96 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -128,25 +128,30 @@ found:
}
/*
- * 0 - deliver
- * 1 - block
+ * false - deliver
+ * true - block
*/
-static __inline__ int icmp_filter(struct sock *sk, struct sk_buff *skb)
+static bool icmp_filter(struct sock *sk, const struct sk_buff *skb)
{
- int type;
-
- if (!pskb_may_pull(skb, sizeof(struct icmphdr)))
- return 1;
-
- type = icmp_hdr(skb)->type;
- if (type < 32) {
+ __u8 _type;
+ const __u8 *type;
+
+ type = skb_header_pointer(skb,
+ skb_transport_offset(skb) +
+ offsetof(struct icmphdr, type),
+ sizeof(_type),
+ &_type);
+ if (!type)
+ return true;
+
+ if (*type < 32) {
__u32 data = raw_sk(sk)->filter.data;
- return ((1 << type) & data) != 0;
+ return ((1U << *type) & data) != 0;
}
/* Do not block unknown ICMP types */
- return 0;
+ return false;
}
/* IP input processing comes here for RAW socket delivery.
^ permalink raw reply related [flat|nested] 58+ messages in thread* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 14:25 ` Eric Dumazet
@ 2012-09-20 14:37 ` Artem Bityutskiy
2012-09-20 14:56 ` Eric Dumazet
2012-09-21 17:24 ` David Miller
1 sibling, 1 reply; 58+ messages in thread
From: Artem Bityutskiy @ 2012-09-20 14:37 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Eric Dumazet, Johannes Berg, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 293 bytes --]
On Thu, 2012-09-20 at 16:25 +0200, Eric Dumazet wrote:
> Please remove this hack and try the following bugfix in raw handler
>
> icmp_filter() should not modify skb, or else its caller should not
> assume ip_hdr() is unchanged.
Did not help :(
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 14:37 ` Artem Bityutskiy
@ 2012-09-20 14:56 ` Eric Dumazet
2012-09-20 15:05 ` Johannes Berg
2012-09-20 15:09 ` Artem Bityutskiy
0 siblings, 2 replies; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 14:56 UTC (permalink / raw)
To: artem.bityutskiy; +Cc: Eric Dumazet, Johannes Berg, linux-wireless
On Thu, 2012-09-20 at 17:37 +0300, Artem Bityutskiy wrote:
> On Thu, 2012-09-20 at 16:25 +0200, Eric Dumazet wrote:
> > Please remove this hack and try the following bugfix in raw handler
> >
> > icmp_filter() should not modify skb, or else its caller should not
> > assume ip_hdr() is unchanged.
>
> Did not help :(
>
What gives (after some failures)
cat /proc/net/raw
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 14:56 ` Eric Dumazet
@ 2012-09-20 15:05 ` Johannes Berg
2012-09-20 15:18 ` Eric Dumazet
2012-09-20 15:19 ` Eric Dumazet
2012-09-20 15:09 ` Artem Bityutskiy
1 sibling, 2 replies; 58+ messages in thread
From: Johannes Berg @ 2012-09-20 15:05 UTC (permalink / raw)
To: Eric Dumazet; +Cc: artem.bityutskiy, Eric Dumazet, linux-wireless
On Thu, 2012-09-20 at 16:56 +0200, Eric Dumazet wrote:
> On Thu, 2012-09-20 at 17:37 +0300, Artem Bityutskiy wrote:
> > On Thu, 2012-09-20 at 16:25 +0200, Eric Dumazet wrote:
> > > Please remove this hack and try the following bugfix in raw handler
> > >
> > > icmp_filter() should not modify skb, or else its caller should not
> > > assume ip_hdr() is unchanged.
> >
> > Did not help :(
> >
>
> What gives (after some failures)
>
> cat /proc/net/raw
Note I think the failing packets are dhcp packets, and connman seems to
use an AF_INET, SOCK_DGRAM, IPPROTO_UDP socket for those, and binds it
to the right device. I'd be quite surprised though if UDP code had
issues with paged Rx??
johannes
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 15:05 ` Johannes Berg
@ 2012-09-20 15:18 ` Eric Dumazet
2012-09-20 15:22 ` Johannes Berg
2012-09-20 15:19 ` Eric Dumazet
1 sibling, 1 reply; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 15:18 UTC (permalink / raw)
To: Johannes Berg; +Cc: artem.bityutskiy, Eric Dumazet, linux-wireless
On Thu, 2012-09-20 at 17:05 +0200, Johannes Berg wrote:
> On Thu, 2012-09-20 at 16:56 +0200, Eric Dumazet wrote:
> > On Thu, 2012-09-20 at 17:37 +0300, Artem Bityutskiy wrote:
> > > On Thu, 2012-09-20 at 16:25 +0200, Eric Dumazet wrote:
> > > > Please remove this hack and try the following bugfix in raw handler
> > > >
> > > > icmp_filter() should not modify skb, or else its caller should not
> > > > assume ip_hdr() is unchanged.
> > >
> > > Did not help :(
> > >
> >
> > What gives (after some failures)
> >
> > cat /proc/net/raw
>
> Note I think the failing packets are dhcp packets, and connman seems to
> use an AF_INET, SOCK_DGRAM, IPPROTO_UDP socket for those, and binds it
> to the right device. I'd be quite surprised though if UDP code had
> issues with paged Rx??
>
> johannes
>
You told me : socket(PF_PACKET, SOCK_RAW, htons(ETH_P_EAPOL))
So I looked at raw code.
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 15:18 ` Eric Dumazet
@ 2012-09-20 15:22 ` Johannes Berg
2012-09-20 15:27 ` Eric Dumazet
0 siblings, 1 reply; 58+ messages in thread
From: Johannes Berg @ 2012-09-20 15:22 UTC (permalink / raw)
To: Eric Dumazet; +Cc: artem.bityutskiy, Eric Dumazet, linux-wireless
On Thu, 2012-09-20 at 17:18 +0200, Eric Dumazet wrote:
> > Note I think the failing packets are dhcp packets, and connman seems to
> > use an AF_INET, SOCK_DGRAM, IPPROTO_UDP socket for those, and binds it
> > to the right device. I'd be quite surprised though if UDP code had
> > issues with paged Rx??
> You told me : socket(PF_PACKET, SOCK_RAW, htons(ETH_P_EAPOL))
>
> So I looked at raw code.
and even found an issue. Artem wasn't really sure, but looking at his
information again it seems that the EAPOL packets (those on the raw
sockets) do go through, and then DHCP fails. In the printk he did for
me, I can see that the EAPOL packets are small enough to get pulled in
completely in iwlwifi, and the bigger DHCP packets (~600 bytes) only go
through if we linearize them.
johannes
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 15:22 ` Johannes Berg
@ 2012-09-20 15:27 ` Eric Dumazet
2012-09-20 15:31 ` Eric Dumazet
0 siblings, 1 reply; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 15:27 UTC (permalink / raw)
To: Johannes Berg; +Cc: artem.bityutskiy, Eric Dumazet, linux-wireless
On Thu, 2012-09-20 at 17:22 +0200, Johannes Berg wrote:
> On Thu, 2012-09-20 at 17:18 +0200, Eric Dumazet wrote:
>
> > > Note I think the failing packets are dhcp packets, and connman seems to
> > > use an AF_INET, SOCK_DGRAM, IPPROTO_UDP socket for those, and binds it
> > > to the right device. I'd be quite surprised though if UDP code had
> > > issues with paged Rx??
>
> > You told me : socket(PF_PACKET, SOCK_RAW, htons(ETH_P_EAPOL))
> >
> > So I looked at raw code.
>
> and even found an issue. Artem wasn't really sure, but looking at his
> information again it seems that the EAPOL packets (those on the raw
> sockets) do go through, and then DHCP fails. In the printk he did for
> me, I can see that the EAPOL packets are small enough to get pulled in
> completely in iwlwifi, and the bigger DHCP packets (~600 bytes) only go
> through if we linearize them.
OK, its a bug in UDP, I'll send a patch asap.
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 15:27 ` Eric Dumazet
@ 2012-09-20 15:31 ` Eric Dumazet
2012-09-20 15:32 ` Eric Dumazet
0 siblings, 1 reply; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 15:31 UTC (permalink / raw)
To: Johannes Berg; +Cc: artem.bityutskiy, Eric Dumazet, linux-wireless
On Thu, 2012-09-20 at 17:27 +0200, Eric Dumazet wrote:
> On Thu, 2012-09-20 at 17:22 +0200, Johannes Berg wrote:
> > On Thu, 2012-09-20 at 17:18 +0200, Eric Dumazet wrote:
> >
> > > > Note I think the failing packets are dhcp packets, and connman seems to
> > > > use an AF_INET, SOCK_DGRAM, IPPROTO_UDP socket for those, and binds it
> > > > to the right device. I'd be quite surprised though if UDP code had
> > > > issues with paged Rx??
> >
> > > You told me : socket(PF_PACKET, SOCK_RAW, htons(ETH_P_EAPOL))
> > >
> > > So I looked at raw code.
> >
> > and even found an issue. Artem wasn't really sure, but looking at his
> > information again it seems that the EAPOL packets (those on the raw
> > sockets) do go through, and then DHCP fails. In the printk he did for
> > me, I can see that the EAPOL packets are small enough to get pulled in
> > completely in iwlwifi, and the bigger DHCP packets (~600 bytes) only go
> > through if we linearize them.
>
> OK, its a bug in UDP, I'll send a patch asap.
Oh well, false alarm.
Artem, could you send one capture of one such DHCP big packet ?
tcpdump -p -n -s 2000 -i wlanX -X
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 15:05 ` Johannes Berg
2012-09-20 15:18 ` Eric Dumazet
@ 2012-09-20 15:19 ` Eric Dumazet
2012-09-20 15:26 ` Johannes Berg
1 sibling, 1 reply; 58+ messages in thread
From: Eric Dumazet @ 2012-09-20 15:19 UTC (permalink / raw)
To: Johannes Berg; +Cc: artem.bityutskiy, Eric Dumazet, linux-wireless
On Thu, 2012-09-20 at 17:05 +0200, Johannes Berg wrote:
> Note I think the failing packets are dhcp packets, and connman seems to
> use an AF_INET, SOCK_DGRAM, IPPROTO_UDP socket for those, and binds it
> to the right device. I'd be quite surprised though if UDP code had
> issues with paged Rx??
>
It could be a checksum issue ?
"netstat -s" could give a clue...
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 15:19 ` Eric Dumazet
@ 2012-09-20 15:26 ` Johannes Berg
0 siblings, 0 replies; 58+ messages in thread
From: Johannes Berg @ 2012-09-20 15:26 UTC (permalink / raw)
To: Eric Dumazet; +Cc: artem.bityutskiy, Eric Dumazet, linux-wireless
On Thu, 2012-09-20 at 17:19 +0200, Eric Dumazet wrote:
> On Thu, 2012-09-20 at 17:05 +0200, Johannes Berg wrote:
>
> > Note I think the failing packets are dhcp packets, and connman seems to
> > use an AF_INET, SOCK_DGRAM, IPPROTO_UDP socket for those, and binds it
> > to the right device. I'd be quite surprised though if UDP code had
> > issues with paged Rx??
> >
>
> It could be a checksum issue ?
Hmm, would paged RX make a difference there? But I guess it could be,
our packets are all CHECKSUM_NONE.
johannes
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 14:56 ` Eric Dumazet
2012-09-20 15:05 ` Johannes Berg
@ 2012-09-20 15:09 ` Artem Bityutskiy
1 sibling, 0 replies; 58+ messages in thread
From: Artem Bityutskiy @ 2012-09-20 15:09 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Eric Dumazet, Johannes Berg, linux-wireless
[-- Attachment #1: Type: text/plain, Size: 658 bytes --]
On Thu, 2012-09-20 at 16:56 +0200, Eric Dumazet wrote:
> On Thu, 2012-09-20 at 17:37 +0300, Artem Bityutskiy wrote:
> > On Thu, 2012-09-20 at 16:25 +0200, Eric Dumazet wrote:
> > > Please remove this hack and try the following bugfix in raw handler
> > >
> > > icmp_filter() should not modify skb, or else its caller should not
> > > assume ip_hdr() is unchanged.
> >
> > Did not help :(
> >
>
> What gives (after some failures)
>
> cat /proc/net/raw
-sh-4.1# cat /proc/net/raw
sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops
--
Best Regards,
Artem Bityutskiy
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
2012-09-20 14:25 ` Eric Dumazet
@ 2012-09-21 17:24 ` David Miller
2012-09-21 17:24 ` David Miller
1 sibling, 0 replies; 58+ messages in thread
From: David Miller @ 2012-09-21 17:24 UTC (permalink / raw)
To: eric.dumazet; +Cc: artem.bityutskiy, edumazet, johannes, linux-wireless, netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 20 Sep 2012 16:25:49 +0200
> Please remove this hack and try the following bugfix in raw handler
>
> icmp_filter() should not modify skb, or else its caller should not
> assume ip_hdr() is unchanged.
Right, good catch.
Please submit this fix formally Eric, thanks a lot.
^ permalink raw reply [flat|nested] 58+ messages in thread
* Re: regression: tethering fails in 3.5 with iwlwifi
@ 2012-09-21 17:24 ` David Miller
0 siblings, 0 replies; 58+ messages in thread
From: David Miller @ 2012-09-21 17:24 UTC (permalink / raw)
To: eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w
Cc: artem.bityutskiy-VuQAYsv1563Yd54FQh9/CA,
edumazet-hpIqsD4AKlfQT0dZR+AlfA, johannes-cdvu00un1VgdHxzADdlk8Q,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA
From: Eric Dumazet <eric.dumazet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Date: Thu, 20 Sep 2012 16:25:49 +0200
> Please remove this hack and try the following bugfix in raw handler
>
> icmp_filter() should not modify skb, or else its caller should not
> assume ip_hdr() is unchanged.
Right, good catch.
Please submit this fix formally Eric, thanks a lot.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 58+ messages in thread