DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ido Goshen <Ido@cgstowernetworks.com>
To: Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@xilinx.com>,
	Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH v2] pcap: support MTU set
Date: Mon, 23 May 2022 14:52:51 +0000	[thread overview]
Message-ID: <AM0PR09MB3972CC8475529F55402FA8B2D6D49@AM0PR09MB3972.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <20220523142705.60326-1-ido@cgstowernetworks.com>

> -----Original Message-----
> From: Ido Goshen <Ido@cgstowernetworks.com>
> Sent: Monday, 23 May 2022 17:27
> To: Thomas Monjalon <thomas@monjalon.net>; Ferruh Yigit
> <ferruh.yigit@xilinx.com>; Andrew Rybchenko
> <andrew.rybchenko@oktetlabs.ru>
> Cc: dev@dpdk.org; Ido Goshen <Ido@cgstowernetworks.com>
> Subject: [PATCH v2] pcap: support MTU set

> v2:
> preserve pcap behavior to support max size packets by default
> ---

[idog] on top enforcing mtu and giving an option to set it
the v2 of the patch also preserves the default behavior of pcap pmd to rx jumbo packets

By default it will receive jumbo packets (jumbo_9000.pcap as a single 9000 bytes long packet)
    cgs@idog-ubuntu:~/dpdk-next-net$ build/app/dpdk-testpmd --no-huge -m1024 -l 0-1  --vdev='net_pcap0,rx_pcap=rx_pcap=pcap/jumbo_9000.pcap,tx_pcap=pcap/file_tx.pcap' 
    -- --no-flush-rx  -i --auto-start
     ...
    testpmd> stop
    Telling cores to stop...
    Waiting for lcores to finish...
     ---------------------- Forward statistics for port 0  ----------------------
      RX-packets: 1              RX-dropped: 0             RX-total: 1
      TX-packets: 1              TX-dropped: 0             TX-total: 1
      ----------------------------------------------------------------------------
But now it will also nicely reflect it by rte_eth_dev_get_mtu
    testpmd> show port info 0
    ********************* Infos for port 0  *********************
    MAC address: 02:70:63:61:70:00
    Device name: net_pcap0
    Driver name: net_pcap
    ...
    MTU: 65535

In addition it gives option to control the mtu for anyone who wants  to reduce it 
In testpmd either 'port config mtu' or --max-pkt-len can be used (as for other pmd's)

e.g.
    cgs@idog-ubuntu:~/dpdk-next-net$ build/app/dpdk-testpmd --no-huge -m1024 -l 0-1  --vdev='net_pcap0,rx_pcap=rx_pcap=pcap/jumbo_9000.pcap,tx_pcap=pcap/file_tx.pcap'
    -- --no-flush-rx  -i 
    ...
    testpmd> port config mtu 0 1500
    testpmd> show port info 0

    ********************* Infos for port 0  *********************
    MAC address: 02:70:63:61:70:00
    Device name: net_pcap0 
    Driver name: net_pcap
    ...
    MTU: 1500
    ...
    testpmd> start
    ....
    testpmd> stop
      ---------------------- Forward statistics for port 0  ----------------------
      RX-packets: 0              RX-dropped: 0             RX-total: 0
      RX-error: 1
      RX-nombufs: 0             
      TX-packets: 0              TX-dropped: 0             TX-total: 0
     ----------------------------------------------------------------------------


  reply	other threads:[~2022-05-23 14:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-23 14:27 Ido Goshen
2022-05-23 14:52 ` Ido Goshen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2022-03-17 17:43 [PATCH] net/pcap: " ido g
2023-07-04 21:02 ` [PATCH v2] pcap: " Stephen Hemminger
2023-07-05 11:37   ` Ferruh Yigit
2023-07-05 15:18     ` Stephen Hemminger
2023-07-06 10:45       ` Ido Goshen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM0PR09MB3972CC8475529F55402FA8B2D6D49@AM0PR09MB3972.eurprd09.prod.outlook.com \
    --to=ido@cgstowernetworks.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@xilinx.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).