From: Shirley Ma <mashirle@us.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: "Thomas Müller" <thomas@mathtm.de>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH next-next-2.6 v2] virtio_net: missing sg_init_table
Date: Mon, 29 Mar 2010 18:19:15 -0700 [thread overview]
Message-ID: <1269911955.14013.4.camel@localhost.localdomain> (raw)
In-Reply-To: <4BB10010.5060505@mathtm.de>
Add missing sg_init_table for sg_set_buf in virtio_net which
induced in defer skb patch.
Reported-by: Thomas Müller <thomas@mathtm.de>
Tested-by: Thomas Müller <thomas@mathtm.de>
Signed-off-by: Shirley Ma <xma@us.ibm.com>
---
drivers/net/virtio_net.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index 25dc77c..3f5be35 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -326,6 +326,7 @@ static int add_recvbuf_small(struct virtnet_info *vi, gfp_t gfp)
struct scatterlist sg[2];
int err;
+ sg_init_table(sg, 2);
skb = netdev_alloc_skb_ip_align(vi->dev, MAX_PACKET_LEN);
if (unlikely(!skb))
return -ENOMEM;
@@ -351,6 +352,7 @@ static int add_recvbuf_big(struct virtnet_info *vi, gfp_t gfp)
char *p;
int i, err, offset;
+ sg_init_table(sg, MAX_SKB_FRAGS + 2);
/* page in sg[MAX_SKB_FRAGS + 1] is list tail */
for (i = MAX_SKB_FRAGS + 1; i > 1; --i) {
first = get_a_page(vi, gfp);
next prev parent reply other threads:[~2010-03-30 1:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-29 18:31 [PATCH next-next-2.6] virtio_net: missing sg_init_table Shirley Ma
2010-03-29 19:31 ` Thomas Müller
2010-03-30 1:19 ` Shirley Ma [this message]
2010-03-31 1:32 ` [PATCH next-next-2.6 v2] " David Miller
2010-03-31 9:20 ` Michael S. Tsirkin
2010-03-31 10:16 ` David Miller
2010-03-31 12:41 ` [PATCH] virtio-net: move sg off stack Michael S. Tsirkin
[not found] ` <20100331124156.GA4598@redhat.com>
2010-04-02 2:26 ` David Miller
2010-04-06 3:14 ` Rusty Russell
2010-03-30 1:19 ` [PATCH next-next-2.6] virtio_net: missing sg_init_table Shirley Ma
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=1269911955.14013.4.camel@localhost.localdomain \
--to=mashirle@us.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=thomas@mathtm.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).