* [dpdk-stable] [PATCH] net/enic: fix seg fault on MTU update with non-setup queues
[not found] <20180404235455.17241-1-johndale@cisco.com>
@ 2018-04-04 23:54 ` John Daley
2018-04-06 16:41 ` Ferruh Yigit
0 siblings, 1 reply; 2+ messages in thread
From: John Daley @ 2018-04-04 23:54 UTC (permalink / raw)
To: ferruh.yigit; +Cc: dev, John Daley, stable
The enic code called from rte_eth_dev_set_mtu() was assuming that the
Rx queues are already set up via a call to rte_eth_tx_queue_setup().
OVS calls rte_eth_dev_set_mtu() before rte_eth_rx_queue_setup() and
a null pointer was dereferenced.
Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update")
Cc: stable@dpdk.org
Signed-off-by: John Daley <johndale@cisco.com>
Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
---
drivers/net/enic/enic_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index f01a77c0a..f39dfbe32 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -1444,6 +1444,8 @@ int enic_set_mtu(struct enic *enic, uint16_t new_mtu)
/* free and reallocate RQs with the new MTU */
for (rq_idx = 0; rq_idx < enic->rq_count; rq_idx++) {
rq = &enic->rq[enic_rte_rq_idx_to_sop_idx(rq_idx)];
+ if (!rq->in_use)
+ continue;
enic_free_rq(rq);
rc = enic_alloc_rq(enic, rq_idx, rq->socket_id, rq->mp,
--
2.16.2
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-stable] [PATCH] net/enic: fix seg fault on MTU update with non-setup queues
2018-04-04 23:54 ` [dpdk-stable] [PATCH] net/enic: fix seg fault on MTU update with non-setup queues John Daley
@ 2018-04-06 16:41 ` Ferruh Yigit
0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2018-04-06 16:41 UTC (permalink / raw)
To: John Daley; +Cc: dev, stable
On 4/5/2018 12:54 AM, John Daley wrote:
> The enic code called from rte_eth_dev_set_mtu() was assuming that the
> Rx queues are already set up via a call to rte_eth_tx_queue_setup().
> OVS calls rte_eth_dev_set_mtu() before rte_eth_rx_queue_setup() and
> a null pointer was dereferenced.
>
> Fixes: c3e09182bcd6 ("net/enic: support scatter Rx in MTU update")
> Cc: stable@dpdk.org
>
> Signed-off-by: John Daley <johndale@cisco.com>
> Reviewed-by: Hyong Youb Kim <hyonkim@cisco.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-06 16:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20180404235455.17241-1-johndale@cisco.com>
2018-04-04 23:54 ` [dpdk-stable] [PATCH] net/enic: fix seg fault on MTU update with non-setup queues John Daley
2018-04-06 16:41 ` Ferruh Yigit
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).