[EXT] Re: [PATCH v2 4/4] app: add testgraph application

Sunil Kumar Kori skori at marvell.com
Fri Sep 8 13:00:14 CEST 2023


Hello everyone,

As per proposed CLIs to configure graph for different use cases, v3 is implemented under the following request:
https://patches.dpdk.org/project/dpdk/patch/20230908104907.4060511-1-skori@marvell.com/
Please take look on and provide feedback.

Regards
Sunil Kumar Kori

> -----Original Message-----
> From: Rakesh Kudurumalla <rkudurumalla at marvell.com>
> Sent: Friday, July 21, 2023 1:09 PM
> To: Sunil Kumar Kori <skori at marvell.com>; Jerin Jacob
> <jerinjacobk at gmail.com>; dev at dpdk.org
> Cc: Vamsi Krishna Attunuru <vattunuru at marvell.com>; Yan, Zhirun
> <zhirun.yan at intel.com>; thomas at monjalon.net; Jerin Jacob Kollanukkaran
> <jerinj at marvell.com>; Nithin Kumar Dabilpuram
> <ndabilpuram at marvell.com>; Liang, Cunming <cunming.liang at intel.com>;
> Wang, Haiyue <haiyue.wang at intel.com>
> Subject: RE: [EXT] Re: [PATCH v2 4/4] app: add testgraph application
> 
> 
> 
> > -----Original Message-----
> > From: Sunil Kumar Kori <skori at marvell.com>
> > Sent: Friday, July 21, 2023 12:31 PM
> > To: Jerin Jacob <jerinjacobk at gmail.com>; Rakesh Kudurumalla
> > <rkudurumalla at marvell.com>
> > Cc: Vamsi Krishna Attunuru <vattunuru at marvell.com>; dev at dpdk.org;
> Yan,
> > Zhirun <zhirun.yan at intel.com>; thomas at monjalon.net; Jerin Jacob
> > Kollanukkaran <jerinj at marvell.com>; Nithin Kumar Dabilpuram
> > <ndabilpuram at marvell.com>; Liang, Cunming <cunming.liang at intel.com>;
> > Wang, Haiyue <haiyue.wang at intel.com>
> > Subject: RE: [EXT] Re: [PATCH v2 4/4] app: add testgraph application
> >
> > > -----Original Message-----
> > > From: Jerin Jacob <jerinjacobk at gmail.com>
> > > Sent: Friday, July 21, 2023 12:18 PM
> > > To: Rakesh Kudurumalla <rkudurumalla at marvell.com>
> > > Cc: Vamsi Krishna Attunuru <vattunuru at marvell.com>; dev at dpdk.org;
> > Yan,
> > > Zhirun <zhirun.yan at intel.com>; thomas at monjalon.net; Jerin Jacob
> > > Kollanukkaran <jerinj at marvell.com>; Nithin Kumar Dabilpuram
> > > <ndabilpuram at marvell.com>; Liang, Cunming
> <cunming.liang at intel.com>;
> > > Wang, Haiyue <haiyue.wang at intel.com>; Sunil Kumar Kori
> > > <skori at marvell.com>
> > > Subject: Re: [EXT] Re: [PATCH v2 4/4] app: add testgraph application
> > >
> > > On Thu, Jul 20, 2023 at 9:22 PM Rakesh Kudurumalla
> > > <rkudurumalla at marvell.com> wrote:
> > > >
> > > >
> > > >
> > > > > -----Original Message-----
> > > > > From: Vamsi Krishna Attunuru <vattunuru at marvell.com>
> > > > > Sent: Thursday, June 1, 2023 8:14 AM
> > > > > To: Jerin Jacob <jerinjacobk at gmail.com>
> > > > > Cc: Yan, Zhirun <zhirun.yan at intel.com>; dev at dpdk.org;
> > > > > thomas at monjalon.net; Jerin Jacob Kollanukkaran
> > > > > <jerinj at marvell.com>; Nithin Kumar Dabilpuram
> > > > > <ndabilpuram at marvell.com>; Liang, Cunming
> > > > > <cunming.liang at intel.com>; Wang, Haiyue
> <haiyue.wang at intel.com>;
> > > > > Sunil Kumar Kori <skori at marvell.com>
> > > > > Subject: RE: [EXT] Re: [PATCH v2 4/4] app: add testgraph
> > > > > application
> > > > >
> > >
> > > >
> > > >
> > > > Example use case: l3fwd
> > > > ================
> > > > ;Configure usecase
> > > > graph l3fwd default 0xff
> > > >
> > > > ;global specific configuration
> > > > mempool mempool0 size 2046 buffers 32000 cache 256 cpu 0 ethdev
> > > > 0002:02:00.0 rxq 1 txq 1 mempool0 promiscuous off ethdev
> > > > 0002:03:00.0 rxq 1 txq 1 mempool0 promiscuous off
> > > > ip4 addr add 10.0.2.1/24 0002:02:00.0
> > > > ip4 addr add 10.0.3.1/24 0002:03:00.0 neigh add ipv4 10.0.2.2
> > > > 52:20:DA:4F:68:70 neigh add ipv4 10.0.2.5
> > > > 62:20:DA:4F:68:70 neigh add ipv4 10.0.3.2 72:20:DA:4F:68:70 neigh
> > > > add
> > > > ipv4 10.0.3.5 82:20:DA:4F:68:70
> > > >
> > > > ;node specific configuration
> > > > route add ipv4 ipv4_lookup 10.0.2.0 netmask 255.255.255.0 via
> > > > 10.0.2.1 route add ipv4 ipv4_lookup  10.0.3.0 netmask 255.255.255.0
> > > > via
> > > > 10.0.3.1
> > >
> > > I prefer to use node name first.
> > >
> > Ack.
> >
> > > >
> > > >
> > > > map ethdev_rx  port 0002:02:00.0 queue 0 core 6 map ethdev_rx  port
> > > > 0002:03:00.0 queue 1 core 5
> > >
> > > I prefer to use node name first.
> > >
> > Ack.
> >
> > > Rest looks good to me.
> > >
> > > >
> > > > ;Run usecase
> > > > graph start
> 
> Addressed comments and updated specification
> 
> Graph application Interface file
> Configure Use cases
> =============
> This section consists of which use cases are needed to be configured and
> model to be used along with number of coremask
> to run graph on that. Following is the exposed syntax to configure given use
> case.
> 
> Syntax:
> 
> graph <usecases> [usecase specific configuration] <model> [model specific
> configuration]
> 
> Where:
> 
> usecases: It is comma separated list defining the requested use cases.
> Example values are -
> l3fwd
> ipsec
> usecase specific configuration: It defines following usecase specific
> configuration -
> burst size (bsz)
> timeout (tmo)
> coremask
> model: It defines the model for dequeuing packets.  Example models are -
> run to completion (rtc)
> multi core dispatch (mcd)
> Global specific configuration
> ==================
> This section consists of device specific configuration which are needed to
> make a DPDK port usable such as number
> 
> of Rx/TX queues, MTU, mempool etc. Along with it consists global network
> table configuration required for each use case
> 
> such as configure IP address to device, arp entries for given IP etc. Supported
> hardware offloads to be used by
> this use case is also added under this configuration. Graph is created for this
> use case at the end of this configuration.
> 
> Syntax:
> 
> mempool <mempool_name> size <num> buffers <num> cache <val> <cpuid>
> 
> Where:
> 
> mempool_name  : Name of the mempool used for further pool operations.
> size <num>         : Size of each element in mempool
> buffers <num>   : Number of elements in mempool
> cache <val>        : Size of the per-core object cache
> <cpuid>              : Socket id
> 
> 
> Syntax:
> 
> ethdev <dbdf> rxq <num> txq <num> <mempool_name> promiscuous
> <on/off>
> ethdev <dbdf> tx_offload <bitmask>
> ethdev <dbdf> rx_offload <bitmask>
> ethdev <dbdf> promiscuous <on/off>
> ethdev <dbdf> mtu <size>
> 
>     Where:
> 
> dbdf                    : PCI id of device in DBDF format or vdev name for non-pci
> devices.
> rxq                      : Number of Rx queues on device
> txq                      : Number of Tx queues on device
> mempool_name : Mempool to be attached on RQ.
> rx_offload           : Supported offloads on ingress. It is bitmask of required
> offloads. Valid offloads are combination of RTE_ETH_RX_OFFLOAD_*
> tx_offload           : Supported offloads on egress. It is bitmask of required
> offloads. valid offloads are combination of RTE_ETH_TX_OFFLOAD_*
> promiscuous       : Toggle promiscuous mode
> mtu                      : MTU size
> 
> 
> Syntax:
> 
> neigh add ipv4 <ip> <mac>
> 
> Where:
> 
> ip    : IPv4/IPv6 address for which MAC address is to be added.
> mac: MAC  address which is to be configured corresponding to given IP.
> 
> 
> Syntax:
> 
> ip4 addr add <ip> netmask <mask> <dbdf>
> 
> Where:
> 
> ip       : IPv4 address which is to assigned to device.
> mask : Subnet mask.
> dbdf  : PCI id of device in DBDF format or vdev name for non-pci devices.
> 
> 
> Syntax:
> 
> ip6 addr add <ip> netmask <mask> <dbdf>
> 
> Where:
> 
> ip       : IPv6 address which is to assigned to device.
> mask : Subnet mask.
> dbdf  : PCI id of device in DBDF format or vdev name for non-pci devices.
> 
> 
> Node specific configuration
> ==================
> This section consists of configuration used by nodes in graph. Based on the
> use case, some configurations
> can be modified on the fly. Like for l3fwd use case, route entries can be
> added or deleted while running
> the application unlike other configuration. Following are exposed
> configurations:
> 
> Syntax:
> 
> <node_name> route add ipv4 <ip> netmask <mask> via <gateway>
> 
> Where:
> 
> node_name : Name of node where route is to be added. Currently only
> supported node is ip4_lookup.
> ip                 : IPv4 address which is to be added to route table.
> mask           : Subnet mask.
> gateway     : Gateway IP to redirect packet to next hop.
> 
> 
> Syntax:
> 
> <node_name> route add ipv6 <ip> netmask <mask> via <gateway>
> 
> Where:
> 
> node_name : Name of node where route is to be added. Currently only
> supported node is ip6_lookup.
> ip                 : IPv6 address which is to be added to route table.
> mask           : Subnet mask.
> gateway     : Gateway IP to redirect packet to next hop.
> 
> 
> Syntax:
> 
> <node_name> map port <dbdf> queue <rxq> core <core_id>
> 
> Where:
> 
> node_name : Node name which will be receiving packets as per above
> mapping. Currently only supported node id ethdev_rx.
> rxq               : Rx queue id which is to be mapped
> core_id        : Core ID to be mapped where <node_name> instance will be
> running.
> Run use case
> =========
> Command under this section can be used to run the application and start to
> receive and transmit  packets using graph walk.
> 
> Syntax:
> 
> graph start
> 
> 
> 
> Note:
>     <> : Mandatory fields
>     [] : Optional fields
>     ;  : To add any comments, Strings added after semicolon is not used by any
> usecase
> 
> 
> Example use case: l3fwd
> ================
> ;Configure usecase
> graph l3fwd default 0xff
> 
> ;global specific configuration
> mempool mempool0 size 2046 buffers 32000 cache 256 cpu 0
> ethdev 0002:02:00.0 rxq 1 txq 1 mempool0 promiscuous off
> ethdev 0002:03:00.0 rxq 1 txq 1 mempool0 promiscuous off
> ip4 addr add 10.0.2.1/24 0002:02:00.0
> ip4 addr add 10.0.3.1/24 0002:03:00.0
> neigh add ipv4 10.0.2.2 52:20:DA:4F:68:70
> neigh add ipv4 10.0.2.5 62:20:DA:4F:68:70
> neigh add ipv4 10.0.3.2 72:20:DA:4F:68:70
> neigh add ipv4 10.0.3.5 82:20:DA:4F:68:70
> 
> ;node specific configuration
> ipv4_lookup route add ipv4 10.0.2.0 netmask 255.255.255.0 via 10.0.2.1
> ipv4_lookup route add ipv4 10.0.3.0 netmask 255.255.255.0 via 10.0.3.1
> 
> 
> ethdev_rx  map port 0002:02:00.0 queue 0 core 6
> ethdev_rx  map port 0002:03:00.0 queue 1 core 5
> 
> ;Run usecase
> graph start
> 



More information about the dev mailing list