From patchwork Tue Sep 21 14:59:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lance Richardson X-Patchwork-Id: 99374 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E427FA0C45; Tue, 21 Sep 2021 16:59:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 676CA40DF8; Tue, 21 Sep 2021 16:59:40 +0200 (CEST) Received: from mail-pj1-f52.google.com (mail-pj1-f52.google.com [209.85.216.52]) by mails.dpdk.org (Postfix) with ESMTP id AEF8E4003C for ; Tue, 21 Sep 2021 16:59:39 +0200 (CEST) Received: by mail-pj1-f52.google.com with SMTP id me1so5921283pjb.4 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=PAurjqwF8M2gZKCOJA5q3YqV2bdlsks+41IvqXSeYcc=; b=AF7upLVlmIk0f93ySFCGe71TnwFEG1TsSR09exqgGmv1UWFvubr8S7lafDQ363MrN9 fzMZmbMtmFlpkRMZxmCnaYo7OmGLOby5ojo7/9PJ0pjWV3RbmegSi5GALsWpkz2dRwlM Wb6Xx4/I/w5TSGrXXuseZWg8K6tsTHtXDKPJ4= 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=PAurjqwF8M2gZKCOJA5q3YqV2bdlsks+41IvqXSeYcc=; b=y18n0Hu5es720u3AxtoLCgniYC5BE+QEdhIwjhT1Wo8QhRhBr8I8HfMCI+P4/c/OGM XjQC+B3bFR1k3bXZuW+vT+jIJoWrqTDBaig5mFdyBi6Ps7brM+1le3GQOhIgXCvwH1Nf LaX3tMyuGo2TIaNgtw3+G/d/BPptVBDzG6LOhKRHF9jaDjjV5SMMpLNNwN+pJeWANAw5 jRgzeUM5nxibkp9JgcWVOTqjZpOiXyo6zPQJclzKisLPekwX6R/bbNajEeuPYX6bU4nM vTerM3krqokL+tWAis7Gc/wLc2nget5MIS3hPMsxQxGL+/zodkcXIuXoU/oGTRhLnwif arog== X-Gm-Message-State: AOAM532ohQSsjddrSoai9VnGWFqNVaDWpLfwNoYekGec/B/IF6671V2h yAk/mBB1IJeJkioc1pcInp60Xg== 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_Br=C3=B8?= =?utf-8?q?rup?= 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 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-dev] [PATCH v2] net: fix checksum API documentation 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 Sender: "dev" 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 Acked-by: Ferruh Yigit Acked-by: Olivier Matz --- 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)