DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@xilinx.com>
To: Ido Goshen <Ido@cgstowernetworks.com>,
	Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [PATCH] net/pcap: support MTU set
Date: Tue, 26 Apr 2022 18:03:49 +0100	[thread overview]
Message-ID: <d0510be3-43bb-4cb1-367d-80622f673d92@xilinx.com> (raw)
In-Reply-To: <AS4PR09MB55252339409A384C85499C48D6179@AS4PR09MB5525.eurprd09.prod.outlook.com>

On 3/22/2022 1:02 PM, Ido Goshen wrote:
> This test https://doc.dpdk.org/dts/test_plans/jumboframes_test_plan.html#test-case-jumbo-frames-with-no-jumbo-frame-support fails for pcap pmd
> Jumbo packet is unexpectedly received and transmitted
> 

Hi Ido,

Yes, pcap ignores MTU, but I don't see why it should use MTU (except 
from making above DTS test pass).

For the cases packets written to .pcap file or read from a .pcap file, 
most probably user is interested in all packets, I don't think using MTU 
to filter the packets is a good idea, missing packets (because of MTU) 
can confuse users.

Unless there is a good use case, I am for rejecting this feature.

> ----------------------------------------------------------------------------------------
> without patch:
> 
> root@u18c_3nbp:/home/cgs/workspace/master/jumbo# ./dpdk-testpmd --no-huge -m1024 -l 0-2  --vdev='net_pcap0,rx_pcap=rx_pcap=jumbo_9000.pcap,tx_pcap=file_tx.pcap' -- --no-flush-rx --total-num-mbufs=2048 -i
> ...
> testpmd> start
> ...
> testpmd> show port stats 0
> 
>    ######################## NIC statistics for port 0  ########################
>    RX-packets: 1          RX-missed: 0          RX-bytes:  8996
>    RX-errors: 0
>    RX-nombuf:  0
>    TX-packets: 1          TX-errors: 0          TX-bytes:  8996
> 
>    Throughput (since last show)
>    Rx-pps:            0          Rx-bps:            0
>    Tx-pps:            0          Tx-bps:            0
>    ############################################################################
> 
> ----------------------------------------------------------------------------------------
> While with the patch it will fail unless --max-pkt-len is used to support jumbo
> 
> root@u18c_3nbp:/home/cgs/workspace/master/jumbo# ./dpdk-testpmd-patch --no-huge -m1024 -l 0-2  --vdev='net_pcap0,rx_pcap=rx_pcap=jumbo_9000.pcap,tx_pcap=file_tx.pcap' -- --no-flush-rx --total-num-mbufs=2048 -i
> ...
> testpmd> start
> ...
> testpmd> show port stats 0
> 
>    ######################## NIC statistics for port 0  ########################
>    RX-packets: 0          RX-missed: 0          RX-bytes:  0
>    RX-errors: 1
>    RX-nombuf:  0
>    TX-packets: 0          TX-errors: 0          TX-bytes:  0
> 
>    Throughput (since last show)
>    Rx-pps:            0          Rx-bps:            0
>    Tx-pps:            0          Tx-bps:            0
>    ############################################################################
> 
> root@u18c_3nbp:/home/cgs/workspace/master/jumbo# ./dpdk-testpmd-patch --no-huge -m1024 -l 0-2  --vdev='net_pcap0,rx_pcap=rx_pcap=jumbo_9000.pcap,tx_pcap=file_tx.pcap' -- --no-flush-rx --total-num-mbufs=2048 -i --max-pkt-len 9400
> ...
> testpmd> start
> ...
> testpmd> show port stats 0
> 
>    ######################## NIC statistics for port 0  ########################
>    RX-packets: 1          RX-missed: 0          RX-bytes:  8996
>    RX-errors: 0
>    RX-nombuf:  0
>    TX-packets: 1          TX-errors: 0          TX-bytes:  8996
> 
>    Throughput (since last show)
>    Rx-pps:            0          Rx-bps:            0
>    Tx-pps:            0          Tx-bps:            0
>    ############################################################################
> 
>> -----Original Message-----
>> From: Ido Goshen
>> Sent: Thursday, 17 March 2022 21:12
>> To: Stephen Hemminger <stephen@networkplumber.org>
>> Cc: Ferruh Yigit <ferruh.yigit@intel.com>; dev@dpdk.org
>> Subject: RE: [PATCH] net/pcap: support MTU set
>>
>> As far as I can see the initial device MTU is derived from port *RX* configuration
>> in struct rte_eth_rxmode https://doc.dpdk.org/api-
>> 21.11/structrte__eth__rxmode.html
>> Couple of real NICs I've tested (ixgbe, i40e based) don't allow oversized, tests
>> details can be seen in https://bugs.dpdk.org/show_bug.cgi?id=961
>>
>>> -----Original Message-----
>>> From: Stephen Hemminger <stephen@networkplumber.org>
>>> Sent: Thursday, 17 March 2022 20:21
>>> To: Ido Goshen <Ido@cgstowernetworks.com>
>>> Cc: Ferruh Yigit <ferruh.yigit@intel.com>; dev@dpdk.org
>>> Subject: Re: [PATCH] net/pcap: support MTU set
>>>
>>> On Thu, 17 Mar 2022 19:43:47 +0200
>>> ido g <ido@cgstowernetworks.com> wrote:
>>>
>>>> +		if (unlikely(header.caplen > dev->data->mtu)) {
>>>> +			pcap_q->rx_stat.err_pkts++;
>>>> +			rte_pktmbuf_free(mbuf);
>>>> +			break;
>>>> +		}
>>>
>>> MTU should only be enforced on transmit.
>>> Other real network devices allow oversized packets.
>>>
>>> Since the pcap file is something user provides, if you don't want that
>>> then use something to filter the file.


  reply	other threads:[~2022-04-26 17:04 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17 17:43 ido g
2022-03-17 18:20 ` Stephen Hemminger
2022-03-17 19:11   ` Ido Goshen
2022-03-22 13:02     ` Ido Goshen
2022-04-26 17:03       ` Ferruh Yigit [this message]
2022-04-27 18:21         ` Ido Goshen
2022-04-27 19:14           ` Stephen Hemminger
2022-05-23  7:48             ` Ido Goshen
2022-05-30 10:36 ` [PATCH v3] pcap: " Ido Goshen
2022-05-30 18:05   ` Ferruh Yigit
2022-05-31 13:12     ` Ido Goshen
2022-06-06  9:40     ` Ido Goshen
2022-06-06 16:21 ` [PATCH v4] " Ido Goshen
2022-06-06 17:10   ` Stephen Hemminger
2022-06-06 19:07     ` Ido Goshen
2022-06-07  6:27 ` [PATCH v5] pcap: support MTU set for linux interafces Ido Goshen
2022-06-08 16:04   ` [PATCH v6] " Ido Goshen
2022-06-08 16:23     ` Stephen Hemminger
2022-06-19  9:30 ` [PATCH v7 0/3] pcap: support MTU set for linux interfaces Ido Goshen
2022-06-19  9:30   ` [PATCH v7 1/3] " Ido Goshen
2022-06-19  9:30   ` [PATCH v7 2/3] pcap: support MTU set for linux interfaces TX enhancment Ido Goshen
2022-06-20 22:52     ` Stephen Hemminger
2022-06-21  9:07       ` Ido Goshen
2022-06-19  9:30   ` [PATCH v7 3/3] pcap: support MTU set for linux interfaces count ierrors Ido Goshen
2022-06-20  8:39 ` [PATCH v8 0/3] pcap: support MTU set for linux interfaces Ido Goshen
2022-06-20  8:39   ` [PATCH v8 1/3] " Ido Goshen
2022-06-20  8:39   ` [PATCH v8 2/3] pcap: support MTU set for linux interfaces TX enhancment Ido Goshen
2022-06-20  8:39   ` [PATCH v8 3/3] pcap: support MTU set for linux interfaces count ierrors Ido Goshen
2023-07-04 17:43 ` [PATCH] pcap: support MTU set Stephen Hemminger
2023-07-04 21:02 ` [PATCH v2] " Stephen Hemminger
2023-07-05 11:37   ` Ferruh Yigit
2023-07-05 15:18     ` Stephen Hemminger
2023-07-06 10:45       ` Ido Goshen
2023-07-10 16:45 ` [PATCH] net/pcap: " Stephen Hemminger
2023-07-10 17:46   ` Ferruh Yigit
2023-07-11  9:41     ` 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=d0510be3-43bb-4cb1-367d-80622f673d92@xilinx.com \
    --to=ferruh.yigit@xilinx.com \
    --cc=Ido@cgstowernetworks.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    /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).