From: Ido Goshen <Ido@cgstowernetworks.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "ferruh.yigit@xilinx.com" <ferruh.yigit@xilinx.com>,
"dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH v7 2/3] pcap: support MTU set for linux interfaces TX enhancment
Date: Tue, 21 Jun 2022 09:07:34 +0000 [thread overview]
Message-ID: <AM0PR09MB3972677CA06DFA005C54E068D6B39@AM0PR09MB3972.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <20220620155246.243737b7@hermes.local>
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Tuesday, 21 June 2022 1:53
> To: Ido Goshen <Ido@cgstowernetworks.com>
> Cc: ferruh.yigit@xilinx.com; dev@dpdk.org
> Subject: Re: [PATCH v7 2/3] pcap: support MTU set for linux interfaces TX
> enhancment
>
> On Sun, 19 Jun 2022 12:30:33 +0300
> Ido Goshen <ido@cgstowernetworks.com> wrote:
>
> > Drop only the oversized packets and not its entrie burst mbuf will be
> > freed and will be counted as oerror
> >
> > Signed-off-by: Ido Goshen <ido@cgstowernetworks.com>
> > ---
> > drivers/net/pcap/pcap_ethdev.c | 10 ++++++++--
> > 1 file changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/net/pcap/pcap_ethdev.c
> > b/drivers/net/pcap/pcap_ethdev.c index 2221c53051..ff98762058 100644
> > --- a/drivers/net/pcap/pcap_ethdev.c
> > +++ b/drivers/net/pcap/pcap_ethdev.c
> > @@ -494,8 +494,14 @@ eth_pcap_tx(void *queue, struct rte_mbuf **bufs,
> uint16_t nb_pkts)
> > */
> > ret = pcap_sendpacket(pcap,
> > rte_pktmbuf_read(mbuf, 0, len, temp_data), len);
> > - if (unlikely(ret != 0))
> > - break;
> > + if (unlikely(ret != 0)) {
> > + if (errno == EMSGSIZE) {
>
> Will this show up in tx_errors?
>
[idog] yes
It will be counted few lines below by
'dumper_q->tx_stat.err_pkts += nb_pkts - num_tx;'
as this case doesn't increment the 'num_tx'
test example:
build/app/dpdk-testpmd --no-huge -m1024 -l 0-2 --vdev='net_pcap0,iface=veth0' --vdev='net_pcap1,iface=veth1' -- -i
...
testpmd> port config mtu 0 9400
testpmd> port config mtu 1 1500
testpmd> 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: 0 TX-dropped: 0 TX-total: 0
----------------------------------------------------------------------------
---------------------- Forward statistics for port 1 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0
----------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
RX-packets: 1 RX-dropped: 0 RX-total: 1
TX-packets: 0 TX-dropped: 1 TX-total: 1
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Done.
testpmd> show port stats all
######################## NIC statistics for port 0 ########################
RX-packets: 1 RX-missed: 0 RX-bytes: 8996
RX-errors: 0
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
############################################################################
######################## NIC statistics for port 1 ########################
RX-packets: 0 RX-missed: 0 RX-bytes: 0
RX-errors: 0
RX-nombuf: 0
TX-packets: 0 TX-errors: 1 TX-bytes: 0
Throughput (since last show)
Rx-pps: 0 Rx-bps: 0
Tx-pps: 0 Tx-bps: 0
############################################################################
> > + rte_pktmbuf_free(mbuf);
> > + continue;
> > + } else {
> > + break;
> > + }
> else is not needed here.
[idog] ok
> > + }
> > num_tx++;
> > tx_bytes += len;
> > rte_pktmbuf_free(mbuf);
next prev parent reply other threads:[~2022-06-21 9:07 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-17 17:43 [PATCH] net/pcap: support MTU set 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
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 [this message]
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=AM0PR09MB3972677CA06DFA005C54E068D6B39@AM0PR09MB3972.eurprd09.prod.outlook.com \
--to=ido@cgstowernetworks.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@xilinx.com \
--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).