From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mail.toke.dk (Postfix) with ESMTPS id 2AE6D9C2B13 for ; Wed, 16 Nov 2022 10:48:37 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=iOJnvYO2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1668592116; 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: in-reply-to:in-reply-to:references:references; bh=KEr65FftyAvd0R6Y1Vvx/V9RSQkCwNJYF7Ig4eQxDek=; b=iOJnvYO20iSHCCEAVB9dSyyKWCEnNyqns0XPBKC8vYWE1wVVpZvkugHHqITV4Wj9PikApC rhWirrPbY/rupDSzGeAeREmB8eThhaNXk9Ke7hCeGqNWIzijMz78rJs984seIMVUazgaHR lqSoglV6WtnBuyy8DLMN37jns2DDHF8= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-161-eE5YkiSrPBarCszoIusNrg-1; Wed, 16 Nov 2022 04:48:35 -0500 X-MC-Unique: eE5YkiSrPBarCszoIusNrg-1 Received: by mail-ej1-f70.google.com with SMTP id nb1-20020a1709071c8100b007ae4083d6f5so9430944ejc.15 for ; Wed, 16 Nov 2022 01:48:34 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=KEr65FftyAvd0R6Y1Vvx/V9RSQkCwNJYF7Ig4eQxDek=; b=UFbJN52KFkq9dZMvVMWJL47ffJ+KH6aEloZrQixN4Qog6bmU3d7DTzaOYTaxTYFpPb 7db5HmzRJaqsnYtRSoraxu22+RtNqG/e2auIMRBy5T336OsLm+m8UEcz8fk5h0fAx4lD k0z1kyZChz2QORtFKDegnHaFHlX4KshT5Fh745gVgnEahJdZHTN57SsHkxq1vP+AJAfU rWm106mIBv5BxiEB8sBkVZJ37DrypkU28rqUE81BI3F4bAung39RTpig4astRvUNdQ1b Qb8mBUKeNF70++GaQZJlT4DoAw+Lk4wzzZI6laZQRFytFc5ag4oP9/SGz59ePhIf+Uzj dpjw== X-Gm-Message-State: ANoB5pnKcMRG/at/+JFtSkttVRx9BmexTEYnXM++dfm+SAi2Sgx3LQ8O zm4YV9ausEAbf4kIP8ISClSj8UCs90LSM2TYcBRDpgulAEuN5i6G0OjN5AOoRSjRJmicHFVPh7S Z5JSCLss2GwuUTucqDltb X-Received: by 2002:a17:906:c259:b0:7ae:df97:a033 with SMTP id bl25-20020a170906c25900b007aedf97a033mr14489516ejb.344.1668592113194; Wed, 16 Nov 2022 01:48:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf46f5R98rWOiuVMfxT5H9JqDg0AMWcLplaALtHZKqoGKNlX4UvAtiJsthbmVSFbclKGQv1LDg== X-Received: by 2002:a17:906:c259:b0:7ae:df97:a033 with SMTP id bl25-20020a170906c25900b007aedf97a033mr14489439ejb.344.1668592111657; Wed, 16 Nov 2022 01:48:31 -0800 (PST) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id t23-20020aa7d717000000b0046800749670sm3369927edq.53.2022.11.16.01.48.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Nov 2022 01:48:31 -0800 (PST) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 2F5407A6DDA; Wed, 16 Nov 2022 10:48:30 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Martin KaFai Lau , Stanislav Fomichev In-Reply-To: References: <20221115030210.3159213-1-sdf@google.com> <20221115030210.3159213-7-sdf@google.com> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 16 Nov 2022 10:48:30 +0100 Message-ID: <87bkp7jklt.fsf@toke.dk> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Message-ID-Hash: BDZPDA2Z7N54MSYSYFZC2XC2G7TNGB2V X-Message-ID-Hash: BDZPDA2Z7N54MSYSYFZC2XC2G7TNGB2V X-MailFrom: toke@redhat.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: 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: 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? :) -Toke