From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by mail.toke.dk (Postfix) with ESMTPS id 251369F9ABD for ; Wed, 29 Mar 2023 10:10:59 +0200 (CEST) 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=hc+I7Ggx Received: by mail-wm1-x32e.google.com with SMTP id u11-20020a05600c19cb00b003edcc414997so9002837wmq.3 for ; Wed, 29 Mar 2023 01:10:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680077458; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject:from:to:cc :subject:date:message-id:reply-to; bh=M/4t4OvCQjo33JGjobittaaxVDDegfvrkYrLpIGC83o=; b=hc+I7GgxDJExRVT0qlKTaDwMBbzUxEWpa2RNLp2ERtN3JnGBdLEc4s2KKx10imXy7T 84biQJEVomdzXbuWYOqtylvbdglKk/PurgFmvuvRi+AzonLKfjTNGTzl8Q2Tl/YyY2jX gEKsd49ue3Q7WYjLNmwQO1AFMFXXaoXZOXXuaeCETn4MFeHwaFGy/ujWpJ+F1TCpxo3y S2S/WJMXl6mta4slX9JM5KeDEPbb3mNDEOEl39fgJblRKIGEHMlx7Ui2g9anMzdNbRIL wvtOs/VJpCiDiGqFXvkIz1MYsHTjCVOVdbRKhgm1NZKM7c6xQxQo2tGXhbmubxbAjGes HRVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680077458; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=M/4t4OvCQjo33JGjobittaaxVDDegfvrkYrLpIGC83o=; b=kqrmxOxlWezoGRaFfYOT62Mxa7WHJkXNSc+h5coSk8OaDgeGYyg/dFeE9HEFAP5aHS /9QLk4M+4SYYxDBq6fhk1t+wMyHhAdBg4XXCbg+3X3XKFnXQwduPweJ/vHc/VbcN81fQ XP8C/SFJEhZr6xLYB+ePtg9GSpMvx7rZYyvKwGWY0BbxgnR4Rvd3HZfFWI8YmWi0UgGW 7eKgFj525f+GswxJM1F4MeUQsC4C+xGnMxVgWU8znreXTComA/Wl/2rlxyzKzlCqt/0H QzEX4JHeuKbMsLM75+Zarft9g8BwjlY4j8cv+fVvy12ebHECr/YULrD1uAb8KafXGELw smpg== X-Gm-Message-State: AO0yUKX7ATis8tgjpp2Nh09xl1+V7ENvc8+X/A+qYQemFddiwLFpx+ah k9NFjvxDpU4ojers9OwJySg= X-Google-Smtp-Source: AK7set9x9jFN4Plu2UmMtpejEnFrvn6a6z16+v/aEEdxK2Y8krzFM/wAHnT+KxPR01RzEqUm2SqdVg== X-Received: by 2002:a7b:ce08:0:b0:3ed:9a37:acbf with SMTP id m8-20020a7bce08000000b003ed9a37acbfmr14013889wmc.31.1680077457916; Wed, 29 Mar 2023 01:10:57 -0700 (PDT) Received: from [192.168.1.122] (cpc159313-cmbg20-2-0-cust161.5-4.cable.virginm.net. [82.0.78.162]) by smtp.gmail.com with ESMTPSA id s17-20020a7bc391000000b003edd1c44b57sm1323559wmj.27.2023.03.29.01.10.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Mar 2023 01:10:57 -0700 (PDT) To: Jesper Dangaard Brouer , bpf@vger.kernel.org References: <168003451121.3027256.13000250073816770554.stgit@firesoul> <168003455815.3027256.7575362149566382055.stgit@firesoul> From: Edward Cree Message-ID: <39543d22-4e71-9696-17f8-5ae22728aa25@gmail.com> Date: Wed, 29 Mar 2023 09:10:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <168003455815.3027256.7575362149566382055.stgit@firesoul> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Message-ID-Hash: HTB3EQ43ER2HPIDDR5ITAEPIOK2OPPOK X-Message-ID-Hash: HTB3EQ43ER2HPIDDR5ITAEPIOK2OPPOK X-MailFrom: ecree.xilinx@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 RFC 1/4] 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: On 28/03/2023 21:15, Jesper Dangaard Brouer wrote: > Hardware RSS types are differently encoded for each hardware NIC. Most > hardware represent RSS hash type as a number. Determining L3 vs L4 often > requires a mapping table as there often isn't a pattern or sorting > according to ISO layer. > > The patch introduce a XDP RSS hash type (xdp_rss_hash_type) that can both > be seen as a number that is ordered according by ISO layer, and can be bit > masked to separate IPv4 and IPv6 types for L4 protocols. Room is available > for extending later while keeping these properties. This maps and unifies > difference to hardware specific hashes. Would it be better to make use of the ETHTOOL_GRXFH defines (stuff like UDP_V6_FLOW, RXH_L4_B_0_1 etc.)? Seems like that could allow for some code reuse in drivers.