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 AE64D9F6EFB for ; Tue, 21 Mar 2023 20:21:03 +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=JipJXWzw DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679426462; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rB+PzEgnKkqk2k+vvj3p24uGcCixq7dziCTji95CjO8=; b=JipJXWzwJF+dQfrdnKWSIRSIxb5wP+btOzObG1aUD4aml7HKLWWHvpGcj0b+pfuEbBjxD8 sN9NcJ2NgE93VXbpfJfvjhev2uBozG/7r6/twUEC2yEWaT6hSKttazsSYjPgwjQMTYpdfp WBwYIzGGdCvdBjYmjSD4BYp0jYGbPDg= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-135-aQSbxpCGMcW1RnWZlOQCqQ-1; Tue, 21 Mar 2023 15:21:00 -0400 X-MC-Unique: aQSbxpCGMcW1RnWZlOQCqQ-1 Received: by mail-ed1-f72.google.com with SMTP id t14-20020a056402240e00b004fb36e6d670so23263177eda.5 for ; Tue, 21 Mar 2023 12:20:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679426458; h=content-transfer-encoding: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=rB+PzEgnKkqk2k+vvj3p24uGcCixq7dziCTji95CjO8=; b=AAfp3s0rjYVV6fuiQsFqbokuB5XPLfaoTKchpeAlM+iMg9M0BXSHfhunF8MvVNbF5S +qt1CalPfRQAwTGhdrYpghOMM3LU859pVMs7De8zB8OPTp0rO4QpEVcbCf+hziU+BiAF 9hNMOM6p8+LfPvtEOLUxQ3PwRPGcvtfwZAlgKn5nOeiA7+wmTDH71FFGN/8kvXFgeAhi kETrarajBVwnr1AIk1jkXPhZlhDShHakBZzM2HU/GTOokFmeCi5MoEe0c51+Kt3B8py7 UEafwZQpjAzK15j6xPs1drdUiTRsSwQPBi11bk5YugJ4PUuCdaift5DN0gT0tbV+KdQj 94aA== X-Gm-Message-State: AO0yUKX63KYVq0svzU9UnZuXeqSc4efwGf5XDqTepYTTLhszdAH3gdMr obgLw/U4V9tpYO4L9As70uOmzp6QW2Vvc0MtTlkym7k3C7z3+N+OapzTEYC4C2tXwY8Fj7uhQIQ x1xDkd/mXK3Spc74TvCky X-Received: by 2002:a17:906:fad5:b0:931:5630:a23 with SMTP id lu21-20020a170906fad500b0093156300a23mr3658984ejb.50.1679426458391; Tue, 21 Mar 2023 12:20:58 -0700 (PDT) X-Google-Smtp-Source: AK7set9PAjldqIVfgFwiw/sf3tp8nVNBWfUz5CMSnpL+CdmdP5wxKPXBBH2ukPUBvKl8JW297p5lsg== X-Received: by 2002:a17:906:fad5:b0:931:5630:a23 with SMTP id lu21-20020a170906fad500b0093156300a23mr3658943ejb.50.1679426457816; Tue, 21 Mar 2023 12:20:57 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([2a0c:4d80:42:443::2]) by smtp.gmail.com with ESMTPSA id b17-20020a17090630d100b009300424a2fdsm6180946ejb.144.2023.03.21.12.20.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Mar 2023 12:20:57 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id D24AC9E34C5; Tue, 21 Mar 2023 20:20:56 +0100 (CET) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Jesper Dangaard Brouer , bpf@vger.kernel.org In-Reply-To: <167940675120.2718408.8176058626864184420.stgit@firesoul> References: <167940675120.2718408.8176058626864184420.stgit@firesoul> X-Clacks-Overhead: GNU Terry Pratchett Date: Tue, 21 Mar 2023 20:20:56 +0100 Message-ID: <87ttyd7vxj.fsf@toke.dk> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-ID-Hash: L75G3BC247WWFHHCS42GDYLGGGY2SUL4 X-Message-ID-Hash: L75G3BC247WWFHHCS42GDYLGGGY2SUL4 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: Jesper Dangaard Brouer , netdev@vger.kernel.org, Stanislav Fomichev , martin.lau@kernel.org, ast@kernel.org, daniel@iogearbox.net, alexandr.lobakin@intel.com, larysa.zaremba@intel.com, xdp-hints@xdp-project.net, anthony.l.nguyen@intel.com, yoong.siang.song@intel.com, boon.leong.ong@intel.com, intel-wired-lan@lists.osuosl.org, pabeni@redhat.com, jesse.brandeburg@intel.com, kuba@kernel.org, edumazet@google.com, john.fastabend@gmail.com, hawk@kernel.org, davem@davemloft.net 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: Jesper Dangaard Brouer writes: > 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 layout > 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 Acked-by: Toke H=C3=B8iland-J=C3=B8rgensen