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=-1.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 A72FFC282CE for ; Tue, 9 Apr 2019 07:58:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F9B62133D for ; Tue, 9 Apr 2019 07:58:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726815AbfDIH6V (ORCPT ); Tue, 9 Apr 2019 03:58:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:61987 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726461AbfDIH6U (ORCPT ); Tue, 9 Apr 2019 03:58:20 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E0344369CA; Tue, 9 Apr 2019 07:58:20 +0000 (UTC) Received: from localhost.localdomain (unknown [10.32.181.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4155A608A7; Tue, 9 Apr 2019 07:58:20 +0000 (UTC) Message-ID: <542d117e1b05aa4b87943e6f705ecf9c19bf96fe.camel@redhat.com> Subject: Re: UDP GRO do not restore ervery UDP Packet From: Paolo Abeni To: Sean Tong , netdev Date: Tue, 09 Apr 2019 09:58:19 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5 (3.30.5-1.fc29) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Tue, 09 Apr 2019 07:58:20 +0000 (UTC) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi, On Tue, 2019-04-09 at 14:09 +0800, Sean Tong wrote: > For example, recvmsg returns a packet size 50 of and gso_size of > 24, so the UDP packets is restored without knowing whether it is > 24+24+2 split into 3 packets or 24+26 split into 2 pakcets. > Is there any way to get the last UDP packet size or number of merged > UDP packets? In the described scenario, the ingress packets lengths are: 24, 24, 2. The sequence 24, 26 is not possible. Generally speaking, if the aggregated packet length is not a multiple of gro_size, the length of the last UDP packet aggregated in the GRO one is: % gso_size. (2, in the above example). If you observe something differnt, it's a bug and must be fixed - please provide detailed setup information, thanks! Paolo