* [PATCH net-next 1/3] net: Fix skb_copy_datagram_from_iovec() to pass the right offset
@ 2009-06-05 19:35 Sridhar Samudrala
2009-06-06 21:25 ` Michael S. Tsirkin
0 siblings, 1 reply; 3+ messages in thread
From: Sridhar Samudrala @ 2009-06-05 19:35 UTC (permalink / raw)
To: davem, netdev, mst
I am working on enabling UFO between KVM guests using virtio-net and i have
some patches that i got working with 2.6.30-rc8. When i wanted to try them
with net-next-2.6, i noticed that virtio-net is not working with that tree.
After some debugging, it turned out to be several bugs in the recent patches
to fix aio with tun driver, specifically the following 2 commits.
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=0a1ec07a67bd8b0033dace237249654d015efa21
http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=6f26c9a7555e5bcca3560919db9b852015077dae
Fix the call to memcpy_from_iovecend() in skb_copy_datagram_from_iovec
to pass the right iovec offset.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
diff --git a/net/core/datagram.c b/net/core/datagram.c
--- a/net/core/datagram.c
+++ b/net/core/datagram.c
@@ -466,7 +466,8 @@ int skb_copy_datagram_from_iovec(struct sk_buff *skb, int offset,
if (copy > 0) {
if (copy > len)
copy = len;
- if (memcpy_fromiovecend(skb->data + offset, from, 0, copy))
+ if (memcpy_fromiovecend(skb->data + offset, from, from_offset,
+ copy))
goto fault;
if ((len -= copy) == 0)
return 0;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next 1/3] net: Fix skb_copy_datagram_from_iovec() to pass the right offset
2009-06-05 19:35 [PATCH net-next 1/3] net: Fix skb_copy_datagram_from_iovec() to pass the right offset Sridhar Samudrala
@ 2009-06-06 21:25 ` Michael S. Tsirkin
2009-06-08 7:28 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2009-06-06 21:25 UTC (permalink / raw)
To: Sridhar Samudrala; +Cc: davem, netdev
On Fri, Jun 05, 2009 at 12:35:40PM -0700, Sridhar Samudrala wrote:
> I am working on enabling UFO between KVM guests using virtio-net and i have
> some patches that i got working with 2.6.30-rc8. When i wanted to try them
> with net-next-2.6, i noticed that virtio-net is not working with that tree.
>
> After some debugging, it turned out to be several bugs in the recent patches
> to fix aio with tun driver, specifically the following 2 commits.
>
> http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=0a1ec07a67bd8b0033dace237249654d015efa21
> http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=6f26c9a7555e5bcca3560919db9b852015077dae
>
>
> Fix the call to memcpy_from_iovecend() in skb_copy_datagram_from_iovec
> to pass the right iovec offset.
>
> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Yes, looks like the bugs were around GSO handling, I was probably
testing without GSO at the time. I'll go try with GSO now. Thanks for
fixing these!
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> diff --git a/net/core/datagram.c b/net/core/datagram.c
> --- a/net/core/datagram.c
> +++ b/net/core/datagram.c
> @@ -466,7 +466,8 @@ int skb_copy_datagram_from_iovec(struct sk_buff *skb, int offset,
> if (copy > 0) {
> if (copy > len)
> copy = len;
> - if (memcpy_fromiovecend(skb->data + offset, from, 0, copy))
> + if (memcpy_fromiovecend(skb->data + offset, from, from_offset,
> + copy))
> goto fault;
> if ((len -= copy) == 0)
> return 0;
>
--
MST
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next 1/3] net: Fix skb_copy_datagram_from_iovec() to pass the right offset
2009-06-06 21:25 ` Michael S. Tsirkin
@ 2009-06-08 7:28 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-06-08 7:28 UTC (permalink / raw)
To: mst; +Cc: sri, netdev
From: "Michael S. Tsirkin" <mst@redhat.com>
Date: Sun, 7 Jun 2009 00:25:33 +0300
> On Fri, Jun 05, 2009 at 12:35:40PM -0700, Sridhar Samudrala wrote:
>> I am working on enabling UFO between KVM guests using virtio-net and i have
>> some patches that i got working with 2.6.30-rc8. When i wanted to try them
>> with net-next-2.6, i noticed that virtio-net is not working with that tree.
>>
>> After some debugging, it turned out to be several bugs in the recent patches
>> to fix aio with tun driver, specifically the following 2 commits.
>>
>> http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=0a1ec07a67bd8b0033dace237249654d015efa21
>> http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commitdiff;h=6f26c9a7555e5bcca3560919db9b852015077dae
>>
>>
>> Fix the call to memcpy_from_iovecend() in skb_copy_datagram_from_iovec
>> to pass the right iovec offset.
>>
>> Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
>
> Yes, looks like the bugs were around GSO handling, I was probably
> testing without GSO at the time. I'll go try with GSO now. Thanks for
> fixing these!
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-06-08 7:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-05 19:35 [PATCH net-next 1/3] net: Fix skb_copy_datagram_from_iovec() to pass the right offset Sridhar Samudrala
2009-06-06 21:25 ` Michael S. Tsirkin
2009-06-08 7:28 ` David Miller
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).