Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1402510
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions |
| Date | 2016-05-17 20:10 +0200 |
| Message-ID | <rzRBo-7V2-15@gated-at.bofh.it> (permalink) |
| References | <rzE1r-7E7-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: John Stultz <john.stultz@linaro.org>
Date: Mon, 16 May 2016 20:36:15 -0700
> In testing with HiKey, we found that since
> commit 3f30b158eba5 ("asix: On RX avoid creating bad Ethernet
> frames"),
> we're seeing lots of noise during network transfers:
...
> And network throughput ends up being pretty bursty and slow with
> a overall throughput of at best ~30kB/s (where as previously we
> got 1.1MB/s with the slower USB1.1 "full speed" host).
>
> We found the issue also was reproducible on a x86_64 system,
> using a "high-speed" USB2.0 port but the throughput did not
> measurably drop (possibly due to the scp transfer being cpu
> bound on my slow test hardware).
>
> After lots of debugging, I found the check added in the
> problematic commit seems to be calculating the offset
> incorrectly.
>
> In the normal case, in the main loop of the function, we do:
> (where offset is zero, or set to "offset += (copy_length + 1) &
> 0xfffe" in the previous loop)
> rx->header = get_unaligned_le32(skb->data +
> offset);
> offset += sizeof(u32);
>
> But the problematic patch calculates:
> offset = ((rx->remaining + 1) & 0xfffe) + sizeof(u32);
> rx->header = get_unaligned_le32(skb->data + offset);
>
> Adding some debug logic to check those offset calculation used
> to find rx->header, the one in problematic code is always too
> large by sizeof(u32).
>
> Thus, this patch removes the incorrect " + sizeof(u32)" addition
> in the problematic calculation, and resolves the issue.
...
> Reported-by: Yongqin Liu <yongqin.liu@linaro.org>
> Signed-off-by: John Stultz <john.stultz@linaro.org>
Applied.
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions John Stultz <john.stultz@linaro.org> - 2016-05-17 05:40 +0200 Re: [PATCH] asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions David Miller <davem@davemloft.net> - 2016-05-17 20:10 +0200 Re: [PATCH] asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions Dean Jenkins <Dean_Jenkins@mentor.com> - 2016-05-18 01:10 +0200
csiph-web