[PATCH] net/pcap: support MTU set

Ido Goshen Ido at cgstowernetworks.com
Thu Mar 17 20:11:58 CET 2022


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 at networkplumber.org>
> Sent: Thursday, 17 March 2022 20:21
> To: Ido Goshen <Ido at cgstowernetworks.com>
> Cc: Ferruh Yigit <ferruh.yigit at intel.com>; dev at dpdk.org
> Subject: Re: [PATCH] net/pcap: support MTU set
> 
> On Thu, 17 Mar 2022 19:43:47 +0200
> ido g <ido at 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.


More information about the dev mailing list