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 79D45A0C4C for ; Tue, 21 Sep 2021 16:59:41 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6B02041145; Tue, 21 Sep 2021 16:59:41 +0200 (CEST) Received: from mail-pj1-f45.google.com (mail-pj1-f45.google.com [209.85.216.45]) by mails.dpdk.org (Postfix) with ESMTP id B027A40DF8 for ; Tue, 21 Sep 2021 16:59:39 +0200 (CEST) Received: by mail-pj1-f45.google.com with SMTP id dw14so14571165pjb.1 for ; Tue, 21 Sep 2021 07:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version; bh=dzBpOems7mLrg0ObG8HHVAkqHySkMxqPHxciWlfyFDk=; b=E85qEsJC89jZtb8PqjdYZ0yF8Zxcl/YLtBn9Ws5j/AAhma7VlSuwY7xnad9Hg2ndYq rLemtz0/FeWUT+qRb5fCWiWHMs1mDqOppTjjZqPHlSlvSSPguQUbc+rWhHYbjKzr59Qq xDNjBSjBgGHtNu+NdhuoQoS1LIRQP4CIibr9Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version; bh=dzBpOems7mLrg0ObG8HHVAkqHySkMxqPHxciWlfyFDk=; b=ncSXXJz+8yRg3CZHhvMT0O0anXU3BYte+yaUeza+L3tnS1beIzCeIHmSo37/m9xoLO icOKqOtlTVH1ZV9KF20jq9LVWyo9U6LdjTJTElGriYm3SFrOi5qSckkcOcmvE68VE256 4jXcYksdLGyv3eB+GYcCcUmt9PxGAombGpzgcz5raKF7clQlFXE8IV0bEo1nMxLN8x3Q Kr3m7muEe92O4cikVwDV+g+A6MO4l5nodHjVwkyKriTuZGPYGuL78xpkhLKhW+U0TyH2 PyvW5bdhB7UmY1aROQEs3xYGrKhD+bjwiqUnNtg79Nio8D2LYDYkZ5rBA6EQjfBJRypT nVQg== X-Gm-Message-State: AOAM532FzD4l5lwdW63GcBPyLBMD/iCZjsOl8oXkIABG72e4Y4S+MQfl oxwVQBSvFawpEgUTjGCT0SQFAg== X-Google-Smtp-Source: ABdhPJyR6Aij/q7V9fzAEspkZdScHBjHjRdHVDpKnw+9E6QMTUZ3RGX3YC/HrYraF2EvcPaS6iBEUQ== X-Received: by 2002:a17:902:6e0f:b0:13c:9d43:7d7a with SMTP id u15-20020a1709026e0f00b0013c9d437d7amr28051119plk.62.1632236378535; Tue, 21 Sep 2021 07:59:38 -0700 (PDT) Received: from lrichardson-VirtualBox.dhcp.broadcom.net ([192.19.231.250]) by smtp.gmail.com with ESMTPSA id b20sm18092844pfp.26.2021.09.21.07.59.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 07:59:38 -0700 (PDT) From: Lance Richardson To: Olivier Matz , Konstantin Ananyev , Andrew Rybchenko , =?UTF-8?q?Morten=20Br=C3=B8rup?= Cc: dev@dpdk.org, ferruh.yigit@intel.com, stable@dpdk.org Date: Tue, 21 Sep 2021 10:59:24 -0400 Message-Id: <20210921145924.54026-1-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210916161040.346703-1-lance.richardson@broadcom.com> References: <20210916161040.346703-1-lance.richardson@broadcom.com> MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="0000000000008fc3d605cc82a5b4" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-stable] [PATCH v2] net: fix checksum API documentation X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" --0000000000008fc3d605cc82a5b4 Content-Transfer-Encoding: 8bit Minor corrections and improvements to documentation for checksum APIs. Fixes: 6006818cfb26 ("net: new checksum functions") Fixes: 45a08ef55e44 ("net: introduce functions to verify L4 checksums") Cc: stable@dpdk.org Signed-off-by: Lance Richardson --- v2: - Updates for rte_ipv4_udptcp_cksum() lib/net/rte_ip.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h index 05948b69b7..bc3dd44a4c 100644 --- a/lib/net/rte_ip.h +++ b/lib/net/rte_ip.h @@ -371,15 +371,14 @@ __rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr) /** * Process the IPv4 UDP or TCP checksum. * - * The IP and layer 4 checksum must be set to 0 in the packet by - * the caller. + * The layer 4 checksum must be set to 0 in the L4 header by the caller. * * @param ipv4_hdr * The pointer to the contiguous IPv4 header. * @param l4_hdr * The pointer to the beginning of the L4 header. * @return - * The complemented checksum to set in the IP packet. + * The complemented checksum to set in the L4 header. */ static inline uint16_t rte_ipv4_udptcp_cksum(const struct rte_ipv4_hdr *ipv4_hdr, const void *l4_hdr) @@ -488,7 +487,7 @@ rte_ipv6_phdr_cksum(const struct rte_ipv6_hdr *ipv6_hdr, uint64_t ol_flags) } /** - * @internal Calculate the non-complemented IPv4 L4 checksum + * @internal Calculate the non-complemented IPv6 L4 checksum */ static inline uint16_t __rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr) @@ -509,15 +508,15 @@ __rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr) /** * Process the IPv6 UDP or TCP checksum. * - * The IPv4 header should not contains options. The layer 4 checksum - * must be set to 0 in the packet by the caller. + * The IPv6 header must not be followed by extension headers. The layer 4 + * checksum must be set to 0 in the L4 header by the caller. * * @param ipv6_hdr * The pointer to the contiguous IPv6 header. * @param l4_hdr * The pointer to the beginning of the L4 header. * @return - * The complemented checksum to set in the IP packet. + * The complemented checksum to set in the L4 header. */ static inline uint16_t rte_ipv6_udptcp_cksum(const struct rte_ipv6_hdr *ipv6_hdr, const void *l4_hdr) -- 2.25.1 --0000000000008fc3d605cc82a5b4--