From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by mail.toke.dk (Postfix) with ESMTPS id 11D989F6F30 for ; Tue, 21 Mar 2023 21:43:37 +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=j3ciKxYJ Received: by mail-ed1-x52d.google.com with SMTP id o12so64710895edb.9 for ; Tue, 21 Mar 2023 13:43:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679431415; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=PeP3HcyTjPxxNOqAcC7pbi/56qhRwp+1YhUNPsmy6fU=; b=j3ciKxYJHhH/chjp36YI2YdFfcO5EpzvHTNralvW9CnX77P6Jonyz7QY5h/wkINJBa g2znG/xBD/L8ZHRPq3qdsF1NWqh2NrU3f9xlJ5Q6o24heWlflql8zTpFK3L3UaeDjnBR WK7AdWhLYsoe3Jp2TSeoJX063CN58apF9qgvMFRFEGfnPgX7CL0fDRMWC4HWNAxyaQW6 i8U6e5fGpo2MOJ57vzCeaiksd7K6TAsyP3PbKocWcJ+ZuOP+/pZ6+QDR7JOL2QAG8rVF IHEAbbVesSc+skK6Ur0vetytJ7htfrZHlAICj4hvpBHNED2L+NQcw+wcshHZZLfwXgUb 9TNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679431415; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=PeP3HcyTjPxxNOqAcC7pbi/56qhRwp+1YhUNPsmy6fU=; b=Udr5irYB2lRN9Hb3RdmIGDZ/8GVB6Tu7WoRuQL7TW1VoRaJOaV53JKzp1KdciUBaRn almkyjoAeLWv0l2rKDlzccw6p3ZeI8MR1fGbGjbUU+tpjjdCecR1Z05pLeXNIiZ4nJKT xDtculCmfIcWWEPKOLodyz5XX5eHyh7n/0mTQCpXQSloUnkGtJfY14cVeq8lWSq2riLg ZmfWxTsUZ70HgCiCDbMiFBdI2HYsdQjZnzG03PTW6Wv0oQBpBtzfjLHDg5u+nrYxG/i0 aFwn5yzq8K77TC7BpyhOdE1//vZMSXy1BJAN0uHy8rNLOA9a7geFRTsBjWNgLb5PZ7gx kdtg== X-Gm-Message-State: AO0yUKWZO7WEhAtBSGjHt34fojg6ULRuUq210ywzDih2+TbDE1a4aG8E 3S+ACrMutxMNadBiMvP3jrM= X-Google-Smtp-Source: AK7set/c7W6993tvLP5KS1XL2pRd+/p9dzzTr79//sn5QJyfVm4aGb4clNy4ztzxUFKKbpdXZjji4w== X-Received: by 2002:a17:906:b0c3:b0:930:d0f1:9d8 with SMTP id bk3-20020a170906b0c300b00930d0f109d8mr4649981ejb.27.1679431415126; Tue, 21 Mar 2023 13:43:35 -0700 (PDT) Received: from [192.168.0.106] ([77.126.33.94]) by smtp.gmail.com with ESMTPSA id w11-20020a1709067c8b00b009231714b3d4sm6120435ejo.151.2023.03.21.13.43.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Mar 2023 13:43:34 -0700 (PDT) Message-ID: <682a413b-4f84-cc06-d378-3b44d721c64e@gmail.com> Date: Tue, 21 Mar 2023 22:43:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Content-Language: en-US To: Jesper Dangaard Brouer , bpf@vger.kernel.org References: <167940675120.2718408.8176058626864184420.stgit@firesoul> From: Tariq Toukan In-Reply-To: <167940675120.2718408.8176058626864184420.stgit@firesoul> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: XPNV7WLNQOBNOPTNCSK7FBYESUJTVVWF X-Message-ID-Hash: XPNV7WLNQOBNOPTNCSK7FBYESUJTVVWF X-MailFrom: ttoukan.linux@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: 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: 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 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 For the mlx4/5 parts: Acked-by: Tariq Toukan Thanks!