From patchwork Fri Jul 20 23:35:13 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Greer X-Patchwork-Id: 172393 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 470292C03EC for ; Sat, 21 Jul 2012 09:35:33 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752686Ab2GTXfa (ORCPT ); Fri, 20 Jul 2012 19:35:30 -0400 Received: from mail20.dotsterhost.com ([66.11.232.73]:41213 "EHLO mail20.dotsterhost.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751901Ab2GTXf3 (ORCPT ); Fri, 20 Jul 2012 19:35:29 -0400 Received: (qmail 3143 invoked from network); 20 Jul 2012 23:35:28 -0000 Received: from unknown (HELO blue.animalcreek.com) (mgreer@animalcreek.com@[68.2.83.159]) by 66.11.232.73 with SMTP; 20 Jul 2012 23:35:28 -0000 Received: from blue.animalcreek.com (localhost [127.0.0.1]) by blue.animalcreek.com (Postfix) with ESMTP id 45DD565C06; Fri, 20 Jul 2012 16:35:28 -0700 (MST) From: "Mark A. Greer" To: netdev@vger.kernel.org Cc: davem@davemloft.net, "Mark A. Greer" , Jiri Pirko Subject: [PATCH] rtnl: Add #ifdef CONFIG_RPS around num_rx_queues reference Date: Fri, 20 Jul 2012 16:35:13 -0700 Message-Id: <1342827313-2827-1-git-send-email-mgreer@animalcreek.com> X-Mailer: git-send-email 1.7.11.2 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: "Mark A. Greer" Commit 76ff5cc91935c51fcf1a6a99ffa28b97a6e7a884 (rtnl: allow to specify number of rx and tx queues on device creation) added a reference to the net_device structure's 'num_rx_queues' member in net/core/rtnetlink.c:rtnl_fill_ifinfo() However, the definition for 'num_rx_queues' is surrounded by an '#ifdef CONFIG_RPS' while the new reference to it is not. This causes a compile error when CONFIG_RPS is not defined. Fix the compile error by surrounding the new reference to 'num_rx_queues' by an '#ifdef CONFIG_RPS'. CC: Jiri Pirko Signed-off-by: Mark A. Greer --- The problem can be easily reproduced by compiling with davinci_all_defconfig (ARCH=arm). I don't know this area well enough to know whether that (and other) defconfigs should have CONFIG_RPS enabled or not, or whether there is some missing Kconfig logic to enable it. net/core/rtnetlink.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 5bb1ebc..334b930 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -892,7 +892,9 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev, nla_put_u32(skb, IFLA_GROUP, dev->group) || nla_put_u32(skb, IFLA_PROMISCUITY, dev->promiscuity) || nla_put_u32(skb, IFLA_NUM_TX_QUEUES, dev->num_tx_queues) || +#ifdef CONFIG_RPS nla_put_u32(skb, IFLA_NUM_RX_QUEUES, dev->num_rx_queues) || +#endif (dev->ifindex != dev->iflink && nla_put_u32(skb, IFLA_LINK, dev->iflink)) || (dev->master &&