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.133.124]) by mail.toke.dk (Postfix) with ESMTPS id 23B1199E61C for ; Fri, 9 Sep 2022 10:12:49 +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=ORn4ONPo DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662711168; 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=w1aljE3uZPlufePUzO0o5QnlpqVItqq0OhrVapvAOQE=; b=ORn4ONPoKzRl8RKCXk43LyULbiZhXGf2brbja8nceSeAEmwy0Nej1/ubdYUFtl3xYQSDYa cvL65xoRkO+3wfTJ/fCYCQzW7KzFnGgqLeF+YWzFDcAFF5hqFw/tL4/2NbkIwYfshB5oiF Ksr/LT3vdPjHkuPA+/rmT8NQLicLwIE= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-518-mWSQUytOM8qsX94SjOhetg-1; Fri, 09 Sep 2022 04:12:41 -0400 X-MC-Unique: mWSQUytOM8qsX94SjOhetg-1 Received: by mail-wm1-f71.google.com with SMTP id h4-20020a1c2104000000b003b334af7d50so1811514wmh.3 for ; Fri, 09 Sep 2022 01:12:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=w1aljE3uZPlufePUzO0o5QnlpqVItqq0OhrVapvAOQE=; b=L4zYFLGGzmIshIxXiTd5oCHctV+HRuOu4ZjDjLCWSUM4p0vqjmvAvm0EFQogKpot9C Nf3OIDv58j5h1vhLvHIml1C1XVyTcpEv6otC2Q25yBRSFRGGvEo9OP/YpvSA3JWzoqKi +pYGi92W707PpiyhLF3ujwo6XYH2sxLsyVzMV3O+sb6OPzhoTIsQDC+NFNKZRCRrZwS7 uib+hwhvF732S76jAa+9nCJLnmk+NM8k1nGVbudJbB8QnIA/yltBfmQJSdB0FXXMCcH2 LKltyqw2veTe34NCD86jWw55bjvUtCabCWwnx0Is5q3i2+Xx+eH2TFy7R5iLRjbXoisG z2yA== X-Gm-Message-State: ACgBeo3Xs07TLOCfpRD6Okd3Bp6YVTdheZeBAceF1mH+INecyhXXuj84 LoR929OlrZ+SjHP/sqpl7t1eCSoVICah0K17HeayiZCJXLb3LPbf+P7zTsEnWCcPRj3GBKTYNfE OG124cTgcdaKkZarCb/Kq X-Received: by 2002:a05:6000:178d:b0:226:ffe8:72df with SMTP id e13-20020a056000178d00b00226ffe872dfmr7007123wrg.496.1662711160070; Fri, 09 Sep 2022 01:12:40 -0700 (PDT) X-Google-Smtp-Source: AA6agR6GbqXE9LDoUcwdJx+L6WAX5Qhcp4f5VOTBbdcg+7QT8tyP64NbNXEg6EPqcjB/DNWdFfFwDA== X-Received: by 2002:a05:6000:178d:b0:226:ffe8:72df with SMTP id e13-20020a056000178d00b00226ffe872dfmr7007109wrg.496.1662711159833; Fri, 09 Sep 2022 01:12:39 -0700 (PDT) Received: from [192.168.0.4] ([78.17.187.218]) by smtp.gmail.com with ESMTPSA id z2-20020a05600c0a0200b003a5c244fc13sm6247863wmp.2.2022.09.09.01.12.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Sep 2022 01:12:39 -0700 (PDT) Message-ID: Date: Fri, 9 Sep 2022 09:12:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.1 To: Magnus Karlsson , Jesper Dangaard Brouer References: <166256538687.1434226.15760041133601409770.stgit@firesoul> <166256558657.1434226.7390735974413846384.stgit@firesoul> <9aab9ef1-446d-57ab-5789-afffe27801f4@redhat.com> From: Maryam Tahhan In-Reply-To: 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: ZXMBBO7AH5HBNWGCAWKVPEGDBVGW3SL7 X-Message-ID-Hash: ZXMBBO7AH5HBNWGCAWKVPEGDBVGW3SL7 X-MailFrom: mtahhan@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, bpf@vger.kernel.org, netdev@vger.kernel.org, xdp-hints@xdp-project.net, larysa.zaremba@intel.com, memxor@gmail.com, Lorenzo Bianconi , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , dave@dtucker.co.uk, Magnus Karlsson , bjorn@kernel.org X-Mailman-Version: 3.3.5 Precedence: list Subject: [xdp-hints] Re: [PATCH RFCv2 bpf-next 17/18] xsk: AF_XDP xdp-hints support in desc options List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: >>>> >>>> * Instead encode this information into each metadata entry in the >>>> metadata area, in some way so that a flags field is not needed (-1 >>>> signifies not valid, or whatever happens to make sense). This has the >>>> drawback that the user might have to look at a large number of entries >>>> just to find out there is nothing valid to read. To alleviate this, it >>>> could be combined with the next suggestion. >>>> >>>> * Dedicate one bit in the options field to indicate that there is at >>>> least one valid metadata entry in the metadata area. This could be >>>> combined with the two approaches above. However, depending on what >>>> metadata you have enabled, this bit might be pointless. If some >>>> metadata is always valid, then it serves no purpose. But it might if >>>> all enabled metadata is rarely valid, e.g., if you get an Rx timestamp >>>> on one packet out of one thousand. >>>> >> >> I like this option better! Except that I have hoped to get 2 bits ;-) > > I will give you two if you need it Jesper, no problem :-). > Ok I will look at implementing and testing this and post an update. Thanks folks >> The performance advantage is that the AF_XDP descriptor bits will >> already be cache-hot, and if it indicates no-metadata-hints the AF_XDP >> application can avoid reading the metadata cache-line :-). > > Agreed. I prefer if we can keep it simple and fast like this. >