From: "Krauz, Pavel" <Pavel.Krauz@anritsu.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] fix mbuf->port for eth_af_packet
Date: Wed, 9 Dec 2015 14:10:03 +0000 [thread overview]
Message-ID: <25CBA98BE75C5B44BD931C7C107685EDC090AA53@lut-exc-008.main.intgin.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 139 bytes --]
Hello,
Here goes patch for DPDK 2.2.0.rc3 that fixes reported port number in mbuf when eth_af_packet PMD is used.
b.r.
Pavel Krauz
[-- Attachment #2: dpdk_af_packet.patch.txt --]
[-- Type: text/plain, Size: 698 bytes --]
--- dpdk-2.2.0-rc3/drivers/net/af_packet/rte_eth_af_packet.c.bak 2015-12-09 14:37:47.777957118 +0100
+++ dpdk-2.2.0-rc3/drivers/net/af_packet/rte_eth_af_packet.c 2015-12-09 14:51:10.612877611 +0100
@@ -74,6 +74,7 @@
unsigned int framenum;
struct rte_mempool *mb_pool;
+ uint8_t in_port;
volatile unsigned long rx_pkts;
volatile unsigned long err_pkts;
@@ -160,6 +161,8 @@
ppd->tp_status = TP_STATUS_KERNEL;
if (++framenum >= framecount)
framenum = 0;
+
+ mbuf->port = pkt_q->in_port;
/* account for the receive frame */
bufs[i] = mbuf;
@@ -365,7 +368,7 @@
}
dev->data->rx_queues[rx_queue_id] = pkt_q;
-
+ pkt_q->in_port = dev->data->port_id;
return 0;
}
next reply other threads:[~2015-12-09 14:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-09 14:10 Krauz, Pavel [this message]
2015-12-09 14:23 ` Mcnamara, John
2015-12-09 14:46 ` Krauz, Pavel
2015-12-09 15:03 ` Mcnamara, John
2015-12-09 15:14 ` Thomas Monjalon
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=25CBA98BE75C5B44BD931C7C107685EDC090AA53@lut-exc-008.main.intgin.net \
--to=pavel.krauz@anritsu.com \
--cc=dev@dpdk.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).