* [dpdk-dev] [PATCH v1] null: set port_id in mbufs received from null PMD
@ 2016-05-27 12:26 Sean Harte
2016-05-27 12:28 ` Mcnamara, John
0 siblings, 1 reply; 4+ messages in thread
From: Sean Harte @ 2016-05-27 12:26 UTC (permalink / raw)
To: mukawa; +Cc: dev, Sean Harte
Ensure that the port field is set in mbufs received from the null PMD.
Signed-off-by: Sean Harte <sean.harte@intel.com>
---
drivers/net/null/rte_eth_null.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index 5e8e203..ab440f3 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -69,6 +69,7 @@ struct null_queue {
struct pmd_internals {
unsigned packet_size;
unsigned packet_copy;
+ uint8_t port_id;
struct null_queue rx_null_queues[RTE_MAX_QUEUES_PER_PORT];
struct null_queue tx_null_queues[RTE_MAX_QUEUES_PER_PORT];
@@ -114,6 +115,7 @@ eth_null_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
bufs[i]->pkt_len = packet_size;
bufs[i]->nb_segs = 1;
bufs[i]->next = NULL;
+ bufs[i]->port = h->internals->port_id;
}
rte_atomic64_add(&(h->rx_pkts), i);
@@ -142,6 +144,7 @@ eth_null_copy_rx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
bufs[i]->pkt_len = packet_size;
bufs[i]->nb_segs = 1;
bufs[i]->next = NULL;
+ bufs[i]->port = h->internals->port_id;
}
rte_atomic64_add(&(h->rx_pkts), i);
@@ -529,6 +532,7 @@ eth_dev_null_create(const char *name,
internals->packet_size = packet_size;
internals->packet_copy = packet_copy;
+ internals->port_id = eth_dev->data->port_id;
internals->flow_type_rss_offloads = ETH_RSS_PROTO_MASK;
internals->reta_size = RTE_DIM(internals->reta_conf) * RTE_RETA_GROUP_SIZE;
--
2.5.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v1] null: set port_id in mbufs received from null PMD
2016-05-27 12:26 [dpdk-dev] [PATCH v1] null: set port_id in mbufs received from null PMD Sean Harte
@ 2016-05-27 12:28 ` Mcnamara, John
2016-05-30 6:48 ` Tetsuya Mukawa
0 siblings, 1 reply; 4+ messages in thread
From: Mcnamara, John @ 2016-05-27 12:28 UTC (permalink / raw)
To: Harte, Sean, mukawa; +Cc: dev, Harte, Sean
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sean Harte
> Sent: Friday, May 27, 2016 1:27 PM
> To: mukawa@igel.co.jp
> Cc: dev@dpdk.org; Harte, Sean <sean.harte@intel.com>
> Subject: [dpdk-dev] [PATCH v1] null: set port_id in mbufs received from
> null PMD
>
> Ensure that the port field is set in mbufs received from the null PMD.
>
> Signed-off-by: Sean Harte <sean.harte@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v1] null: set port_id in mbufs received from null PMD
2016-05-27 12:28 ` Mcnamara, John
@ 2016-05-30 6:48 ` Tetsuya Mukawa
2016-06-13 13:46 ` Bruce Richardson
0 siblings, 1 reply; 4+ messages in thread
From: Tetsuya Mukawa @ 2016-05-30 6:48 UTC (permalink / raw)
To: Harte, Sean; +Cc: Mcnamara, John, dev
On 2016/05/27 21:28, Mcnamara, John wrote:
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sean Harte
>> Sent: Friday, May 27, 2016 1:27 PM
>> To: mukawa@igel.co.jp
>> Cc: dev@dpdk.org; Harte, Sean <sean.harte@intel.com>
>> Subject: [dpdk-dev] [PATCH v1] null: set port_id in mbufs received from
>> null PMD
>>
>> Ensure that the port field is set in mbufs received from the null PMD.
>>
>> Signed-off-by: Sean Harte <sean.harte@intel.com>
> Acked-by: John McNamara <john.mcnamara@intel.com>
>
Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH v1] null: set port_id in mbufs received from null PMD
2016-05-30 6:48 ` Tetsuya Mukawa
@ 2016-06-13 13:46 ` Bruce Richardson
0 siblings, 0 replies; 4+ messages in thread
From: Bruce Richardson @ 2016-06-13 13:46 UTC (permalink / raw)
To: Tetsuya Mukawa; +Cc: Harte, Sean, Mcnamara, John, dev
On Mon, May 30, 2016 at 03:48:03PM +0900, Tetsuya Mukawa wrote:
> On 2016/05/27 21:28, Mcnamara, John wrote:
> >> -----Original Message-----
> >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sean Harte
> >> Sent: Friday, May 27, 2016 1:27 PM
> >> To: mukawa@igel.co.jp
> >> Cc: dev@dpdk.org; Harte, Sean <sean.harte@intel.com>
> >> Subject: [dpdk-dev] [PATCH v1] null: set port_id in mbufs received from
> >> null PMD
> >>
> >> Ensure that the port field is set in mbufs received from the null PMD.
> >>
> >> Signed-off-by: Sean Harte <sean.harte@intel.com>
> > Acked-by: John McNamara <john.mcnamara@intel.com>
> >
> Acked-by: Tetsuya Mukawa <mukawa@igel.co.jp>
>
Applied to dpdk-next-net/rel_16_07
/Bruce
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-13 13:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-27 12:26 [dpdk-dev] [PATCH v1] null: set port_id in mbufs received from null PMD Sean Harte
2016-05-27 12:28 ` Mcnamara, John
2016-05-30 6:48 ` Tetsuya Mukawa
2016-06-13 13:46 ` Bruce Richardson
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).