> -----Original Message----- > From: Ori Kam [mailto:or...@mellanox.com] > Sent: Thursday, October 19, 2017 7:56 AM > To: adrien.mazarg...@6wind.com; Mcnamara, John <john.mcnam...@intel.com> > Cc: dev@dpdk.org; or...@mellanox.com > Subject: [PATCH] doc: add basic howto for flow API > > 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. > > Signed-off-by: Ori Kam <or...@mellanox.com>
Hi Ori, Thanks for useful and very doc. It is good to see additions to the How-to guides. 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 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='176.80.50.4', dst='192.168.3.1'), > + iface = <some interface>, count 1) >> > + sendp(Ether()/Dot1Q()/IP(src='176.80.50.5', dst='192.168.3.2'), iface > + = <some interface>, count 1) > + > +terminal 1: output log:: > + > + received packet with src ip = 176.80.50.4 received packet with src > + ip = 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='176.80.50.4', dst='192.168.3.1'), > + iface = <some interface>, count 1) >> There is a typo here and in the other scapy commands. It should be: count=1 Also <some interface> would be better as a string. And the line is also long so something like this would be better: Terminal 2: running scapy:: $scapy welcome to Scapy >> sendp(Ether()/Dot1Q()/IP(src='176.80.50.4', dst='192.168.3.1'), \ iface='some interface', count=1) >> sendp(Ether()/Dot1Q()/IP(src='176.80.50.5', dst='192.168.3.2'), \ iface='some interface', count=1) I have some other small comments/suggestions that I will send to you offline. Thanks, John