From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by mail.toke.dk (Postfix) with ESMTPS id 414049C2CF9 for ; Wed, 16 Nov 2022 21:51:22 +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=20210112 header.b=UhLMdEJL Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-13b103a3e5dso21582846fac.2 for ; Wed, 16 Nov 2022 12:51:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=QJRWTOFn39/i2MBqc0YwwydcgnN/YEyrikrpEXRCdQg=; b=UhLMdEJLgkja2L58MUWCucpJflLeE3eu0gcnn2N4wQJSP32TC0Kc1+XGhKBoJEZ9I2 0507fZvy2P7sXrdNF2ok+V8IC8EOq8Zm+Csp53M4NbUwTh0uuQooq0nHsRi89MBPlpws 9e57Y6llfXTLW/rAa7M9GG0yc4OkIO+GzrbUiD4ZNdtBIMzFjuYd5yB1PzG8CPNeONyY 9P23qSb98WDjtfuZHcqiLYZd71IFJUZ9m+cpEgQ6jD36T8poGXNEUJK9nWf9DcbnitqP iT5kJqZcVD9yv6GZEmWI8g4sz3HjtP7eYwmaK0t3k/C5QBjrOCrTHjAktpro5ANDwqtB ly7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QJRWTOFn39/i2MBqc0YwwydcgnN/YEyrikrpEXRCdQg=; b=Wi+lfDjQBCo8eq4R6cLkeRY7Iyk9wBkm2Bcps7VU28x5jXDEiFmtKaGn9GskiIoYdS ui4sj1JxK2BXwyjZOJmT7R2WFojGFvkgcXz27dhA5F/fB/+wpsbgLnFJf5EZXg5YrMd5 sMOL3Hb8sjLjkAumF5Ew7JBHtcH3n1W4gYvpBOjKF/tj4SY+yHUU8ZbnDSxO4oRQQhhX 8xDKkeCCZEFuttY+Jr64CMVyHRIvIb8CQSeHufofbp+YjRXOxSeAGDmus6KPf5WXzjYh G9gEVi3J3gtRPoOel3OpL9F3jaWneOUBgHeAUekmNKJp+yOPn7hx27Yo3sjRhEwzN/NU x8zQ== X-Gm-Message-State: ANoB5pkblwOXMGY6kC+8H1C7loOjL7rlCM6XgKKQQQRYIur9WSh/0ODz qB+2MUNpawg6o2SeIDiTkYdUNdx/8q3s8O1CQrFDQw== X-Google-Smtp-Source: AA0mqf40G5k+V5QgecIZfT0FwoHF2CyhvTHUlA39VcQCr3a5bqKBmxJKbVqTzF5L/aPwVGpnnybEA4WrMSOo6dP96jc= X-Received: by 2002:a05:6870:e9a2:b0:13b:be90:a68a with SMTP id r34-20020a056870e9a200b0013bbe90a68amr2708455oao.181.1668631880557; Wed, 16 Nov 2022 12:51:20 -0800 (PST) MIME-Version: 1.0 References: <20221115030210.3159213-1-sdf@google.com> <20221115030210.3159213-7-sdf@google.com> <87bkp7jklt.fsf@toke.dk> In-Reply-To: <87bkp7jklt.fsf@toke.dk> From: Stanislav Fomichev Date: Wed, 16 Nov 2022 12:51:09 -0800 Message-ID: To: =?UTF-8?B?VG9rZSBIw7hpbGFuZC1Kw7hyZ2Vuc2Vu?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7OSNUYERI7SWYEJ56HDLSP3NM7WO4LKG X-Message-ID-Hash: 7OSNUYERI7SWYEJ56HDLSP3NM7WO4LKG X-MailFrom: sdf@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: Martin KaFai Lau , ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, 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, bpf@vger.kernel.org X-Mailman-Version: 3.3.6 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next 06/11] xdp: Carry over xdp metadata into skb context List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, Nov 16, 2022 at 1:48 AM Toke H=C3=B8iland-J=C3=B8rgensen wrote: > > Martin KaFai Lau writes: > > > On 11/14/22 7:02 PM, Stanislav Fomichev wrote: > >> Implement new bpf_xdp_metadata_export_to_skb kfunc which > >> prepares compatible xdp metadata for kernel consumption. > >> This kfunc should be called prior to bpf_redirect > >> or when XDP_PASS'ing the frame into the kernel (note, the drivers > >> have to be updated to enable consuming XDP_PASS'ed metadata). > >> > >> veth driver is amended to consume this metadata when converting to skb= . > >> > >> Internally, XDP_FLAGS_HAS_SKB_METADATA flag is used to indicate > >> whether the frame has skb metadata. The metadata is currently > >> stored prior to xdp->data_meta. bpf_xdp_adjust_meta refuses > >> to work after a call to bpf_xdp_metadata_export_to_skb (can lift > >> this requirement later on if needed, we'd have to memmove > >> xdp_skb_metadata). > > > > It is ok to refuse bpf_xdp_adjust_meta() after bpf_xdp_metadata_export_= to_skb() > > for now. However, it will also need to refuse bpf_xdp_adjust_head(). > > I'm also OK with deferring this, although I'm wondering if it isn't just > as easy to just add the memmove() straight away? :) SG, let me try that! Martin also mentioned bpf_xdp_adjust_head needs to be taken care of..