[PATCH] f_phonet: fix skb truesize underestimation

Subsystems: the rest, usb subsystem

STALE5297d

7 messages, 6 authors, 2012-03-28 · open the first message on its own page

[PATCH] f_phonet: fix skb truesize underestimation

From: Eric Dumazet <hidden>
Date: 2012-03-27 13:04:02

Now skb_add_rx_frag() has a truesize parameter, we can fix f_phonet to
properly account truesize of each fragment : a full page.

Signed-off-by: Eric Dumazet <redacted>
Cc: Felipe Balbi <redacted>
Cc: Greg Kroah-Hartman <redacted>
Cc: Rémi Denis-Courmont <redacted>
---
 drivers/usb/gadget/f_phonet.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index 85a5ceb..965a629 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -345,7 +345,7 @@ static void pn_rx_complete(struct usb_ep *ep, struct usb_request *req)
 		}
 
 		skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags, page,
-				skb->len <= 1, req->actual, req->actual);
+				skb->len <= 1, req->actual, PAGE_SIZE);
 		page = NULL;
 
 		if (req->actual < req->length) { /* Last fragment */


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[PATCH] cdc-phonet: fix skb truesize underestimation

From: Eric Dumazet <hidden>
Date: 2012-03-27 13:17:31

Now skb_add_rx_frag() has a truesize parameter, we can fix cdc-phonet to
properly account truesize of each fragment : a full page.

Signed-off-by: Eric Dumazet <redacted>
Cc: Felipe Balbi <redacted>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rémi Denis-Courmont <redacted>
---
 drivers/net/usb/cdc-phonet.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/usb/cdc-phonet.c b/drivers/net/usb/cdc-phonet.c
index 3886b30..3e41b00 100644
--- a/drivers/net/usb/cdc-phonet.c
+++ b/drivers/net/usb/cdc-phonet.c
@@ -165,13 +165,13 @@ static void rx_complete(struct urb *req)
 				memcpy(skb_put(skb, 1), page_address(page), 1);
 				skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
 						page, 1, req->actual_length,
-						req->actual_length);
+						PAGE_SIZE);
 				page = NULL;
 			}
 		} else {
 			skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
 					page, 0, req->actual_length,
-					req->actual_length);
+					PAGE_SIZE);
 			page = NULL;
 		}
 		if (req->actual_length < PAGE_SIZE)

Re: [PATCH] cdc-phonet: fix skb truesize underestimation

From: Rémi Denis-Courmont <hidden>
Date: 2012-03-27 13:22:51

Le mardi 27 mars 2012 06:17:26 ext Eric Dumazet a écrit :
Now skb_add_rx_frag() has a truesize parameter, we can fix cdc-phonet to
properly account truesize of each fragment : a full page.

Signed-off-by: Eric Dumazet <redacted>
Cc: Felipe Balbi <redacted>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Rémi Denis-Courmont <redacted>
Acked-by: Rémi Denis-Courmont <redacted>

-- 
Rémi Denis-Courmont
http://www.remlab.net/

Re: [PATCH] cdc-phonet: fix skb truesize underestimation

From: David Miller <hidden>
Date: 2012-03-28 02:51:15

From: Eric Dumazet <redacted>
Date: Tue, 27 Mar 2012 06:17:26 -0700
Now skb_add_rx_frag() has a truesize parameter, we can fix cdc-phonet to
properly account truesize of each fragment : a full page.

Signed-off-by: Eric Dumazet <redacted>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Re: [PATCH] f_phonet: fix skb truesize underestimation

From: David Miller <davem@davemloft.net>
Date: 2012-03-28 02:51:19

From: Eric Dumazet <redacted>
Date: Tue, 27 Mar 2012 06:04:02 -0700
Now skb_add_rx_frag() has a truesize parameter, we can fix f_phonet to
properly account truesize of each fragment : a full page.

Signed-off-by: Eric Dumazet <redacted>
Applied.

Re: [PATCH] f_phonet: fix skb truesize underestimation

From: Felipe Balbi <hidden>
Date: 2012-03-28 08:56:07

On Tue, Mar 27, 2012 at 10:51:09PM -0400, David Miller wrote:
From: Eric Dumazet <redacted>
Date: Tue, 27 Mar 2012 06:04:02 -0700
quoted
Now skb_add_rx_frag() has a truesize parameter, we can fix f_phonet to
properly account truesize of each fragment : a full page.

Signed-off-by: Eric Dumazet <redacted>
Applied.
did you apply both patches ?

-- 
balbi

Re: [PATCH] f_phonet: fix skb truesize underestimation

From: David Miller <davem@davemloft.net>
Date: 2012-03-28 09:33:26

From: Felipe Balbi <redacted>
Date: Wed, 28 Mar 2012 11:55:36 +0300
On Tue, Mar 27, 2012 at 10:51:09PM -0400, David Miller wrote:
quoted
From: Eric Dumazet <redacted>
Date: Tue, 27 Mar 2012 06:04:02 -0700
quoted
Now skb_add_rx_frag() has a truesize parameter, we can fix f_phonet to
properly account truesize of each fragment : a full page.

Signed-off-by: Eric Dumazet <redacted>
Applied.
did you apply both patches ?
You never need to ask me these kinds of questions, you can
either check my GIT tree or look at:

http://patchwork.ozlabs.org/project/netdev/list/?state=3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help