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 B03F29F9EFF for ; Wed, 29 Mar 2023 23:46:13 +0200 (CEST) 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=GBFVGBQ8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680126372; 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=TLdrrjYrVuiWJorDb/815Wq1wAW83zbfu/IRhqAaimY=; b=GBFVGBQ8vCJDFkIRVPMFIXNN9J41n9hIoJlBM65itehIeRyYPp+RFhjN+v0hmf0z/tSM5z 0YNEOSSR8ydg+foekx3t4ovqao3KSaS6rdA2Cv2PC5eiMS909KPAWUU0eU1veTlCEGvbFg PWSh49CbpwcLLL24Kkhsq2yTXOq/kB4= Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-379-iivowx8NOv2s3wk-H1pd8Q-1; Wed, 29 Mar 2023 17:46:11 -0400 X-MC-Unique: iivowx8NOv2s3wk-H1pd8Q-1 Received: by mail-ed1-f71.google.com with SMTP id t26-20020a50d71a000000b005003c5087caso23952253edi.1 for ; Wed, 29 Mar 2023 14:46:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680126370; 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=TLdrrjYrVuiWJorDb/815Wq1wAW83zbfu/IRhqAaimY=; b=Fir+mtZbzLhuTEdytybgLHd21GjvWy1MGqNVWD+sDenYjSQIS5gKhNb4jxUvXPQ6HO +QIL4CnnqqWigS6GkEd07hkjASq8RPfgJtMqQwp/iM9jumZdr7oznZFADRZcwMVfw+84 Pcd5O9t1fBuVSUGKyP8kOpjz2UNDn5cS2WeKGLWMuNMnlbzoVGMAw6UIcxid4eI4Wj1u ZgQt0x1XD+rFDCE7vrm/U3F7BuyCmwPOcX3PqOAUiR344sF6xPrQA81oYw4oRbHw/cCo p1c8jZC7/H+AnABeTcdqi6ZkgII8SxmfrX8OnOZOn25umaqIjMsCqx4TRU8Tx+DXCNhl SntA== X-Gm-Message-State: AAQBX9csBN8ewJe41dmo4bx2itU0dUoagWo4x7hlMMWcEeA6r/d1R97p yjEB7GjToNzbc0FMhkaDJs7DfO3rWm8knpd44dc3eVGF2+2B9qeHAWzIyEHvGzzOL8lOXFwMahm HHUmRK8OqFvfEcETWheYC X-Received: by 2002:a17:907:7f86:b0:926:9c33:ea4 with SMTP id qk6-20020a1709077f8600b009269c330ea4mr23062349ejc.27.1680126370364; Wed, 29 Mar 2023 14:46:10 -0700 (PDT) X-Google-Smtp-Source: AKy350ZGQUYQJeTXwnRV15le8g2e5F6QxBAZ5bivkYpLnhuEBXno6vpJg9RQt0C5heMRA6NQh8z/2A== X-Received: by 2002:a17:907:7f86:b0:926:9c33:ea4 with SMTP id qk6-20020a1709077f8600b009269c330ea4mr23062308ejc.27.1680126369951; Wed, 29 Mar 2023 14:46:09 -0700 (PDT) Received: from alrua-x1.borgediget.toke.dk ([45.145.92.2]) by smtp.gmail.com with ESMTPSA id z26-20020a17090674da00b009310d4dece9sm16869157ejl.62.2023.03.29.14.46.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 14:46:09 -0700 (PDT) Received: by alrua-x1.borgediget.toke.dk (Postfix, from userid 1000) id 974C8A22B54; Wed, 29 Mar 2023 23:46:08 +0200 (CEST) From: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= To: Jesper Dangaard Brouer , bpf@vger.kernel.org, Stanislav Fomichev In-Reply-To: <168010734324.3039990.16454026957159811204.stgit@firesoul> References: <168010726310.3039990.2753040700813178259.stgit@firesoul> <168010734324.3039990.16454026957159811204.stgit@firesoul> X-Clacks-Overhead: GNU Terry Pratchett Date: Wed, 29 Mar 2023 23:46:08 +0200 Message-ID: <87355nnsdb.fsf@toke.dk> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Message-ID-Hash: VV4AHQULI7XIPN7MUCPO4TPAXT4SQYWI X-Message-ID-Hash: VV4AHQULI7XIPN7MUCPO4TPAXT4SQYWI 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, linux-kernel@vger.kernel.org, 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 RFC-V2 1/5] xdp: rss hash types representation 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: > diff --git a/net/core/xdp.c b/net/core/xdp.c > index 7133017bcd74..81d41df30695 100644 > --- a/net/core/xdp.c > +++ b/net/core/xdp.c > @@ -721,12 +721,14 @@ __bpf_kfunc int bpf_xdp_metadata_rx_timestamp(const struct xdp_md *ctx, u64 *tim > * @hash: Return value pointer. > * > * Return: > - * * Returns 0 on success or ``-errno`` on error. > + * * Returns (positive) RSS hash **type** on success or ``-errno`` on error. This change is going to break any BPF program that does: if (!bpf_xdp_metadata_rx_hash(ctx, &hash)) /* do something with hash */ so I think adding a second argument is better; that way, at least breakage will be explicit instead of being a hidden change in semantics (and the CO-RE style checking for kfuncs Alexei introduced should trigger correctly). But really, what we should do anyway is merge this during the -rc phase to minimise any breakage :) -Toke