netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: kys@microsoft.com
Cc: olaf@aepfle.de, netdev@vger.kernel.org, jasowang@redhat.com,
	linux-kernel@vger.kernel.org, apw@canonical.com,
	devel@linuxdriverproject.org
Subject: Re: [PATCH V3 0/6] Drivers: net: hyperv: Enable various offloads
Date: Mon, 10 Mar 2014 15:55:57 -0400 (EDT)	[thread overview]
Message-ID: <20140310.155557.1576514754598895473.davem@davemloft.net> (raw)
In-Reply-To: <1394335362-11126-1-git-send-email-kys@microsoft.com>

From: "K. Y. Srinivasan" <kys@microsoft.com>
Date: Sat,  8 Mar 2014 19:22:42 -0800

> This patch set enables both checksum as well as segmentation offload.
> As part of this effort I have enabled scatter gather I/O a well.
> 
> In version 2 of these patches, I addressed comments from David Miller and
> Dan Carpenter.
> 
> In this version I have addressed the latest comments from David Miller.

Series applied, thanks.

I still think that fill_pg_buf() could be improved.

For example, it returns '1' if len is passed in as zero.  Maybe that can't
happen, but if it does the page buffer array will be corrupted and the
driver will process garbage.

It seems so much more straightforward to me if you simply incremented
'j' in the loop when an array entry is actually filled in.  Then just
return 'j'.

	int j;
 ...
		pb[j].pfn = page_to_pfn(page);
		pb[j].offset = offset;
		pb[j].len = bytes;
		j++;
 ...
	return j;


Then 'j' is unambiguously the number of pb array entries which were
filled in, no matter what.

  parent reply	other threads:[~2014-03-10 19:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-09  3:22 [PATCH V3 0/6] Drivers: net: hyperv: Enable various offloads K. Y. Srinivasan
2014-03-09  3:23 ` [PATCH V3 1/6] Drivers: net: hyperv: Enable scatter gather I/O K. Y. Srinivasan
2014-03-09  3:23   ` [PATCH V3 2/6] Drivers: net: hyperv: Cleanup the send path K. Y. Srinivasan
2014-03-09  3:23   ` [PATCH V3 3/6] Drivers: net: hyperv: Enable offloads on the host K. Y. Srinivasan
2014-03-09  3:23   ` [PATCH V3 4/6] Drivers: net: hyperv: Enable receive side IP checksum offload K. Y. Srinivasan
2014-03-09  3:23   ` [PATCH V3 5/6] Drivers: net: hyperv: Enable send side " K. Y. Srinivasan
2014-03-09  3:23   ` [PATCH V3 6/6] Drivers: net: hyperv: Enable large send offload K. Y. Srinivasan
2014-03-10 19:55 ` David Miller [this message]
2014-03-11  0:42   ` [PATCH V3 0/6] Drivers: net: hyperv: Enable various offloads KY Srinivasan

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=20140310.155557.1576514754598895473.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=jasowang@redhat.com \
    --cc=kys@microsoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olaf@aepfle.de \
    /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).