All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thellstrom@vmware.com>
To: Shrikrishna Khare <skhare@vmware.com>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <pv-drivers@vmware.com>
Cc: Jin Heo <heoj@vmware.com>
Subject: Re: [Pv-drivers] [PATCH net v2] vmxnet3: segCnt can be 1 for LRO packets
Date: Wed, 8 Jun 2016 12:10:04 +0200	[thread overview]
Message-ID: <5757EEFC.3060709@vmware.com> (raw)
In-Reply-To: <1465366415-124072-1-git-send-email-skhare@vmware.com>

On 06/08/2016 08:13 AM, Shrikrishna Khare wrote:
> The device emulation may send segCnt of 1 for LRO packets.
>
> Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
> Signed-off-by: Jin Heo <heoj@vmware.com>
>
> ---
> v2: fix subject line
> ---
>  drivers/net/vmxnet3/vmxnet3_drv.c | 2 +-
>  drivers/net/vmxnet3/vmxnet3_int.h | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
> index db8022a..6f399b2 100644
> --- a/drivers/net/vmxnet3/vmxnet3_drv.c
> +++ b/drivers/net/vmxnet3/vmxnet3_drv.c
> @@ -1369,7 +1369,7 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
>  				rcdlro = (struct Vmxnet3_RxCompDescExt *)rcd;
>  
>  				segCnt = rcdlro->segCnt;
> -				BUG_ON(segCnt <= 1);
> +				BUG_ON(segCnt == 0);

What will the vmxnet3 driver do otherwise if segCnt == 0? Please see below.


>  				mss = rcdlro->mss;
>  				if (unlikely(segCnt <= 1))
>  					segCnt = 0;

Based on this code, it looks like it can handle the case without taking
down the kernel completely, so instead of a
"BUG_ON", would it make sense with a WARN_ON_ONCE() or WARN_ON()?

Thanks,
Thomas

  reply	other threads:[~2016-06-08 10:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-08  6:13 [PATCH net v2] vmxnet3: segCnt can be 1 for LRO packets Shrikrishna Khare
2016-06-08 10:10 ` Thomas Hellstrom [this message]
2016-06-08 14:43   ` [Pv-drivers] " Shrikrishna Khare
2016-06-10  7:15 ` David Miller

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=5757EEFC.3060709@vmware.com \
    --to=thellstrom@vmware.com \
    --cc=heoj@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pv-drivers@vmware.com \
    --cc=skhare@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.