From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0AA4C433B4 for ; Mon, 5 Apr 2021 13:27:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FE65613B2 for ; Mon, 5 Apr 2021 13:27:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237264AbhDEN1k (ORCPT ); Mon, 5 Apr 2021 09:27:40 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:33956 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232694AbhDEN1g (ORCPT ); Mon, 5 Apr 2021 09:27:36 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lTPGL-00EviA-AK; Mon, 05 Apr 2021 15:27:29 +0200 Date: Mon, 5 Apr 2021 15:27:29 +0200 From: Andrew Lunn To: Julian Labus Cc: netdev@vger.kernel.org, mschiffer@universe-factory.net Subject: Re: stmmac: zero udp checksum Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, Apr 05, 2021 at 02:53:15PM +0200, Julian Labus wrote: > Hi all, > > in our community mesh network we recently discovered that a TP-Link Archer > C2600 device is unable to receive IPv6 UDP packets with a zero checksum when > RX checksum offloading is enabled. The device uses ipq806x-gmac-dwmac for > its ethernet ports. > > According to https://tools.ietf.org/html/rfc2460#section-8.1 this sounds > like correct behavior as it says a UDP checksum must not be zero for IPv6 > packets. But this definition was relaxed in > https://tools.ietf.org/html/rfc6935#section-5 to allow zero checksums in > tunneling protocols like VXLAN where we discovered the problem. > > Can the behavior of the stmmac driver be changed to meet RFC6935 or would it > be possible to make the (RX) Checksum Offloading Engine configurable via a > device tree property to disable it in environments were it causes problems? Hi Julian I don't know the stmmac driver at all... Have you played around with ethtool -k/-K? Can use this to turn off hardware checksums? I doubt a DT property would be accepted. What you probably want to do is react on the NETDEV notifiers for when an upper interface is changed. If a VXLAN interface is added, turn off hardware checksums. Andrew