From patchwork Mon Jan 30 01:50:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joe Perches X-Patchwork-Id: 138489 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 2A0A0B6EF1 for ; Mon, 30 Jan 2012 12:51:31 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754007Ab2A3BvO (ORCPT ); Sun, 29 Jan 2012 20:51:14 -0500 Received: from [206.117.179.246] ([206.117.179.246]:52818 "EHLO labridge.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752410Ab2A3BvM (ORCPT ); Sun, 29 Jan 2012 20:51:12 -0500 Received: from [173.60.85.8] (account joe@perches.com HELO joe-laptop.perches.com) by labridge.com (CommuniGate Pro SMTP 5.0.14) with ESMTPA id 18723258; Sun, 29 Jan 2012 17:51:05 -0800 From: Joe Perches To: linux-kernel@vger.kernel.org Cc: "David S. Miller" , netdev@vger.kernel.org Subject: [PATCH net-next 2/2] netpoll: Neaten MAX_SKB_SIZE macro Date: Sun, 29 Jan 2012 17:50:44 -0800 Message-Id: X-Mailer: git-send-email 1.7.8.111.gad25c.dirty In-Reply-To: <8a61df72a4eb6caaeaa8b5be644be227da61512b.1327888082.git.joe@perches.com> References: <8a61df72a4eb6caaeaa8b5be644be227da61512b.1327888082.git.joe@perches.com> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Add the types in the packet layout order. Signed-off-by: Joe Perches Reviewed-by: WANG Cong --- net/core/netpoll.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) 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);