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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 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 97E58C433E0 for ; Wed, 3 Feb 2021 22:37:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4E3DF64D99 for ; Wed, 3 Feb 2021 22:37:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232852AbhBCWhw (ORCPT ); Wed, 3 Feb 2021 17:37:52 -0500 Received: from michaelblizek.twilightparadox.com ([193.238.157.55]:55746 "EHLO michaelblizek.twilightparadox.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232483AbhBCWhu (ORCPT ); Wed, 3 Feb 2021 17:37:50 -0500 X-Greylist: delayed 953 seconds by postgrey-1.27 at vger.kernel.org; Wed, 03 Feb 2021 17:37:50 EST Received: from localhost ([127.0.0.1] helo=grml) by michaelblizek.twilightparadox.com with esmtp (Exim 4.92) (envelope-from ) id 1l7QWH-0001my-Rb; Wed, 03 Feb 2021 23:21:06 +0100 Date: Wed, 3 Feb 2021 23:21:10 +0100 From: michi1@michaelblizek.twilightparadox.com To: kernelnewbies@kernelnewbies.org, netdev@vger.kernel.org, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, jakub@cloudflare.com, pabeni@redhat.com Subject: Re: UDP implementation and the MSG_MORE flag Message-ID: <20210203222054.6zhq47o7rzjstpdq@grml> References: <20210126141248.GA27281@optiplex> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210126141248.GA27281@optiplex> User-Agent: NeoMutt/20170113 (1.7.2) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi! On 15:12 Tue 26 Jan , Oliver Graute wrote: > Some UDP packets send via the loopback interface are dropped in the > kernel on the receive side when using sendto with the MSG_MORE flag. > Every drop increases the InCsumErrors in /proc/self/net/snmp. Some > example code to reproduce it is appended below. > > In the code we tracked it down to this code section. ( Even a little > further but its unclear to me wy the csum() is wrong in the bad case) I think it is unlikely that the error is on the receiving side. I recommend to capture the data that is being sent with a sniffer and see if there is anything wrong. You may also want to try disabling hardware acceleration on your network devices, because the checksum is sometimes done in hardware. -Michi -- programing a layer 3+4 network protocol for mesh networks see http://michaelblizek.twilightparadox.com