> -----Original Message----- > From: sk...@marvell.com <sk...@marvell.com> > Sent: Thursday, October 19, 2023 4:20 PM > To: Sunil Kumar Kori <sk...@marvell.com>; Rakesh Kudurumalla > <rkuduruma...@marvell.com> > Cc: dev@dpdk.org > Subject: [EXT] [PATCH v10 12/12] app/graph: support l3fwd use case > > External Email > > ---------------------------------------------------------------------- > From: Rakesh Kudurumalla <rkuduruma...@marvell.com> > > Adds an use case l3fwd. It contains a dedicated l3fwd.cli file mentioning > commands to configure the required resources. > > Once application successfully parses the l3fwd.cli then a graph is created > having > below nodes: > - ethdev_rx -> pkt_cls > > - pkt_cls -> ip4_lookup > - pkt_cls -> ip6_lookup > - pkt_cls -> pkt_drop > > - ip4_lookup -> ip4_rewrite > - ip4_lookup -> pkt_drop > > - ip6_lookup -> ip6_rewrite > - ip6_lookup -> pkt_drop > > - ip4_rewrite -> ethdev_tx > - ip4_rewrite -> pkt_drop > > - ip6_rewrite -> ethdev_tx > - ip6_rewrite -> pkt_drop > > - ethdev_tx -> pkt_drop > > Signed-off-by: Sunil Kumar Kori <sk...@marvell.com> > Signed-off-by: Rakesh Kudurumalla <rkuduruma...@marvell.com> > --- > +Supported Use cases > +------------------- > + * l3fwd > + > +This use case is supported for both PF and PCAP network devices. To
Both HW and PCAP vdev network device. Remove PF instance form doc. > +demonstrate, corresponding .cli files are available at > +``<dpdk_root_dir/app/graph/examples/>`` > +named as ``l3fwd.cli`` and ``l3fwd_pcap.cli`` respectively. > + > Running the Application > ----------------------- > > @@ -63,6 +71,26 @@ Following are the application command-line options: > > Dumps application usage > > +Examples > +~~~~~~~~ In order to have continuity, Please move "16.1. Supported Use cases" here and remove "Examples" 16.x Supported Use case 16.x.1 L3fwd 16.x.1.1 Example commands 16.x.1.2 Verifying traffic > + > +For PF devices > + > +.. code-block:: console > + > + ./dpdk-graph -c 0xff -a 0002:02:00.0 -a 0002:03:00.0 -- > + -s <dpdk_root_dir>/app/graph/examples/l3fwd.cli > + > +For net_pcapX devices > + > +.. code-block:: console > + > + ./dpdk-graph -c 0xff -- > vdev=net_pcap0,rx_pcap=in_net_pcap0.pcap,tx_pcap=out_net_pcap1.pcap > + -- > vdev=net_pcap1,rx_pcap=in_net_pcap1.pcap,tx_pcap=out_net_pcap0.pcap > + -- -s > + <dpdk_root_dir>/app/graph/examples/l3fwd_pcap.cli > + > +Refer section :ref:`verifying_traffic` to create .pcap file used here. > + > Supported CLI commands > ---------------------- > > @@ -223,3 +251,84 @@ Created graph for use case > > On the successful execution of ``<usecase>.cli`` file, corresponding graph > will > be created. > This section mentions the created graph for each use case. > + > +l3fwd > +~~~~~ > + > +.. _figure_l3fwd_graph: > + > +.. figure:: img/graph-usecase-l3fwd.* > + > +.. _verifying_traffic: > + > +Verifying traffic > +~~~~~~~~~~~~~~~~~ > + > +``l3fwd.cli`` and ``l3fwd_pcap.cli`` creates setup with two network > +ports. Routing between these ports are done by lookup node routing > +information. For current use case, following routing table is used: > + > +.. code-block:: console > + > + DIP port > + 10.0.2.2 1 > + 20.0.2.2 0 > + > +On the successful execution of ``l3fwd.cli`` or ``l3fwd_pcap.cli``, > +user needs to send traffic with mentioned DIP. > + > +For net_pcapX devices, required pcap file should be created and passed > +to application. These pcap files can be created in several ways. Scapy is > one of > the method to get the same: > + > +.. code-block:: console > + > + # scapy > + > + aSPY//YASa > + apyyyyCY//////////YCa | > + sY//////YSpcs scpCY//Pp | Welcome to Scapy > + ayp ayyyyyyySCP//Pp syY//C | Version 2.4.3 > + AYAsAYYYYYYYY///Ps cY//S | > + pCCCCY//p cSSps y//Y | > https://urldefense.proofpoint.com/v2/url?u=https- > 3A__github.com_secdev_scapy&d=DwIDAg&c=nKjWec2b6R0mOyPaz7xtfQ&r= > 1DGob4H4rxz6H8uITozGOCa0s5f4wCNtTa4UUKvcsvI&m=V_QcQyFL- > NxiuHEAdNEZlQ379HvK37suZH_8Yfuuz-HwEKmVw5Iy-SbtS95- > brBb&s=XR2R_CEDkRJPhayLXSY1ZRnzrZsuR-UDaSSDHELwAnQ&e= > + SPPPP///a pP///AC//Y | > + A//A cyP////C | Have fun! > + p///Ac sC///a | > + P////YCpc A//A | We are in France, we say Skappee. > + scccccp///pSP///p p//Y | OK? Merci. > + sY/////////y caa S//P | -- Sebastien Chabal > + cayCyayP//Ya pY/Ya | > + sY/PsY////YCc aC//Yp > + sc sccaCY//PCypaapyCP//YSs > + spCPY//////YPSps > + ccaacs > + using IPython 7.13.0 This graphics can be removed in the doc > + >>> > + >>> Remove this > + >>> pkts=[Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="10.0.2.2")] > + >>> > + >>>wrpcap("in_net_pcap1.pcap",pkts) > + >>> > + >>> Remove above two lines > + >>> pkts=[Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="29.0.0.1", dst="20.0.2.2"), > + Ether(dst="FA:09:F9:D7:E0:9D", > src="10:70:1d:2f:42:2d")/IP(src="28.0.0.1", dst="20.0.2.2")] > + >>> > + >>>wrpcap("in_net_pcap0.pcap",pkts) > + >>> Remove above line > + >>> quit Which above changes: Acked-by: Jerin Jacob <jer...@marvell.com>