From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-x449.google.com (mail-pf1-x449.google.com [IPv6:2607:f8b0:4864:20::449]) by mail.toke.dk (Postfix) with ESMTPS id 895ACA3E72F for ; Mon, 20 Nov 2023 22:16:44 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=mx7hnY2+ Received: by mail-pf1-x449.google.com with SMTP id d2e1a72fcca58-6bd5730bef9so5821072b3a.1 for ; Mon, 20 Nov 2023 13:16:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1700514943; x=1701119743; darn=xdp-project.net; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=UJhAktQ8YptxCo0xFGqf0D0Bj/NGrMrR+E+DusKyhUU=; b=mx7hnY2+IT8cD7DgD/2bcm4STxXA7XPwhQzBmjxaDJL8fLhFapIUXqadS/StA4nzOu CwTuWjpnD0/Qyv+26mSKLraGFkMFAjaLEGuFIUH1KnED7PtQkx4eP8olLtze1D98z+mo wuCmQ46yHFtHwQvECugpbj1WP7rs1XsLbXkc+YuEzOG0+6DTAFBVTOMy/HlXVVrBrhR/ o0qcCg9OfXCIZRxcEA1pjPbbeS/HwY8l8ACHa1m2aoCsbiL5h/fp0KxOb1mIroetTVOl EqSSdW0YrQasXZcdGuoWJY1UiDtXul09rM2AGpLb75EgPZvvRjrT53ME9b+R2VLA474I c1xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700514943; x=1701119743; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=UJhAktQ8YptxCo0xFGqf0D0Bj/NGrMrR+E+DusKyhUU=; b=o9i/zRxshObxBzJG0w6ECUuZKywe7YfrxdrzUtbpR0bUR9X5kKE/bjGaRk8OpGO/xy +yHuIlto9HOKRk1/IUFdrhMNMof+uOSoWlsxu7C9Lr0H00QVo6NZbie8LtEKEJAjtNi+ Xlie1S9v1eiVL0ovTJVUN7c1XB3obIOFYNmFdhVbnoKT4fT9OqAsMqnZmo5ZPI+Vn8jn Wisa/rk5CJ7cytZTLDigG4IashFDt+hxn/S2mRYvhmXLiQINuiNJF3tfqYrFcgLo+7Gq scmbOgePn09kHLpmC8y7Cm8a5U2KhSQfOLA1UQ77x9LdtojAXMsLb00gB34WbpWHirB4 UuJA== X-Gm-Message-State: AOJu0YwWVjrjx6xqTlQkrllmbyBEq55UzqmuVwuK9dCti7DvANTmGAZR YwBn9fWqclxRsU/l0SNfVIKBux4= X-Google-Smtp-Source: AGHT+IGAcpy14NB4SIG15bm/T8tGAD4FjydZmjX9MDG5i1aAXgYyTPNALf9MpZAWrbYKr22joYwvqM4= X-Received: from sdf.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5935]) (user=sdf job=sendgmr) by 2002:a05:6a00:2314:b0:68e:3053:14b9 with SMTP id h20-20020a056a00231400b0068e305314b9mr207509pfh.2.1700514942953; Mon, 20 Nov 2023 13:15:42 -0800 (PST) Date: Mon, 20 Nov 2023 13:15:41 -0800 In-Reply-To: <20231115175301.534113-18-larysa.zaremba@intel.com> Mime-Version: 1.0 References: <20231115175301.534113-1-larysa.zaremba@intel.com> <20231115175301.534113-18-larysa.zaremba@intel.com> Message-ID: From: Stanislav Fomichev To: Larysa Zaremba Content-Type: text/plain; charset="utf-8" Message-ID-Hash: 6Q2OMI3W4XAJNWIMDXH7Q5P5JGNNEXPR X-Message-ID-Hash: 6Q2OMI3W4XAJNWIMDXH7Q5P5JGNNEXPR X-MailFrom: 3fsxbZQMKCbcpacdlldib.Zljuam-efkqpuam-molgbZq.kbq@flex--sdf.bounces.google.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, haoluo@google.com, jolsa@kernel.org, David Ahern , Jakub Kicinski , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org, Willem de Bruijn , Alexei Starovoitov , Tariq Toukan , Saeed Mahameed , Maciej Fijalkowski X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next v7 17/18] selftests/bpf: Use AF_INET for TX in xdp_metadata List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 11/15, Larysa Zaremba wrote: > The easiest way to simulate stripped VLAN tag in veth is to send a packet > from VLAN interface, attached to veth. Unfortunately, this approach is > incompatible with AF_XDP on TX side, because VLAN interfaces do not have > such feature. > > Replace AF_XDP packet generation with sending the same datagram via > AF_INET socket. > > This does not change the packet contents or hints values with one notable > exception: rx_hash_type, which previously was expected to be 0, now is > expected be at least XDP_RSS_TYPE_L4. Btw, I've been thinking a bit about how we can make this test work for both your VLANs and my upcoming af_xdp tx side. And seems like the best way, probably, is to have two tx paths exercised: veth and af_xdp. For veth, we'll verify everything+vlans, for af_xdp we'll verify everything except the vlans. Originally I was assuming that I'll switch this part back to af_xdp, but I don't think having tx vlan offload makes sense (because af_xdp userspace can just prepare the correct header from the start). So if you're doing a respin, maybe see if we can keep af_xdp tx part but make it skip the vlans verification? generate_packet_af_xdp(); verify_xsk_metadata(/*verify_vlans=*/false); geenrate_packet_veth(); verify_xsk_metadata(/*verify_vlans=*/true); ?