Patchwork [net-next,2/2] netpoll: Neaten MAX_SKB_SIZE macro

login
register
mail settings
Submitter Joe Perches
Date Jan. 30, 2012, 1:50 a.m.
Message ID <c3a95a1d04d11f3741114ca206d37aea5609e504.1327888082.git.joe@perches.com>
Download mbox | patch
Permalink /patch/138489/
State Accepted
Headers show

Comments

Joe Perches - Jan. 30, 2012, 1:50 a.m.
Add the types in the packet layout order.

Signed-off-by: Joe Perches <joe@perches.com>
---
 net/core/netpoll.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
WANG Cong - Jan. 30, 2012, 3:14 a.m.
On 01/30/2012 09:50 AM, Joe Perches wrote:
> Add the types in the packet layout order.
>

Good idea.


> Signed-off-by: Joe Perches<joe@perches.com>

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller - Feb. 1, 2012, 7:22 p.m.
From: Joe Perches <joe@perches.com>
Date: Sun, 29 Jan 2012 17:50:44 -0800

> Add the types in the packet layout order.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

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

Patch

diff --git a/net/core/netpoll.c b/net/core/netpoll.c
index b523274..4ce473e 100644
--- a/net/core/netpoll.c
+++ b/net/core/netpoll.c
@@ -47,9 +47,11 @@  static atomic_t trapped;
 #define NETPOLL_RX_ENABLED  1
 #define NETPOLL_RX_DROP     2
 
-#define MAX_SKB_SIZE \
-		(MAX_UDP_CHUNK + sizeof(struct udphdr) + \
-				sizeof(struct iphdr) + sizeof(struct ethhdr))
+#define MAX_SKB_SIZE							\
+	(sizeof(struct ethhdr) +					\
+	 sizeof(struct iphdr) +						\
+	 sizeof(struct udphdr) +					\
+	 MAX_UDP_CHUNK)
 
 static void zap_completion_queue(void);
 static void arp_reply(struct sk_buff *skb);