netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] net: fix documentation of skb_needs_linearize().
@ 2012-08-28  9:39 Rami Rosen
  2012-08-31 20:24 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Rami Rosen @ 2012-08-28  9:39 UTC (permalink / raw)
  To: davem; +Cc: netdev, Rami Rosen

skb_needs_linearize() does not check highmem DMA as it does not call
illegal_highdma() anymore, so there is no need to mention highmem DMA here.

(Indeed, ~NETIF_F_SG flag, which is checked in skb_needs_linearize(), can
be set when illegal_highdma() returns true, and we are assured that
illegal_highdma() is invoked prior to skb_needs_linearize() as
skb_needs_linearize() is a static method called only once.
But ~NETIF_F_SG can be set not only there in this same invocation path.
It can also be set when can_checksum_protocol() returns false).

see commit 02932ce9e2c136e6fab2571c8e0dd69ae8ec9853,
Convert skb_need_linearize() to use precomputed features.
Signed-off-by: Rami Rosen <rosenr@marvell.com>
---
 net/core/dev.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/net/core/dev.c b/net/core/dev.c
index 3401e2d..a4da9d8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2184,9 +2184,7 @@ EXPORT_SYMBOL(netif_skb_features);
 /*
  * Returns true if either:
  *	1. skb has frag_list and the device doesn't support FRAGLIST, or
- *	2. skb is fragmented and the device does not support SG, or if
- *	   at least one of fragments is in highmem and device does not
- *	   support DMA from it.
+ *	2. skb is fragmented and the device does not support SG.
  */
 static inline int skb_needs_linearize(struct sk_buff *skb,
 				      int features)
-- 
1.7.7.6

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] net: fix documentation of skb_needs_linearize().
  2012-08-28  9:39 [PATCH 1/1] net: fix documentation of skb_needs_linearize() Rami Rosen
@ 2012-08-31 20:24 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-08-31 20:24 UTC (permalink / raw)
  To: rosenr; +Cc: netdev

From: Rami Rosen <rosenr@marvell.com>
Date: Tue, 28 Aug 2012 12:39:24 +0300

> skb_needs_linearize() does not check highmem DMA as it does not call
> illegal_highdma() anymore, so there is no need to mention highmem DMA here.
> 
> (Indeed, ~NETIF_F_SG flag, which is checked in skb_needs_linearize(), can
> be set when illegal_highdma() returns true, and we are assured that
> illegal_highdma() is invoked prior to skb_needs_linearize() as
> skb_needs_linearize() is a static method called only once.
> But ~NETIF_F_SG can be set not only there in this same invocation path.
> It can also be set when can_checksum_protocol() returns false).
> 
> see commit 02932ce9e2c136e6fab2571c8e0dd69ae8ec9853,
> Convert skb_need_linearize() to use precomputed features.
> Signed-off-by: Rami Rosen <rosenr@marvell.com>

Applied to net-next, thanks Rami.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-31 20:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-28  9:39 [PATCH 1/1] net: fix documentation of skb_needs_linearize() Rami Rosen
2012-08-31 20:24 ` 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).