From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f170.google.com (mail-wi0-f170.google.com [209.85.212.170]) by dpdk.org (Postfix) with ESMTP id 3D807AFDB for ; Fri, 16 May 2014 16:26:11 +0200 (CEST) Received: by mail-wi0-f170.google.com with SMTP id bs8so2263704wib.1 for ; Fri, 16 May 2014 07:26:19 -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:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=fAxP6N7cyJmwhktKOq1Ey8XySLo+tNIUy4EeG3vivL8=; b=Ox1BqDK+IqfCIG8w9Xtc0FeKqIFI+9guwSMDkPjYpECJESSn+Zz6tHW+/2QWxC11q6 N7KErJWVi/B6NammuAtkCQ8qWJMrYz7Onwqh6i76SrNHfu/OtNT+F+zUdEOLEjdESj8n oXfwotHaQ4Ru+pth6m5iI7cPV65HRj2LTVFxmRGC0TkaXYka7pxrGCPhmahbFagoDUeo 7bhPqnycG9g1Rj4IhrcHmktGIEyAyv2JrEsFvkfCymD3vLTnyAgv6T3NvtY0+OUUt3h1 fS740EpwlHhmsXcRQaE5fvWI4swH845yYxlsnHEQ6P8pmjSHRBxrYCsvGcevKhbdcvyZ DZig== X-Gm-Message-State: ALoCoQkMiHHjpbqglLh2Ik3TpBDPJa4CEb4W9jxUFeChhBsJLzKj9GbTqErsuaCuVcW22gGL1m/Q X-Received: by 10.194.58.161 with SMTP id s1mr14239809wjq.43.1400250379415; Fri, 16 May 2014 07:26:19 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id h3sm3629730wiz.16.2014.05.16.07.26.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 May 2014 07:26:18 -0700 (PDT) From: Thomas Monjalon To: Ivan Boule Date: Fri, 16 May 2014 16:26:15 +0200 Message-ID: <3536892.UpqT5Qq6ao@xps13> Organization: 6WIND User-Agent: KMail/4.13 (Linux/3.14.4-1-ARCH; KDE/4.13.0; x86_64; ; ) In-Reply-To: <1398864611-31491-1-git-send-email-david.marchand@6wind.com> References: <1398864611-31491-1-git-send-email-david.marchand@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] app/testpmd: add engine that replies to ARP and ICMP echo requests 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: , X-List-Received-Date: Fri, 16 May 2014 14:26:11 -0000 > From: Ivan Boule > > Add a new specific packet processing engine in the "testpmd" application > that only replies to ARP requests and to ICMP echo requests. > For this purpose, a new "icmpecho" forwarding mode is provided that can be > dynamically selected with the following testpmd command: > > set fwd icmpecho > > before starting the receipt of packets on the selected ports. > > Then, the "icmpecho" engine performs the following actions on all received > packets: > > - replies to a received ARP request by sending back on the RX port a ARP > reply with a "sender hardware address" field containing the MAC address > of the RX port, > > - replies to a ICMP echo request by sending back on the RX port a ICMP echo > reply, swapping the IP source and the IP destination address in the IP > header, > > - otherwise, simply drops the received packet. > > When replying to a received packet that was encapsulated into a VLAN tunnel, > the reply is sent back with the same VLAN identifier. > By default, the testpmd configures VLAN header stripping RX option on each > port. > This option is not managed by the icmpecho engine which won't detect > packets that were encapsulated into a VLAN. > To address this issue, the VLAN header stripping option must be previously > switched off with the following testpmd command: > > vlan set strip off > > When the "verbose" mode has been set with the testpmd command > "set verbose 1", the "icmpecho" engine displays informations about each > received packet. > > The "icmpecho" forwarding engine can also be used to simply check port > connectivity at the hardware level (check that cables are well-plugged) > and at the software level (receipt of VLAN packets, for instance). > > Signed-off-by: Ivan Boule Acked-by: Thomas Monjalon Applied for version 1.7.0. -- Thomas