From: Haiyang Zhang <haiyangz@microsoft.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: haiyangz@microsoft.com, kys@microsoft.com, olaf@aepfle.de,
jasowang@redhat.com, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org
Subject: [PATCH net-next,4/6] hyperv: Remove extra allocated space for recv_pkt_list elements
Date: Tue, 2 Oct 2012 08:30:22 -0700 [thread overview]
Message-ID: <1349191824-14001-4-git-send-email-haiyangz@microsoft.com> (raw)
In-Reply-To: <1349191824-14001-1-git-send-email-haiyangz@microsoft.com>
The receive code path doesn't use the page buffer, so remove the
extra allocated space here.
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
---
drivers/net/hyperv/hyperv_net.h | 2 --
drivers/net/hyperv/netvsc.c | 4 +---
2 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 95ceb35..d58f28c 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -465,8 +465,6 @@ struct nvsp_message {
#define NETVSC_RECEIVE_BUFFER_ID 0xcafe
-#define NETVSC_RECEIVE_SG_COUNT 1
-
/* Preallocated receive packets */
#define NETVSC_RECEIVE_PACKETLIST_COUNT 256
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index 4a1a5f5..d9c4c03 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -904,9 +904,7 @@ int netvsc_device_add(struct hv_device *device, void *additional_info)
INIT_LIST_HEAD(&net_device->recv_pkt_list);
for (i = 0; i < NETVSC_RECEIVE_PACKETLIST_COUNT; i++) {
- packet = kzalloc(sizeof(struct hv_netvsc_packet) +
- (NETVSC_RECEIVE_SG_COUNT *
- sizeof(struct hv_page_buffer)), GFP_KERNEL);
+ packet = kzalloc(sizeof(struct hv_netvsc_packet), GFP_KERNEL);
if (!packet)
break;
--
1.7.4.1
next prev parent reply other threads:[~2012-10-02 15:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-02 15:30 [PATCH net-next,1/6] hyperv: Fix the max_xfer_size in RNDIS initialization Haiyang Zhang
2012-10-02 15:30 ` [PATCH net-next,2/6] hyperv: Fix the missing return value in rndis_filter_set_packet_filter() Haiyang Zhang
2012-10-02 18:42 ` David Miller
2012-10-02 15:30 ` [PATCH net-next,3/6] hyperv: Fix page buffer handling in rndis_filter_send_request() Haiyang Zhang
2012-10-02 18:42 ` David Miller
2012-10-02 15:30 ` Haiyang Zhang [this message]
2012-10-02 18:42 ` [PATCH net-next,4/6] hyperv: Remove extra allocated space for recv_pkt_list elements David Miller
2012-10-02 15:30 ` [PATCH net-next,5/6] hyperv: Report actual status in receive completion packet Haiyang Zhang
2012-10-02 18:42 ` David Miller
2012-10-02 15:30 ` [PATCH net-next,6/6] hyperv: Add buffer for extended info after the RNDIS response message Haiyang Zhang
2012-10-02 18:42 ` David Miller
2012-10-02 18:40 ` [PATCH net-next,1/6] hyperv: Fix the max_xfer_size in RNDIS initialization 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=1349191824-14001-4-git-send-email-haiyangz@microsoft.com \
--to=haiyangz@microsoft.com \
--cc=davem@davemloft.net \
--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
all inboxes | Powered by JetHome®