Thread (9 messages) 9 messages, 3 authors, 2023-12-19

Re: [PATCH net v2 2/2] net: ethernet: cortina: Bypass checksumming engine of alien ethertypes

From: Linus Walleij <hidden>
Date: 2023-12-19 14:23:08

On Tue, Dec 19, 2023 at 10:15 AM Eric Dumazet [off-list ref] wrote:
On Tue, Dec 19, 2023 at 12:42 AM Linus Walleij [off-list ref] wrote:
quoted
This is often what we want: DSA switches will "wash" custom ethertypes
before they go out, but in this case the custom ethertype upsets the
ethernet checksum engine used as conduit interface toward the DSA
switch.
 Problem is that your code misses skb_header_pointer() or
pskb_may_pull() call...
Second "ethertype = ntohs(*p);" might access uninitialized data.
Yeah, needs to be done properly and look at skb->len etc.
If this is a common operation, perhaps use a common helper from all drivers,
this would help code review a bit...
You are right, Maxime opened a discussion on it in a parallel,
I'll cook something up!

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help