Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp6598707rdb; Tue, 2 Jan 2024 07:09:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGmfTN1Nlg9AgMG2gFFa7xHTw2TgTcaFnOA3nLi6wcrebIt+IPrl6jm82a6sXkE7P9SlehQ X-Received: by 2002:a17:902:e80f:b0:1d4:ca93:981a with SMTP id u15-20020a170902e80f00b001d4ca93981amr559038plg.19.1704208163043; Tue, 02 Jan 2024 07:09:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704208163; cv=none; d=google.com; s=arc-20160816; b=OUm07A4j/12Hvt4mH4GdZ0zbXFdvLlJ7fHT3OZSBkNJIXT0COkNwbkhbJbZnzSZM5B 3W7kgrTf5Vh8f7MLawIjD706e/yjrYIxYRuzZMZDECi4kT6AjaI8BKdbqZYRBGGH0liu w2S1u6jiHs8qsmrTOtGyXY3RQVRVyx2ICXsF+/hdyguoDV65B6zprEtpdC8Ip8xtu4rv YoyTeLz7Ck8PdgYtqeyXaGAU7qzDy2PEThYrlPE6D/l7IF8Z7xWAZImTPDkaTgJBUwvJ N0MBbP0fWV9PAm9WvPga128wjN1pmCpZcrTpoG5Al4ozQDpOTfNiFhueRNUuAOIp56Ba 8X0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:subject:references:in-reply-to :message-id:to:from:date:dkim-signature; bh=FMS55Vzekx4T3pQgk1uVM7+XggMIpgc3xmmxIF8jTeY=; fh=Kx0XqY+hwWlHDjBLkn3gTxdmDqmJZxa24zoxsy1nOIo=; b=JnNRmYGaN2uJ5HG6ZMq9kv0UuFcTCkVVr4daHhAJqYOrGYqzdM36sbXSOQcRlzhusS DddhJIr//fmbqPy/S46Ld05lum9O60xlFFTb2zaNDQ98ih+kZodGvjdynus9ZtRUksCO A+N9VI+dHdqmZjW3b5cWJN3j0iiBy8RP9OLoqVV7L06RAhAu4G42a7jQlr4maDt4dezj jPh5oTXw7vuGaBhMUNeRL2JoQuwELU86rgmuFL6lb6QH0smVsULoXa7NYydbiTmNMUvd 44r28+zdVGis811z+TzEg6iCAwLqOBtolSbSlj06DLglWNXcbJQFf3sciicXLl+JuGfO +2AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mBGP0+KB; spf=pass (google.com: domain of linux-kernel+bounces-14533-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x20-20020a170902ea9400b001cf50ffd38dsi19785056plb.164.2024.01.02.07.09.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 07:09:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-14533-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=mBGP0+KB; spf=pass (google.com: domain of linux-kernel+bounces-14533-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-14533-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id B2B9A283B98 for ; Tue, 2 Jan 2024 15:09:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 335A314007; Tue, 2 Jan 2024 15:09:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mBGP0+KB" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-qv1-f49.google.com (mail-qv1-f49.google.com [209.85.219.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2163212E6B; Tue, 2 Jan 2024 15:09:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f49.google.com with SMTP id 6a1803df08f44-67f9fac086bso72766526d6.3; Tue, 02 Jan 2024 07:09:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704208150; x=1704812950; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=FMS55Vzekx4T3pQgk1uVM7+XggMIpgc3xmmxIF8jTeY=; b=mBGP0+KBZZ5RVjbTox05T7TLZeWMS5Mah6/1rkZVpVHcgaTbl5HrzlL/9aKUOAadXx MzpiIKsw9nBqTf80bjtnMTP7qR02WbxaCxyvFbf4GFiQcid7r1MvpCcpluQ1hUKV+XrG S8S0FWWQifdnKIx8y/vNQ/66FwP316x7GRO/i5998wEsB0Tbg2BfC/brUIL8lR5h9qxm f2zUbJb43Uc4CM/vMnPB4GAZfSV0K45Ro499Zn1s9GJuwQVQOduhDg9HS6Wofz1r4c3s n4aMY+37TKhYnw2K/eG7xSlwu1/v7l8Gxcv35iEm8wEYZMaKAsgEQ8kr2L1DwSRUBgLU OeRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704208150; x=1704812950; h=content-transfer-encoding:mime-version:subject:references :in-reply-to:message-id:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FMS55Vzekx4T3pQgk1uVM7+XggMIpgc3xmmxIF8jTeY=; b=kT5Hic3wDvIZMnaka5cjIxpfJZefBBQQ/cDy2c8/DpfJzmeMo7iVzLEFXpcx4Z3svh MuTBqO3XQYKit7SQGJavOyNTZwFEJbBUypmnBCIlV8H2lDzeNmy2atrjfOTpt9MffiFu dhI6JYA1Bibu+X804/qi6HEAwpoE85FBSnW0mk7dSnosSkIU8LKGT8rN7AdMrYxe2XUj frrfuX2+FnrTrSgztqOhN08/FxoGz7Vz4srfSIsDfTcz0rcLJIRJTxArCrL3TCS6FomE W7U/3+8+/1ZKOi3McR54IoaMHM5inEJZRa4yk3IIShbjwxzd0mPkpj8WfJ4F5C4MWz3J bXqA== X-Gm-Message-State: AOJu0YxvhlSMjIuS0XC0EInWGnGV5x8cE1py/lI9Fvh2Qrby0ZQ9ZZH2 T53yR7wMkp2Z8YDaDhh8fbs= X-Received: by 2002:a05:6214:e8c:b0:67f:8dfb:b6b1 with SMTP id hf12-20020a0562140e8c00b0067f8dfbb6b1mr28230780qvb.5.1704208149845; Tue, 02 Jan 2024 07:09:09 -0800 (PST) Received: from localhost (48.230.85.34.bc.googleusercontent.com. [34.85.230.48]) by smtp.gmail.com with ESMTPSA id n5-20020a0ce945000000b0067fa1179b57sm8875424qvo.131.2024.01.02.07.09.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Jan 2024 07:09:09 -0800 (PST) Date: Tue, 02 Jan 2024 10:09:09 -0500 From: Willem de Bruijn To: Richard Gobert , davem@davemloft.net, dsahern@kernel.org, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shuah@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, lixiaoyan@google.com Message-ID: <659427152812e_2907a12946f@willemb.c.googlers.com.notmuch> In-Reply-To: <5bd9a1c7-63e8-4f5e-a749-c7eeeaed3c42@gmail.com> References: <127b8199-1cd4-42d7-9b2b-875abaad93fe@gmail.com> <5bd9a1c7-63e8-4f5e-a749-c7eeeaed3c42@gmail.com> Subject: Re: [PATCH net-next v2 3/3] selftests/net: fix GRO coalesce test and add ext header coalesce tests Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Richard Gobert wrote: > Currently there is no test which checks that IPv6 extension header packets > successfully coalesce. This commit adds a test, which verifies two IPv6 > packets with HBH extension headers do coalesce, and another test which > checks that packets with different extension header data do not coalesce > in GRO. > > I changed the receive socket filter to accept a packet with one extension > header. This change exposed a bug in the fragment test -- the old BPF did > not accept the fragment packet. I updated correct_num_packets in the > fragment test accordingly. > > Signed-off-by: Richard Gobert Reviewed-by: Willem de Bruijn Thanks for adding the second test. > +static void add_ipv6_exthdr(void *buf, void *optpkt, __u8 exthdr_type, char *ext_payload) > +{ > + struct ipv6_opt_hdr *exthdr = (struct ipv6_opt_hdr *)(optpkt + tcp_offset); > + struct ipv6hdr *iph = (struct ipv6hdr *)(optpkt + ETH_HLEN); > + char *exthdr_payload_start = (char *)(exthdr + 1); > + > + exthdr->hdrlen = 0; > + exthdr->nexthdr = IPPROTO_TCP; > + > + if (ext_payload) > + memcpy(exthdr_payload_start, ext_payload, MIN_EXTHDR_SIZE - sizeof(*exthdr)); minor nit, in case this gets respun: ext_payload is always true.