From patchwork Thu Mar 19 16:36:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olivier Matz X-Patchwork-Id: 4076 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id CD62B6849; Thu, 19 Mar 2015 17:36:56 +0100 (CET) Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id DEDDA5683 for ; Thu, 19 Mar 2015 17:36:53 +0100 (CET) Received: by wibg7 with SMTP id g7so122882650wib.1 for ; Thu, 19 Mar 2015 09:36:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=St7PDpHP0LeOh1ubUF7r62EyV10owqWP+VXIwgOKaXc=; b=LwP7J6iah8E+SZTlHYyCAvM+yCzM+Ak5G37/NFooIvjqUcBRFIl4PAENHp7bAKCxWr UH6Sh+AXqfWJVnx28hOJ2Asmx+aRtIGD5B5ouWeV5PPAlYFNOw4Zaht2nU2moufB82I7 J8+bf6MV1ZtwpBFr3pE8w9N8VlRDxVZdc21mcWiaWWzUKv42//jbu2sJ3ZhPSZqJzawg 1LzlVsg9+2OPJcEmQaUDRsqyjALN8j5v+ysTnMVwKC1Tm8z0ZxN3Ce5hN7zckwEiCgdx 1SeFfN0+wcd7S2uTUZcdCWDLodU9n86VKFSeVD9pO1/9/ySHeHuLKRm/+R3x5JXAQx74 5auQ== X-Gm-Message-State: ALoCoQkJrWIiJ5gNweUV/zXl2pg3jGRk9WnpndZwNG0EPZLmNzrt0aopQXmMHlD2S0njQMop0A0L X-Received: by 10.194.76.69 with SMTP id i5mr13637700wjw.3.1426783013809; Thu, 19 Mar 2015 09:36:53 -0700 (PDT) Received: from glumotte.dev.6wind.com (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id fo9sm8146449wib.16.2015.03.19.09.36.53 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 19 Mar 2015 09:36:53 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Date: Thu, 19 Mar 2015 17:36:37 +0100 Message-Id: <1426782998-11280-2-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1426782998-11280-1-git-send-email-olivier.matz@6wind.com> References: <1426782998-11280-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH 1/2] doc: update testpmd guide about csum forward engine X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Document the functions introduced by commit 64fc36064d. Signed-off-by: Olivier Matz Acked-by: Pablo de Lara --- app/test-pmd/cmdline.c | 2 +- doc/guides/testpmd_app_ug/testpmd_funcs.rst | 53 +++++++++++++++++++++++------ 2 files changed, 44 insertions(+), 11 deletions(-) diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c index 604c3ec..e6107a0 100644 --- a/app/test-pmd/cmdline.c +++ b/app/test-pmd/cmdline.c @@ -317,7 +317,7 @@ static void cmd_help_long_parsed(void *parsed_result, "csum set (ip|udp|tcp|sctp|outer-ip) (hw|sw) (port_id)\n" " Select hardware or software calculation of the" - " checksum with when transmitting a packet using the" + " checksum when transmitting a packet using the" " csum forward engine.\n" " ip|udp|tcp|sctp always concern the inner layer.\n" " outer-ip concerns the outer IP layer in" diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 4d430ff..b3abe9c 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -505,28 +505,60 @@ Disable hardware insertion of a VLAN header in packets sent on a port: tx_vlan reset (port_id) -tx_checksum set -~~~~~~~~~~~~~~~ +csum set +~~~~~~~~ Select hardware or software calculation of the checksum when transmitting a packet using the csum forward engine: -tx_cksum set (ip|udp|tcp|sctp|vxlan) +csum set (ip|udp|tcp|sctp|outer-ip) (hw|sw) (port_id) + +- ip|udp|tcp|sctp always concern the inner layer. -ip|udp|tcp|sctp always concern the inner layer. -vxlan concerns the outer IP and UDP layer (in case the packet -is recognized as a vxlan packet by the forward engine) +- outer-ip concerns the outer IP layer in case the packet is recognized + as a tunnel packet by the forward engine (vxlan, gre and ipip are + supported). See "csum parse-tunnel" command. .. note:: Check the NIC Datasheet for hardware limits. -tx_checksum show -~~~~~~~~~~~~~~~~ +csum parse-tunnel +~~~~~~~~~~~~~~~~~ + +Define how tunneled packets should be handled by the csum forward +engine. + +csum parse-tunnel (on|off) (tx_port_id) + +If enabled, the csum forward engine will try to recognize supported +tunnel headers (vxlan, gre, ipip). + +If disabled, treat tunnel packets as non-tunneled packets (a inner +header is handled as a packet payload). + +.. note:: + + The port argument is the TX port like in the "csum set" command. + +Example: + +Consider a packet as following: +"eth_out/ipv4_out/udp_out/vxlan/eth_in/ipv4_in/tcp_in" + +- If parse-tunnel is enabled, the ip|udp|tcp|sctp parameters of "csum + set" command are about inner headers (here ipv4_in and tcp_in), and the + outer-ip parameter is about outer headers (here ipv4_out). + +- If parse-tunnel is disabled, the ip|udp|tcp|sctp parameters of "csum + set" command are about outer headers, here ipv4_out and udp_out. + +csum show +~~~~~~~~~ Display tx checksum offload configuration: -tx_checksum show (port_id) +csum show (port_id) tso set ~~~~~~~ @@ -536,7 +568,8 @@ Enable TCP Segmentation Offload in csum forward engine: tso set (segsize) (port_id) .. note:: - Please check the NIC datasheet for HW limits + + Check the NIC datasheet for hardware limits tso show ~~~~~~~~