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=-6.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 3A8DFC4338F for ; Thu, 5 Aug 2021 11:16:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0A03F600EF for ; Thu, 5 Aug 2021 11:16:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240915AbhHELQ5 (ORCPT ); Thu, 5 Aug 2021 07:16:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22662 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232896AbhHELQ4 (ORCPT ); Thu, 5 Aug 2021 07:16:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628162202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TvYf6JeSrexJi0pFzsjFiMQmytuab3M1Qq9LIkhFhkw=; b=cdqjL2TNawfVHwGbpaRbNuiBnxpH6r6U9DwfGKIS5UJHsY01O9gaPAsYvYBkatls7tUVFS CwCVdigaXsVpkCqtes+wZhZL7gZvzJ0eqQ8e2fpr4+u92VMQmpYfLY3734IiJlXezX1b31 x1GpkLF2y1pV+BTlTZE2SRt262l2BAw= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-58-3b1PTw8TN0OJaaL_MjeGDw-1; Thu, 05 Aug 2021 07:16:40 -0400 X-MC-Unique: 3b1PTw8TN0OJaaL_MjeGDw-1 Received: by mail-wm1-f69.google.com with SMTP id f25-20020a1c6a190000b029024fa863f6b0so2878915wmc.1 for ; Thu, 05 Aug 2021 04:16:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=TvYf6JeSrexJi0pFzsjFiMQmytuab3M1Qq9LIkhFhkw=; b=FTPuzRuAVjqwiInAY4mUeoldlOpcujRAdGEsJ4O8iW5edvjmJDkFdnXhDnySBtM778 Mjb1/GR1CPwgn/YIPuWuClsxDyied5dxPbOAMiZKjkUtnov1gFLZ2uEC4rjbFHLzv44R 1G1IlWPKiyVmJS0vkB/Gb2fn+V78lZJFCYfYgAneygY9QuFzbtGdNrmu7ftPrZOKGfDv U/2u/zHho9sj3FAnZAsPkZPLlJgtl2WXW5NNfsDdbhVecHfLVvW/7Jb8nH8gMlt0jjXX yv0Vba9AsKb1cWSh3MXPAM1WwNBqGZo1Ewv96w9EraFQi959S0R6KQiYIugiUsjVz0ej OX7A== X-Gm-Message-State: AOAM531VOw6iZGHLZODCZZ1pjh/cJs6MioxC4C9NWElmoZykNqTa4+yW ajpKOck3j0R7kXMRcjizxe+m63wE0E8NWpX2sCdewBCt3Lfg3mrNlNkPaZ7vgXSAXGiJ+AwheDJ 9Y2Mkgzo2AC9tWi8w X-Received: by 2002:a05:6000:1ce:: with SMTP id t14mr4665306wrx.83.1628162199469; Thu, 05 Aug 2021 04:16:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyVgvsoNQV/bS6Uw9JXoK/4B/Y+a5WrCEgdUSWHDIdIv/1JmeMl7d9FcGboUW1kWuZbWsUZOA== X-Received: by 2002:a05:6000:1ce:: with SMTP id t14mr4665286wrx.83.1628162199290; Thu, 05 Aug 2021 04:16:39 -0700 (PDT) Received: from gerbillo.redhat.com (146-241-240-144.dyn.eolo.it. [146.241.240.144]) by smtp.gmail.com with ESMTPSA id m9sm5718187wrz.75.2021.08.05.04.16.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Aug 2021 04:16:38 -0700 (PDT) Message-ID: <6595b716cb0b37e9daf4202163b4567116d4b4e2.camel@redhat.com> Subject: Re: [PATCH net-next 1/2] selftests/net: GRO coalesce test From: Paolo Abeni To: Coco Li , netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, Willem de Bruijn Date: Thu, 05 Aug 2021 13:16:37 +0200 In-Reply-To: <20210805073641.3533280-2-lixiaoyan@google.com> References: <20210805073641.3533280-1-lixiaoyan@google.com> <20210805073641.3533280-2-lixiaoyan@google.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hello, On Thu, 2021-08-05 at 07:36 +0000, Coco Li wrote: > Implement a GRO testsuite that expects Linux kernel GRO behavior. > All tests pass with the kernel software GRO stack. Run against a device > with hardware GRO to verify that it matches the software stack. > > gro.c generates packets and sends them out through a packet socket. The > receiver in gro.c (run separately) receives the packets on a packet > socket, filters them by destination ports using BPF and checks the > packet geometry to see whether GRO was applied. > > gro.sh provides a wrapper to run the gro.c in NIC loopback mode. > It is not included in continuous testing because it modifies network > configuration around a physical NIC: gro.sh sets the NIC in loopback > mode, creates macvlan devices on the physical device in separate > namespaces, and sends traffic generated by gro.c between the two > namespaces to observe coalescing behavior. I like this idea a lot! Have you considered additionally run the same test of top of a veth pair, and have such tests always enabled, so we could have some coverage regardless of specific H/W available? To do the above you should disable TSO on the veth sender peer and enable GRO on the other end. [...] > + setup_ns > + # Each test is run 3 times to deflake, because given the receive timing, > + # not all packets that should coalesce will be considered in the same flow > + # on every try. I thought that tuning 'gro_flush_timeout' appropriatelly, you should be able to control exactly which packets will be aggregated ??? Thanks! Paolo