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 66B18A00C78 for ; Tue, 25 Apr 2023 10:43:16 +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=OOW4w2pX DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682412195; 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=Z0zVDpGNPOtgS6OZt5Y/hC+DSyVwR0iNEJU4rcM7cZw=; b=OOW4w2pX7Je0Mhq8zjuUEMw84KmTy/wbXMsJhlJGq/2SJTPRKiQDKZO6HqB9UR4fpkyT1b uGGYDJWQ7DpmiEGc9YV9dpzUh+oiAG1u5bHgCwEs1w8IBLEnWT9UP0slBDa6O06ExwQJDH xNzWu857Io2yUQLfMxrpfziLW9A/xuA= Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-389-U-YzV0AkOamAfABDfUXndA-1; Tue, 25 Apr 2023 04:43:14 -0400 X-MC-Unique: U-YzV0AkOamAfABDfUXndA-1 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-95707df1f05so559579266b.3 for ; Tue, 25 Apr 2023 01:43:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682412193; x=1685004193; h=content-transfer-encoding:in-reply-to:references:to :content-language:subject:cc:user-agent:mime-version:date:message-id :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Z0zVDpGNPOtgS6OZt5Y/hC+DSyVwR0iNEJU4rcM7cZw=; b=fuXUbYHYCmd9EFJYkd0PDRogUVJuzBcW1rrj9q6OAnTFJ7PNGJt7XLMhDvB/aXkzHC CxkbSCIaT7nniTqReEJzQ1PIZmSTxfdT+22Nj/Z8dddETV8zVCvikvAUngYcnLmSbsR6 zBGaOQajw2xiAunuQB3vKhol8ReqqTQy6XhblC1Uivp8V34hkrzrwDdqn5Uot5yHyb4j ySGShgmvfH/hse8Jk8PGKUexNgOJTIOYvIAzSIAxd8ytfcICh3kWbqRqRRFth9Do7hKf /WjbGF2VaThWgKnvo+8v/IqXi1MGJhJ/UEsp0l3VQUygzY4FItYisJsibsC5h6cXFPZu lDWg== X-Gm-Message-State: AAQBX9ddB5uQoj3PNEdcxJpmcz7gNN680YPGazpuIlPMcOcnVOKGy3Lh 2hw4GYbkioPqDzuqvzuX13g/LS40PneisVLvHbpmgkohm/1RyGuaMcvAxyEYRb5oKKQJsA65bne lxHquO8sIq9kGtGZ+q/34 X-Received: by 2002:a17:907:a688:b0:953:4d9e:4dc5 with SMTP id vv8-20020a170907a68800b009534d9e4dc5mr11371463ejc.22.1682412193248; Tue, 25 Apr 2023 01:43:13 -0700 (PDT) X-Google-Smtp-Source: AKy350bMzEkeOJ+lrxIh0zBcCHx4TX83ikBmu1uOT+zXFM5ixyoq1CeTkKqu+M7H2eyoLrpcS9oLHw== X-Received: by 2002:a17:907:a688:b0:953:4d9e:4dc5 with SMTP id vv8-20020a170907a68800b009534d9e4dc5mr11371436ejc.22.1682412192893; Tue, 25 Apr 2023 01:43:12 -0700 (PDT) Received: from [192.168.42.222] (194-45-78-10.static.kviknet.net. [194.45.78.10]) by smtp.gmail.com with ESMTPSA id bh20-20020a170906a0d400b0094fbb76f49esm6589052ejb.17.2023.04.25.01.43.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 25 Apr 2023 01:43:12 -0700 (PDT) From: Jesper Dangaard Brouer X-Google-Original-From: Jesper Dangaard Brouer Message-ID: Date: Tue, 25 Apr 2023 10:43:02 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 To: davem@davemloft.net, bpf@vger.kernel.org, daniel@iogearbox.net References: <168182460362.616355.14591423386485175723.stgit@firesoul> <168182464270.616355.11391652654430626584.stgit@firesoul> <644544b3206f0_19af02085e@john.notmuch> <622a8fa6-ec07-c150-250b-5467b0cddb0c@redhat.com> <6446d5af80e06_338f220820@john.notmuch> In-Reply-To: <6446d5af80e06_338f220820@john.notmuch> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Message-ID-Hash: CVUL3TMZUUWS4ZZ4L2OJ6D6XHHEDA44R X-Message-ID-Hash: CVUL3TMZUUWS4ZZ4L2OJ6D6XHHEDA44R X-MailFrom: jbrouer@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: brouer@redhat.com, netdev@vger.kernel.org, martin.lau@kernel.org, ast@kernel.org, alexandr.lobakin@intel.com, larysa.zaremba@intel.com, xdp-hints@xdp-project.net, John Fastabend , Tony Nguyen , yoong.siang.song@intel.com, intel-wired-lan@lists.osuosl.org, pabeni@redhat.com, jesse.brandeburg@intel.com, Stanislav Fomichev , kuba@kernel.org, edumazet@google.com, hawk@kernel.org, =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next V2 1/5] igc: enable and fix RX hash usage by netstack List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On 24/04/2023 21.17, John Fastabend wrote: >>> Just curious why not copy the logic from the other driver fms10k, ice, ect. >>> >>> skb_set_hash(skb, le32_to_cpu(rx_desc->wb.lower.hi_dword.rss), >>> (IXGBE_RSS_L4_TYPES_MASK & (1ul << rss_type)) ? >>> PKT_HASH_TYPE_L4 : PKT_HASH_TYPE_L3); >> Detail: This code mis-categorize (e.g. ARP) PKT_HASH_TYPE_L2 as >> PKT_HASH_TYPE_L3, but as core reduces this further to one SKB bit, it >> doesn't really matter. >> >>> avoiding the table logic. Do the driver folks care? >> The define IXGBE_RSS_L4_TYPES_MASK becomes the "table" logic as a 1-bit >> true/false table. It is a more compact table, let me know if this is >> preferred. >> >> Yes, it is really upto driver maintainer people to decide, what code is >> preferred ? > > Yeah doesn't matter much to me either way. I was just looking at code > compared to ice driver while reviewing. My preference is to apply this patchset. We/I can easily followup and change this to use the more compact approach later (if someone prefers). I know net-next is "closed", but this patchset was posted prior to the close. Plus, a number of companies are waiting for the XDP-hint for HW RX timestamp. The support for driver stmmac is already in net-next (commit e3f9c3e34840 ("net: stmmac: add Rx HWTS metadata to XDP receive pkt")). Thus, it would be a help if both igc+stmmac changes land in same kernel version, as both drivers are being evaluated by these companies. Pretty please, --Jesper