From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by mail.toke.dk (Postfix) with ESMTPS id 81A329F758E for ; Wed, 22 Mar 2023 19:34:33 +0100 (CET) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=fF+TBG+L Received: by mail-ed1-x52b.google.com with SMTP id cn12so31103437edb.4 for ; Wed, 22 Mar 2023 11:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679510072; 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=zXYVlCwzaCfo+TEgKRpH4aKOEUQ6BiDkt6e2qr/DXFc=; b=fF+TBG+Lq4+D06+SOgB+UV/iHXuR665aEs3vP9TN9sIrpcu2QGKc1rPbt4THqHFwuk DdaoZ6Ul73wtcxi8kCx5cZ7DzlgyilNGPMhcbltGWJopC7YHHpYOhvZQ8o1YIMrocCpE HWvmT/oiuvzZAvhFXTdp8pCeXAiAz1N7b82Ju2mOY0zBEg2tcxMvBmS9I2f733aNcuey ltOjZU8F6IyFJ1QZNaLRK2bd1WtxBt1ICj3SX/nCUaoCd6nS8Cyc8cJwv/xEsHJcU8eA dzeh3CWrJU6OJcU3HNe9/BZspG42mLWTYaiNdbH0uos0zeQFSckGUrqa+rdXGUISLJJl IHXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679510072; 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=zXYVlCwzaCfo+TEgKRpH4aKOEUQ6BiDkt6e2qr/DXFc=; b=4+RCiqZ4+GB/kR2rQNwqKzxjL3xWqmYM+EbI9TcjFz6uD+CxrtBjc5Eaq+2jIXlM8W JIwfwB4BzxETuocgi4PQbRj8ydAulWaIPZWju+Kgx3iDVSH5wp63j6fmwp5fGl2oS+0s LS9f8FeQwwAXuy347qKgVKRZGASAnJwmrEWWrMDM/+rLLIoytgwIm27yZEZO6fnDhw8S 0cyIgYp7B6fNzdB0+VlMZuMKlxQQCwNQpmsD62TQwpXTK4tPsGoGdMyXEiLfhZ65N6HF aiS5wvTw70J4vPAm3+0qCkJC8fntC/rcl75+GPbI5rNTsBsgdIeNWP5sgrXdXmBpQkGM Y9iQ== X-Gm-Message-State: AO0yUKVFg+NC4uES/p58eHV9DP4crbOtAQs8RmUNpJX5dPJZrfmbbCgG 2kPuOT36If55Kltk5pXUpFpAUT+FaO97U3e5QkM= X-Google-Smtp-Source: AK7set+cm8vcp787lnxRtwapHZN5BJEt7huWdkMB3WhRgBBpjK5k1sP0sjkwT6LiP1GE3bE/5t41Vq0oMY8RqjEeOvw= X-Received: by 2002:a17:906:f858:b0:92a:581:ac49 with SMTP id ks24-20020a170906f85800b0092a0581ac49mr3776308ejb.3.1679510072459; Wed, 22 Mar 2023 11:34:32 -0700 (PDT) MIME-Version: 1.0 References: <167940675120.2718408.8176058626864184420.stgit@firesoul> <682a413b-4f84-cc06-d378-3b44d721c64e@gmail.com> In-Reply-To: <682a413b-4f84-cc06-d378-3b44d721c64e@gmail.com> From: Alexei Starovoitov Date: Wed, 22 Mar 2023 11:34:21 -0700 Message-ID: To: Tariq Toukan , Konstantin Ryabitsev Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Message-ID-Hash: MKKH35JXEW66KBV35YP7R5OSSZLDASYC X-Message-ID-Hash: MKKH35JXEW66KBV35YP7R5OSSZLDASYC X-MailFrom: alexei.starovoitov@gmail.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: Jesper Dangaard Brouer , bpf , Network Development , Stanislav Fomichev , Martin KaFai Lau , Alexei Starovoitov , Daniel Borkmann , Alexander Lobakin , Larysa Zaremba , xdp-hints@xdp-project.net, anthony.l.nguyen@intel.com, "Song, Yoong Siang" , "Ong, Boon Leong" , intel-wired-lan , Paolo Abeni , Jesse Brandeburg , Jakub Kicinski , Eric Dumazet , John Fastabend , Jesper Dangaard Brouer , "David S. Miller" X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf V2] xdp: bpf_xdp_metadata use EOPNOTSUPP for no driver support List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, Mar 21, 2023 at 1:43=E2=80=AFPM Tariq Toukan wrote: > > > > On 21/03/2023 15:52, Jesper Dangaard Brouer wrote: > > When driver doesn't implement a bpf_xdp_metadata kfunc the fallback > > implementation returns EOPNOTSUPP, which indicate device driver doesn't > > implement this kfunc. > > > > Currently many drivers also return EOPNOTSUPP when the hint isn't > > available, which is ambiguous from an API point of view. Instead > > change drivers to return ENODATA in these cases. > > > > There can be natural cases why a driver doesn't provide any hardware > > info for a specific hint, even on a frame to frame basis (e.g. PTP). > > Lets keep these cases as separate return codes. > > > > When describing the return values, adjust the function kernel-doc layou= t > > to get proper rendering for the return values. > > > > Fixes: ab46182d0dcb ("net/mlx4_en: Support RX XDP metadata") > > Fixes: bc8d405b1ba9 ("net/mlx5e: Support RX XDP metadata") > > Fixes: 306531f0249f ("veth: Support RX XDP metadata") > > Fixes: 3d76a4d3d4e5 ("bpf: XDP metadata RX kfuncs") > > Signed-off-by: Jesper Dangaard Brouer > > For the mlx4/5 parts: > Acked-by: Tariq Toukan FYI this patch was applied to bpf tree. pw-bot doesn't notice bpf tree anymore :(