From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 949AF1B1ED for ; Thu, 19 Oct 2017 12:05:57 +0200 (CEST) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Oct 2017 03:05:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,400,1503385200"; d="scan'208";a="1026862987" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by orsmga003.jf.intel.com with ESMTP; 19 Oct 2017 03:05:54 -0700 Received: from irsmsx103.ger.corp.intel.com ([169.254.3.49]) by irsmsx105.ger.corp.intel.com ([163.33.3.28]) with mapi id 14.03.0319.002; Thu, 19 Oct 2017 11:05:54 +0100 From: "Mcnamara, John" To: Ori Kam , "adrien.mazarguil@6wind.com" CC: "dev@dpdk.org" Thread-Topic: [PATCH] doc: add basic howto for flow API Thread-Index: AQHTSKdkWayC0TCBqkGheJ81MSiIQKLq79NA Date: Thu, 19 Oct 2017 10:05:53 +0000 Message-ID: References: <1508396139-27687-1-git-send-email-orika@mellanox.com> In-Reply-To: <1508396139-27687-1-git-send-email-orika@mellanox.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMWEwYzRkOGQtZTg3ZS00MWVmLWI5MTItNzk0MzU2YWNkNzkzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImcrVnord3doNHczNjdcL2M3d3JlZHVyYnhmdml3V1FXdW85aE9uTVkrcjUwPSJ9 dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] doc: add basic howto for flow API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Oct 2017 10:05:58 -0000 > -----Original Message----- > From: Ori Kam [mailto:orika@mellanox.com] > Sent: Thursday, October 19, 2017 7:56 AM > To: adrien.mazarguil@6wind.com; Mcnamara, John > Cc: dev@dpdk.org; orika@mellanox.com > Subject: [PATCH] doc: add basic howto for flow API >=20 > As the rte flow is a new complex module in the DPDK. > In order to ease developers in to using this feature it was suggested to > supply a simple howto doc. >=20 > Signed-off-by: Ori Kam Hi Ori, Thanks for useful and very doc. It is good to see additions to the How-to g= uides. We should have more of those. Some minor comments below. > > + tpmd> flow create 0 ingress pattern eth / vlan / ipv4 dst is > + 192.168.3.2 / end actions drop / end The testpmd commands are very long and run off the page in the=20 PDF and Html docs. Something like the following would be better and just as clear: In this example we will create a simple rule that drops packets whose IPv4 destination equals 192.168.3.2. This code is equivalent to the following testpmd command (wrapped for clarity):: tpmd> flow create 0 ingress pattern eth / vlan / ipv4 dst is 192.168.3.2 / end actions drop / end > + $scapy > + welcome to Scapy > + >> sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.4', dst=3D'192.168.3.1'), > + iface =3D , count 1) >> > + sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.5', dst=3D'192.168.3.2'), ifa= ce > + =3D , count 1) > + > +terminal 1: output log:: > + > + received packet with src ip =3D 176.80.50.4 received packet with src > + ip =3D 176.80.50.5 > + > +terminal 1: running sample app flow rule enabled:: > + > + ./filter-program enabled > + [waiting for packets] > + > +terminal 2: running scapy:: > + > + $scapy > + welcome to Scapy > + >> sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.4', dst=3D'192.168.3.1'), > + iface =3D , count 1) >> There is a typo here and in the other scapy commands. It should be: count=3D1 Also would be better as a string. And the line is also lon= g so something like this would be better: Terminal 2: running scapy:: $scapy welcome to Scapy >> sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.4', dst=3D'192.168.3.1'), \ iface=3D'some interface', count=3D1) >> sendp(Ether()/Dot1Q()/IP(src=3D'176.80.50.5', dst=3D'192.168.3.2'), \ iface=3D'some interface', count=3D1) I have some other small comments/suggestions that I will send to you offlin= e. Thanks, John