DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Ouyang, Changchun" <changchun.ouyang@intel.com>
To: "damarion@cisco.com" <damarion@cisco.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not	negotiated
Date: Fri, 12 Sep 2014 03:55:54 +0000
Message-ID: <F52918179C57134FAEC9EA62FA2F9625118543DD@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1410474308-17744-1-git-send-email-damarion@cisco.com>

Hi

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of
> damarion@cisco.com
> Sent: Friday, September 12, 2014 6:25 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] virtio: fix crash if VIRTIO_NET_F_CTRL_VQ is not
> negotiated
> 
> From: Damjan Marion <damarion@cisco.com>
> 
> If VIRTIO_NET_F_CTRL_VQ is not negotiated hw->cvq will be NULL
> 
> Signed-off-by: Damjan Marion <damarion@cisco.com>
> ---
>  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@intel.com>

  reply	other threads:[~2014-09-12  3:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 22:25 damarion
2014-09-12  3:55 ` Ouyang, Changchun [this message]
2014-09-17  7:32 ` Olivier MATZ
2014-09-29 18:09   ` Damjan Marion (damarion)
2014-10-01  9:51     ` 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=F52918179C57134FAEC9EA62FA2F9625118543DD@shsmsx102.ccr.corp.intel.com \
    --to=changchun.ouyang@intel.com \
    --cc=damarion@cisco.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git