DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: dev@dpdk.org, Yong Wang <yongwang@vmware.com>
Subject: Re: [dpdk-dev] [RFT] vmxnet3: coverity reported defect
Date: Thu, 5 Apr 2018 17:47:38 +0100	[thread overview]
Message-ID: <b6d06139-acbd-ada6-82e8-e3d77a0ba54c@intel.com> (raw)
In-Reply-To: <20180405083618.61509f5d@xeon-e3>

On 4/5/2018 4:36 PM, Stephen Hemminger wrote:
> I noticed Coverity defect in DPDK number 124563 was assigned to me.
> 
> It looks like vmxnet3 driver code doesn't handle case where host incorrectly
> sends a frame with out setting SOP bit in first segment. This would lead to
> rxq->start_seq being NULL.
> 
> Maybe something like this would fix it.  I don't have VMware (or time) to test.
> 
> diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
> index 57557492e0f5..3118d94add90 100644
> --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
> +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
> @@ -813,6 +813,13 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
>  
>  			RTE_ASSERT(rxd->btype == VMXNET3_RXD_BTYPE_BODY);
>  
> +			if (unlikely(start == NULL)) {
> +				PMD_RX_LOG(ERR, "Missing sop");
> +
> +				rte_pktmbuf_free_seg(rxm);
> +				goto rcd_done;
> +			}
> +
>  			start->pkt_len += rxm->data_len;
>  			start->nb_segs++;
>  
> 
> PS: the email for the VMXNET3 maintainer  Shrikrishna Khare <skhare@vmware.com> bounces.

Yong Wang send a patch [1] to take over vmxnet3 maintainership.

[1]
https://dpdk.org/dev/patchwork/patch/36795/

  reply	other threads:[~2018-04-05 16:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-05 15:36 Stephen Hemminger
2018-04-05 16:47 ` Ferruh Yigit [this message]
2018-04-06 11:18 ` Neil Horman

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=b6d06139-acbd-ada6-82e8-e3d77a0ba54c@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.org \
    --cc=yongwang@vmware.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).