From patchwork Tue Apr 26 16:21:04 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 92937 X-Patchwork-Delegate: davem@davemloft.net 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 A707EB6EF1 for ; Wed, 27 Apr 2011 02:21:16 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751635Ab1DZQVK (ORCPT ); Tue, 26 Apr 2011 12:21:10 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:62090 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751021Ab1DZQVJ (ORCPT ); Tue, 26 Apr 2011 12:21:09 -0400 Received: by wya21 with SMTP id 21so595812wya.19 for ; Tue, 26 Apr 2011 09:21:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:in-reply-to:references :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=ZExj+317qfVXOmiiyvR+h7cZIkYbwLzTxrh2NUffnus=; b=EToQxeHwy04amc9Afc29JB0hAIvY3bJVwdQHnkSb+M3BZEfKzqg0QzGgbIONRbJL0q +7KACk7xIFEfLTcy6BpUIH5R4KUUk3IL2cwmiMthXNx7J01OCGewJUKSUEmwyIIQ935w 4DdKhski1zlbfyAKB8LP74AFZQzKb6PFk7TS0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=fIjwRMuHV5ANIwluYx9tHjwJIsY6o46O0DG97Vz1kguQIY0NP2oBUh4O9vZXCnANq+ zpIiX7ohRuPs+iZgAGtAcdkbkza0K1StQkPWOciSy3WYLRiLKirbyc44H/nT85bQPkru g6So647Ft5ODqMg2FnJziI9O7nJe2ubrCvcaw= Received: by 10.216.9.141 with SMTP id 13mr4790058wet.73.1303834867946; Tue, 26 Apr 2011 09:21:07 -0700 (PDT) Received: from [10.150.51.214] (gw0.net.jmsp.net [212.23.165.14]) by mx.google.com with ESMTPS id r57sm3104356wes.1.2011.04.26.09.21.06 (version=SSLv3 cipher=OTHER); Tue, 26 Apr 2011 09:21:07 -0700 (PDT) Subject: RE: [RFC PATCH] netlink: Increase netlink dump skb message size From: Eric Dumazet To: "Rose, Gregory V" Cc: David Miller , "netdev@vger.kernel.org" , "bhutchings@solarflare.com" In-Reply-To: <43F901BD926A4E43B106BF17856F0755018DC497D4@orsmsx508.amr.corp.intel.com> References: <20110425220157.2012.96707.stgit@gitlad.jf.intel.com> <1303799597.2747.214.camel@edumazet-laptop> <20110425.235600.104065244.davem@davemloft.net> <43F901BD926A4E43B106BF17856F0755018DC497D4@orsmsx508.amr.corp.intel.com> Date: Tue, 26 Apr 2011 18:21:04 +0200 Message-ID: <1303834864.3358.58.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le mardi 26 avril 2011 à 09:12 -0700, Rose, Gregory V a écrit : > I'm fine with however you folks want to approach this, just give me some direction. I would just try following patch : --- 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 diff --git a/include/linux/netlink.h b/include/linux/netlink.h index 4c4ac3f..22cac81 100644 --- a/include/linux/netlink.h +++ b/include/linux/netlink.h @@ -210,6 +210,7 @@ int netlink_sendskb(struct sock *sk, struct sk_buff *skb); #else #define NLMSG_GOODSIZE SKB_WITH_OVERHEAD(8192UL) #endif +#define NLMSG_DUMPSIZE SKB_WITH_OVERHEAD(8192UL) #define NLMSG_DEFAULT_SIZE (NLMSG_GOODSIZE - NLMSG_HDRLEN) diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c index c8f35b5..cb8d6ac 100644 --- a/net/netlink/af_netlink.c +++ b/net/netlink/af_netlink.c @@ -1669,7 +1669,7 @@ static int netlink_dump(struct sock *sk) struct nlmsghdr *nlh; int len, err = -ENOBUFS; - skb = sock_rmalloc(sk, NLMSG_GOODSIZE, 0, GFP_KERNEL); + skb = sock_rmalloc(sk, NLMSG_DUMPSIZE, 0, GFP_KERNEL); if (!skb) goto errout;