* [dpdk-stable] [PATCH] net/virtio: remove useless check on mempool
@ 2019-05-09 8:03 David Marchand
2019-05-09 13:29 ` [dpdk-stable] [dpdk-dev] " Jens Freimann
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: David Marchand @ 2019-05-09 8:03 UTC (permalink / raw)
To: dev; +Cc: stable, Maxime Coquelin, Tiwei Bie, Zhihong Wang
This .rx_queue_setup devop is called after ethdev already dereferenced
the mempool pointer.
No need to check and we can remove this rte_exit.
Fixes: 48cec290a3d2 ("net/virtio: move queue configure code to proper place")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/virtio/virtio_rxtx.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 8c56f23..4f44360 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/virtio_rxtx.c
@@ -889,11 +889,6 @@
rxvq = &vq->rxq;
rxvq->queue_id = queue_idx;
rxvq->mpool = mp;
- if (rxvq->mpool == NULL) {
- rte_exit(EXIT_FAILURE,
- "Cannot allocate mbufs for rx virtqueue");
- }
-
dev->data->rx_queues[queue_idx] = rxvq;
return 0;
--
1.8.3.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/virtio: remove useless check on mempool
2019-05-09 8:03 [dpdk-stable] [PATCH] net/virtio: remove useless check on mempool David Marchand
@ 2019-05-09 13:29 ` Jens Freimann
2019-05-17 8:16 ` David Marchand
2019-05-17 15:08 ` [dpdk-stable] " Maxime Coquelin
2019-06-05 12:29 ` Maxime Coquelin
2 siblings, 1 reply; 5+ messages in thread
From: Jens Freimann @ 2019-05-09 13:29 UTC (permalink / raw)
To: David Marchand; +Cc: dev, stable, Maxime Coquelin, Tiwei Bie, Zhihong Wang
On Thu, May 09, 2019 at 10:03:48AM +0200, David Marchand wrote:
>This .rx_queue_setup devop is called after ethdev already dereferenced
>the mempool pointer.
>No need to check and we can remove this rte_exit.
>
>Fixes: 48cec290a3d2 ("net/virtio: move queue configure code to proper place")
>Cc: stable@dpdk.org
>
>Signed-off-by: David Marchand <david.marchand@redhat.com>
Agree, the pointer is accessed before in the caller. That said, afaics the
pointer is never checked in rte_eth_rx_queue_setup() before it's
dereferenced...
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/virtio: remove useless check on mempool
2019-05-09 13:29 ` [dpdk-stable] [dpdk-dev] " Jens Freimann
@ 2019-05-17 8:16 ` David Marchand
0 siblings, 0 replies; 5+ messages in thread
From: David Marchand @ 2019-05-17 8:16 UTC (permalink / raw)
To: Jens Freimann; +Cc: dev, dpdk stable, Maxime Coquelin, Tiwei Bie, Zhihong Wang
On Thu, May 9, 2019 at 3:29 PM Jens Freimann <jfreimann@redhat.com> wrote:
> On Thu, May 09, 2019 at 10:03:48AM +0200, David Marchand wrote:
> >This .rx_queue_setup devop is called after ethdev already dereferenced
> >the mempool pointer.
> >No need to check and we can remove this rte_exit.
> >
> >Fixes: 48cec290a3d2 ("net/virtio: move queue configure code to proper
> place")
> >Cc: stable@dpdk.org
> >
> >Signed-off-by: David Marchand <david.marchand@redhat.com>
>
> Agree, the pointer is accessed before in the caller. That said, afaics the
> pointer is never checked in rte_eth_rx_queue_setup() before it's
> dereferenced...
>
Yep, sent a patch.
http://patchwork.dpdk.org/patch/53503/
Thanks for the review Jens.
--
David Marchand
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [PATCH] net/virtio: remove useless check on mempool
2019-05-09 8:03 [dpdk-stable] [PATCH] net/virtio: remove useless check on mempool David Marchand
2019-05-09 13:29 ` [dpdk-stable] [dpdk-dev] " Jens Freimann
@ 2019-05-17 15:08 ` Maxime Coquelin
2019-06-05 12:29 ` Maxime Coquelin
2 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2019-05-17 15:08 UTC (permalink / raw)
To: David Marchand, dev; +Cc: stable, Tiwei Bie, Zhihong Wang
On 5/9/19 10:03 AM, David Marchand wrote:
> This .rx_queue_setup devop is called after ethdev already dereferenced
> the mempool pointer.
> No need to check and we can remove this rte_exit.
>
> Fixes: 48cec290a3d2 ("net/virtio: move queue configure code to proper place")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> drivers/net/virtio/virtio_rxtx.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
> index 8c56f23..4f44360 100644
> --- a/drivers/net/virtio/virtio_rxtx.c
> +++ b/drivers/net/virtio/virtio_rxtx.c
> @@ -889,11 +889,6 @@
> rxvq = &vq->rxq;
> rxvq->queue_id = queue_idx;
> rxvq->mpool = mp;
> - if (rxvq->mpool == NULL) {
> - rte_exit(EXIT_FAILURE,
> - "Cannot allocate mbufs for rx virtqueue");
> - }
> -
> dev->data->rx_queues[queue_idx] = rxvq;
>
> return 0;
>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Thanks,
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-stable] [PATCH] net/virtio: remove useless check on mempool
2019-05-09 8:03 [dpdk-stable] [PATCH] net/virtio: remove useless check on mempool David Marchand
2019-05-09 13:29 ` [dpdk-stable] [dpdk-dev] " Jens Freimann
2019-05-17 15:08 ` [dpdk-stable] " Maxime Coquelin
@ 2019-06-05 12:29 ` Maxime Coquelin
2 siblings, 0 replies; 5+ messages in thread
From: Maxime Coquelin @ 2019-06-05 12:29 UTC (permalink / raw)
To: David Marchand, dev; +Cc: stable, Tiwei Bie, Zhihong Wang
On 5/9/19 10:03 AM, David Marchand wrote:
> This .rx_queue_setup devop is called after ethdev already dereferenced
> the mempool pointer.
> No need to check and we can remove this rte_exit.
>
> Fixes: 48cec290a3d2 ("net/virtio: move queue configure code to proper place")
> Cc: stable@dpdk.org
>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> drivers/net/virtio/virtio_rxtx.c | 5 -----
> 1 file changed, 5 deletions(-)
Applied to dpdk-next-virtio/master.
Thanks,
Maxime
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-06-05 12:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-09 8:03 [dpdk-stable] [PATCH] net/virtio: remove useless check on mempool David Marchand
2019-05-09 13:29 ` [dpdk-stable] [dpdk-dev] " Jens Freimann
2019-05-17 8:16 ` David Marchand
2019-05-17 15:08 ` [dpdk-stable] " Maxime Coquelin
2019-06-05 12:29 ` Maxime Coquelin
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).