RE: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-09 Thread David Laight
From: Sven Van Asbroeck > Sent: 08 April 2021 19:35 ... > - buffer_length = netdev->mtu + ETH_HLEN + 4 + RX_HEAD_PADDING; > + buffer_length = netdev->mtu + ETH_HLEN + ETH_FCS_LEN + > RX_HEAD_PADDING; I'd try to write the lengths in the order they happen, so: buffer_length =

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Sven Van Asbroeck
Hi Heiner, On Thu, Apr 8, 2021 at 3:06 PM Heiner Kallweit wrote: > > A completely unrelated question: > How about VLAN packets with a 802.1Q tag? Should VLAN_ETH_HLEN be used? That's a good question. My use-case does not involve 802.1Q though, so I'm unable to test. Thank you so much for your

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Sven Van Asbroeck
Hi George, On Thu, Apr 8, 2021 at 3:55 PM George McCollister wrote: > > Works for me too. Sounds good. I'll post a proper patch soon. Would you be able to review+test, and perhaps offer your Reviewed-by/Tested-by tags when everything looks ok?

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread George McCollister
On Thu, Apr 8, 2021 at 1:35 PM Sven Van Asbroeck wrote: > > Hi George, > > On Thu, Apr 8, 2021 at 2:26 PM Sven Van Asbroeck wrote: > > > > George, I will send a patch for you to try shortly. Except if you're > > already ahead :) > > Would this work for you? It does for me. Works for me too. >

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Heiner Kallweit
On 08.04.2021 20:35, Sven Van Asbroeck wrote: > Hi George, > > On Thu, Apr 8, 2021 at 2:26 PM Sven Van Asbroeck wrote: >> >> George, I will send a patch for you to try shortly. Except if you're >> already ahead :) > > Would this work for you? It does for me. > > diff --git

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Sven Van Asbroeck
Hi George, On Thu, Apr 8, 2021 at 2:26 PM Sven Van Asbroeck wrote: > > George, I will send a patch for you to try shortly. Except if you're > already ahead :) Would this work for you? It does for me. diff --git a/drivers/net/ethernet/microchip/lan743x_main.c

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Sven Van Asbroeck
Hi Heiner, On Thu, Apr 8, 2021 at 2:22 PM Heiner Kallweit wrote: > > Just an idea: > RX_HEAD_PADDING is an alias for NET_IP_ALIGN that can have two values: > 0 and 2 > The two systems you use may have different NET_IP_ALIGN values. > This could explain the behavior. Then what I proposed should

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Heiner Kallweit
On 08.04.2021 20:00, George McCollister wrote: > On Thu, Apr 8, 2021 at 12:46 PM Sven Van Asbroeck wrote: >> >> Hi George, >> >> On Thu, Apr 8, 2021 at 1:36 PM George McCollister >> wrote: >>> >>> Can you explain the difference in behavior with what I was observing >>> on the LAN7431? >> >> I'm

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread George McCollister
On Thu, Apr 8, 2021 at 12:46 PM Sven Van Asbroeck wrote: > > Hi George, > > On Thu, Apr 8, 2021 at 1:36 PM George McCollister > wrote: > > > > Can you explain the difference in behavior with what I was observing > > on the LAN7431? > > I'm not using DSA in my application, so I cannot test or

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Sven Van Asbroeck
Hi Heiner, On Thu, Apr 8, 2021 at 1:49 PM Heiner Kallweit wrote: > > Can't we use frame_length - ETH_FCS_LEN direcctly here? If the hard-coded "4" refers to ETH_FCS_LEN, then yes, good point. I'd love to find out first why George and I need different patches to make the driver work in our use

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Heiner Kallweit
On 08.04.2021 19:23, Sven Van Asbroeck wrote: > From: Sven Van Asbroeck > > This reverts commit 3e21a10fdea3c2e4e4d1b72cb9d720256461af40. > > The reverted patch completely breaks all network connectivity on the > lan7430. tcpdump indicates missing bytes when receiving ping > packets from an

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Sven Van Asbroeck
Hi George, On Thu, Apr 8, 2021 at 1:36 PM George McCollister wrote: > > Can you explain the difference in behavior with what I was observing > on the LAN7431? I'm not using DSA in my application, so I cannot test or replicate what you were observing. It would be great if we could work together

Re: [PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread George McCollister
On Thu, Apr 8, 2021 at 12:23 PM Sven Van Asbroeck wrote: > > From: Sven Van Asbroeck > > This reverts commit 3e21a10fdea3c2e4e4d1b72cb9d720256461af40. > > The reverted patch completely breaks all network connectivity on the > lan7430. tcpdump indicates missing bytes when receiving ping > packets

[PATCH net v1] Revert "lan743x: trim all 4 bytes of the FCS; not just 2"

2021-04-08 Thread Sven Van Asbroeck
From: Sven Van Asbroeck This reverts commit 3e21a10fdea3c2e4e4d1b72cb9d720256461af40. The reverted patch completely breaks all network connectivity on the lan7430. tcpdump indicates missing bytes when receiving ping packets from an external host: host$ ping $lan7430_ip lan7430$ tcpdump -v IP