From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9375B43A9F; Wed, 7 Feb 2024 10:25:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6A60540295; Wed, 7 Feb 2024 10:25:49 +0100 (CET) Received: from fhigh2-smtp.messagingengine.com (fhigh2-smtp.messagingengine.com [103.168.172.153]) by mails.dpdk.org (Postfix) with ESMTP id 980F840279 for ; Wed, 7 Feb 2024 10:25:47 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfhigh.nyi.internal (Postfix) with ESMTP id DF5F311400C3; Wed, 7 Feb 2024 04:25:46 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 07 Feb 2024 04:25:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1707297946; x=1707384346; bh=lCqVqoHH9InWQtolXaloVRbyD/AhVR9+mzNnGwOvOJ4=; b= U+M+Wz+uGjsaOJVlV5wwPPHwrvrI9vEzC57w6xQblpTFemJH2EJUJdB9DcxyDKh+ 4ZsHNNl4QzolohbjiZ7X+3LhnS55eIKRMxFto6EqvqiapEk1tt2IUMsrbbXcg3va VXw5lcB7d+hz/HMPEJqlynK+F8H1hvQsXQ9yjcOl32SuM5egWP5X10vlA2hWLdLa gs++yp+EsIglOkxN+fnunxUDI1Au6WXYSlDuckFYTyqyB+gaO58iCp+zCCd7ono0 p2bRDSqmt7axWH3XqVwSNqxK7t0ENYIDLfVtHOlo6Iv7cNc6MPttoTMLTMP7U/jL wPOlmQwIAYjPWUin6zmQnw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707297946; x= 1707384346; bh=lCqVqoHH9InWQtolXaloVRbyD/AhVR9+mzNnGwOvOJ4=; b=h F+o9rRiOij8C+LkzWlwsY2ALDUPSi/QCr9iwREnWt8pEZNJA2KkiooTYZclL3LQq AOsgg04hyflzcXLMelN7zsxH0Bew9mtU6d1rJD/fl/L3p+ZPyBUJ/8bV7v8WeQKe l4ngAtUrafsbkcdOQiDROPjGj1JhvmEyYhtpMydIKIbDFtiFx+SY2wkprlxdle3O 70QA+TC/F5J8Zsbu6GWU9BL9/hR+HqW0ohfl7HnyhaCYAoeE2pUpQQ3FER6AR7rp EDwSXIKWzKMkkbN+i7MreyHaDnmLEGUJifmfPE8QY0Nw1vBXqbBHhJgpB+EdHRZ9 ASrvZgObOXEJeL4dWCkSw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrtddvucetufdoteggodetrfdotffvucfrrh hofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgenuceurghi lhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurh ephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghsucfo ohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtffrrg htthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdeikefgkedu hedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 7 Feb 2024 04:25:44 -0500 (EST) From: Thomas Monjalon To: Ori Kam Cc: Dariusz Sosnowski , "ferruh.yigit@amd.com" , "cristian.dumitrescu@intel.com" , "andrew.rybchenko@oktetlabs.ru" , "stephen@networkplumber.org" , "dev@dpdk.org" , Raslan Darawsheh Subject: Re: [PATCH 1/4] ethdev: introduce encap hash calculation Date: Wed, 07 Feb 2024 10:25:42 +0100 Message-ID: <2629207.7s5MMGUR32@thomas> In-Reply-To: References: <20240128093943.4461-1-orika@nvidia.com> <3266952.oiGErgHkdL@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 07/02/2024 07:56, Ori Kam: > Hi Thomas, > > > -----Original Message----- > > From: Thomas Monjalon > > Sent: Wednesday, February 7, 2024 12:40 AM > > > > 28/01/2024 10:39, Ori Kam: > > > During the encapsulation of a packet, it is expected to calculate the > > > hash value which is based on the original packet (the outer values, > > > which will become the inner values). > > > > It is not clear what the hash is for. > > Will add explanation. > > > > > > The tunnel protocol defines which tunnel field should hold this hash, > > > but it doesn't define the hash calculation algorithm. > > > > If the hash is stored in the packet header, > > I expect it to be reproducible when being checked. > > How the algorithm may be undefined? > > > The hash is not being checked it is used for hash the packets to different queues. > the actual value is not important. It is critical that all packets that belongs to the same > flow will have the same hash value. That's the missing explanation. Please describe you are talking about an internal hash used for distributing packet in queues. You should also explain how it differs from RSS. > > > An application that uses flow offloads gets the first few packets > > > and then decides to offload the flow. As a result, there are two > > > different paths that a packet from a given flow may take. > > > SW for the first few packets or HW for the rest. > > > When the packet goes through the SW, the SW encapsulates the packet > > > and must use the same hash calculation as the HW will do for > > > the rest of the packets in this flow. > > > > > > This patch gives the SW a way to query the hash value > > > for a given packet as if the packet was passed through the HW. > > > > > > Signed-off-by: Ori Kam > > > --- > > > +Calculate encap hash > > > +~~~~~~~~~~~~~~~~~~~~ > > > + > > > +Calculating hash of a packet in SW as it would be calculated in HW for the > > encap action > > > > We should give the real full name of the flow action. > > > > > + > > > +When the HW execute an encapsulation action, it may calculate an hash > > value which is based > > > +on the original packet. This hash is stored depending on the encapsulation > > protocol, in one > > > +of the outer fields. > > > > Give an example of such encapsulation protocol? > > Sure, > Just to be clear something like this? > When the HW execute an encapsulation action for example for VXLAN tunnel,, it may ... I was more thinking about saying which fields are hashed in VXLAN, and more importantly how/when the hash is used.