From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] app/testpmd: add engine that replies to ARP and ICMP echo requests Date: Fri, 16 May 2014 16:26:15 +0200 Message-ID: <3536892.UpqT5Qq6ao@xps13> References: <1398864611-31491-1-git-send-email-david.marchand@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev-VfR2kkLFssw@public.gmane.org To: Ivan Boule Return-path: In-Reply-To: <1398864611-31491-1-git-send-email-david.marchand-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" > 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