dev.dpdk.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated
@ 2014-09-11 22:25 damarion-FYB4Gu1CFyUAvxtiuMwx3w
       [not found] ` <1410474308-17744-1-git-send-email-damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: damarion-FYB4Gu1CFyUAvxtiuMwx3w @ 2014-09-11 22:25 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

From: Damjan Marion <damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>

If VIRTIO_NET_F_CTRL_VQ is not negotiated hw->cvq will be NULL

Signed-off-by: Damjan Marion <damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
---
 lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/librte_pmd_virtio/virtio_rxtx.c b/lib/librte_pmd_virtio/virtio_rxtx.c
index 0b10108..8cb635e 100644
--- a/lib/librte_pmd_virtio/virtio_rxtx.c
+++ b/lib/librte_pmd_virtio/virtio_rxtx.c
@@ -328,8 +328,10 @@ virtio_dev_cq_start(struct rte_eth_dev *dev)
 	struct virtio_hw *hw
 		= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);
 
-	virtio_dev_vring_start(hw->cvq, VTNET_CQ);
-	VIRTQUEUE_DUMP((struct virtqueue *)hw->cvq);
+	if (hw->cvq) {
+		virtio_dev_vring_start(hw->cvq, VTNET_CQ);
+		VIRTQUEUE_DUMP((struct virtqueue *)hw->cvq);
+	}
 }
 
 void
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated
       [not found] ` <1410474308-17744-1-git-send-email-damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2014-09-12  3:55   ` Ouyang, Changchun
  2014-09-17  7:32   ` Olivier MATZ
  1 sibling, 0 replies; 5+ messages in thread
From: Ouyang, Changchun @ 2014-09-12  3:55 UTC (permalink / raw)
  To: damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org,
	dev-VfR2kkLFssw@public.gmane.org

Hi

> -----Original Message-----
> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of
> damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org
> Sent: Friday, September 12, 2014 6:25 AM
> To: dev-VfR2kkLFssw@public.gmane.org
> Subject: [dpdk-dev] [PATCH] virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not
> negotiated
> 
> From: Damjan Marion <damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
> 
> If VIRTIO_NET_F_CTRL_VQ is not negotiated hw->cvq will be NULL
> 
> Signed-off-by: Damjan Marion <damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
> ---
>  lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/lib/librte_pmd_virtio/virtio_rxtx.c
> b/lib/librte_pmd_virtio/virtio_rxtx.c
> index 0b10108..8cb635e 100644
> --- a/lib/librte_pmd_virtio/virtio_rxtx.c
> +++ b/lib/librte_pmd_virtio/virtio_rxtx.c
> @@ -328,8 +328,10 @@ virtio_dev_cq_start(struct rte_eth_dev *dev)
>  	struct virtio_hw *hw
>  		= VIRTIO_DEV_PRIVATE_TO_HW(dev->data->dev_private);
> 
> -	virtio_dev_vring_start(hw->cvq, VTNET_CQ);
> -	VIRTQUEUE_DUMP((struct virtqueue *)hw->cvq);
> +	if (hw->cvq) {
> +		virtio_dev_vring_start(hw->cvq, VTNET_CQ);
> +		VIRTQUEUE_DUMP((struct virtqueue *)hw->cvq);
> +	}
>  }
> 
>  void
> --
> 2.1.0

Acked-by: Changchun Ouyang <Changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated
       [not found] ` <1410474308-17744-1-git-send-email-damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
  2014-09-12  3:55   ` Ouyang, Changchun
@ 2014-09-17  7:32   ` Olivier MATZ
       [not found]     ` <5419392A.1030606-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Olivier MATZ @ 2014-09-17  7:32 UTC (permalink / raw)
  To: damarion-FYB4Gu1CFyUAvxtiuMwx3w, dev-VfR2kkLFssw

Hello,

On 09/12/2014 12:25 AM, damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org wrote:
> From: Damjan Marion <damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
>
> If VIRTIO_NET_F_CTRL_VQ is not negotiated hw->cvq will be NULL
>
> Signed-off-by: Damjan Marion <damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
> ---
>   lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>

Acked-by: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated
       [not found]     ` <5419392A.1030606-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2014-09-29 18:09       ` Damjan Marion (damarion)
       [not found]         ` <D5F8A545-A5EC-482F-A333-A90AA6F45B0A-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Damjan Marion (damarion) @ 2014-09-29 18:09 UTC (permalink / raw)
  To: dev-VfR2kkLFssw@public.gmane.org



On 17 Sep 2014, at 09:32, Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> wrote:

> Hello,
> 
> On 09/12/2014 12:25 AM, damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org wrote:
>> From: Damjan Marion <damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
>> 
>> If VIRTIO_NET_F_CTRL_VQ is not negotiated hw->cvq will be NULL
>> 
>> Signed-off-by: Damjan Marion <damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
>> ---
>>  lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>> 
> 
> Acked-by: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
> 

Is this going to be applied or any action pending on my side?

Thanks,

Damjan

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated
       [not found]         ` <D5F8A545-A5EC-482F-A333-A90AA6F45B0A-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
@ 2014-10-01  9:51           ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2014-10-01  9:51 UTC (permalink / raw)
  To: Damjan Marion; +Cc: dev-VfR2kkLFssw

2014-09-29 18:09, Damjan Marion:
> On 17 Sep 2014, at 09:32, Olivier MATZ <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> wrote:
> > On 09/12/2014 12:25 AM, damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org wrote:
> > > If VIRTIO_NET_F_CTRL_VQ is not negotiated hw->cvq will be NULL
> > > 
> > > Signed-off-by: Damjan Marion <damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
> > > ---
> > >  lib/librte_pmd_virtio/virtio_rxtx.c | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > Acked-by: Olivier Matz <olivier.matz-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
> 
> Is this going to be applied or any action pending on my side?

It's now applied.

Thanks
-- 
Thomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-01  9:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-11 22:25 [PATCH] virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not negotiated damarion-FYB4Gu1CFyUAvxtiuMwx3w
     [not found] ` <1410474308-17744-1-git-send-email-damarion-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2014-09-12  3:55   ` Ouyang, Changchun
2014-09-17  7:32   ` Olivier MATZ
     [not found]     ` <5419392A.1030606-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-09-29 18:09       ` Damjan Marion (damarion)
     [not found]         ` <D5F8A545-A5EC-482F-A333-A90AA6F45B0A-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
2014-10-01  9:51           ` Thomas Monjalon

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).