From patchwork Thu Sep 16 16:10:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lance Richardson X-Patchwork-Id: 99034 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 5705DA0C41; Thu, 16 Sep 2021 18:10:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DCDBB407FF; Thu, 16 Sep 2021 18:10:51 +0200 (CEST) Received: from mail-pj1-f54.google.com (mail-pj1-f54.google.com [209.85.216.54]) by mails.dpdk.org (Postfix) with ESMTP id 2C9EC407FF for ; Thu, 16 Sep 2021 18:10:51 +0200 (CEST) Received: by mail-pj1-f54.google.com with SMTP id dw14so4910080pjb.1 for ; Thu, 16 Sep 2021 09:10:51 -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:mime-version; bh=KgKLK1y58E/OwYIpxG7gq9xZVQOyJL5tBEq2myTAhPw=; b=YxC8peDqoV+sX5dqpaogSudJsvs6VZiD2sL1Z2pABes7wAwyWbGdZuyKvgmkWM3jci xFcFMUleY8JR9sqBLl1Na42L4951Q7/4lWD6RpPn1mJytYjZ6vYdg/wqseqRsbywEEoi vVqi+CqHG8iSN6UjxKlGZCzc5c+DdXUsZzXoU= 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:mime-version; bh=KgKLK1y58E/OwYIpxG7gq9xZVQOyJL5tBEq2myTAhPw=; b=VIqSRzIwTJFd8NkInlZn7HC9ckIIHPV/5090DHUGBhBdxPrkxZzo/OMWZZOAZM7kUu IumVgchATkDDbu8LBvC+MK2N0udbC32J5U4C/GMoti4M7ieZNkGVVsYKw52IIeeGIJ7V 6SP9imfu3V+qKpxqhgzKb30Ae6ZAyC5FquiPX3f+xx1mqdXpA2XwyWxkPZlkAcl0fobM VR+Wjy8/6H5TSAz71ZyznPmsDsnezzhnnznVIj7zf1sps7SnRi0CWur9xFwSrTYPIddJ ARYWAuh4+2aeXPE53B3Oc0K+2OJmS43l49/LTZyH66qiNeHlTc2XARDyX8yUbJp4Ev44 QuTg== X-Gm-Message-State: AOAM533CEhYMsoQoEu63dYb3Sx+31AAW3es/JsL7GqcKcPNIxrnrr9+J I1R3QnIRyWhHc5o3//QJuVLGZA== X-Google-Smtp-Source: ABdhPJz66UHnvTODVSXwiK9Tcu4c0FG4s92EWUnzvA2InSdvyAfFC89EFQMdjIunaYv3mS0MRYEEBA== X-Received: by 2002:a17:90b:38cc:: with SMTP id nn12mr12055364pjb.81.1631808650188; Thu, 16 Sep 2021 09:10:50 -0700 (PDT) Received: from localhost.localdomain ([192.19.11.250]) by smtp.gmail.com with ESMTPSA id mi18sm3433033pjb.15.2021.09.16.09.10.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Sep 2021 09:10:49 -0700 (PDT) From: Lance Richardson To: Olivier Matz , Konstantin Ananyev , =?utf-8?q?Morten_Br?= =?utf-8?q?=C3=B8rup?= , Andrew Rybchenko Cc: dev@dpdk.org, stable@dpdk.org Date: Thu, 16 Sep 2021 12:10:40 -0400 Message-Id: <20210916161040.346703-1-lance.richardson@broadcom.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [dpdk-dev] [PATCH] 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 Reviewed-by: Morten Brørup --- lib/net/rte_ip.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/net/rte_ip.h b/lib/net/rte_ip.h index 05948b69b7..fd08ea31b2 100644 --- a/lib/net/rte_ip.h +++ b/lib/net/rte_ip.h @@ -488,7 +488,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 +509,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)