From: Amir Vadai <amirv@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>,
Andi Kleen <andi@firstfloor.org>
Cc: netdev@vger.kernel.org, Andrew Morton <akpm@linux-foundation.org>,
Vivek Goyal <vgoyal@redhat.com>,
Or Gerlitz <ogerlitz@mellanox.com>,
Yevgeny Petrilin <yevgenyp@mellanox.com>,
Amir Vadai <amirv@mellanox.com>,
Ariel Elior <ariel.elior@qlogic.com>,
Michal Schmidt <mschmidt@redhat.com>
Subject: [PATCH net-next V1 3/3] net/bnx2x: Use is_kdump_kernel() to detect kdump kernel
Date: Mon, 25 Aug 2014 16:06:54 +0300 [thread overview]
Message-ID: <1408972014-13319-4-git-send-email-amirv@mellanox.com> (raw)
In-Reply-To: <1408972014-13319-1-git-send-email-amirv@mellanox.com>
Use is_kdump_kernel() to detect kdump kernel, instead of
reset_devices.
CC: Ariel Elior <ariel.elior@qlogic.com>
CC: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Amir Vadai <amirv@mellanox.com>
---
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 ++-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
index 2388144..c99087f 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c
@@ -21,6 +21,7 @@
#include <linux/if_vlan.h>
#include <linux/interrupt.h>
#include <linux/ip.h>
+#include <linux/crash_dump.h>
#include <net/tcp.h>
#include <net/ipv6.h>
#include <net/ip6_checksum.h>
@@ -64,7 +65,7 @@ static int bnx2x_calc_num_queues(struct bnx2x *bp)
int nq = bnx2x_num_queues ? : netif_get_num_default_rss_queues();
/* Reduce memory usage in kdump environment by using only one queue */
- if (reset_devices)
+ if (is_kdump_kernel())
nq = 1;
nq = clamp(nq, 1, BNX2X_MAX_QUEUES(bp));
diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index a008f48..0728c02 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -41,6 +41,7 @@
#include <linux/ethtool.h>
#include <linux/mii.h>
#include <linux/if_vlan.h>
+#include <linux/crash_dump.h>
#include <net/ip.h>
#include <net/ipv6.h>
#include <net/tcp.h>
@@ -11956,7 +11957,7 @@ static int bnx2x_init_bp(struct bnx2x *bp)
bp->disable_tpa = disable_tpa;
bp->disable_tpa |= IS_MF_STORAGE_SD(bp) || IS_MF_FCOE_AFEX(bp);
/* Reduce memory usage in kdump environment by disabling TPA */
- bp->disable_tpa |= reset_devices;
+ bp->disable_tpa |= is_kdump_kernel();
/* Set TPA flags */
if (bp->disable_tpa) {
--
1.8.3.4
next prev parent reply other threads:[~2014-08-25 13:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-25 13:06 [PATCH net-next V1 0/3] Make is_kdump_kernel() accessible from modules Amir Vadai
2014-08-25 13:06 ` [PATCH net-next V1 1/3] crash_dump: " Amir Vadai
2014-08-25 13:06 ` [PATCH net-next V1 2/3] net/mlx4: Use is_kdump_kernel() to detect kdump kernel Amir Vadai
2014-08-25 13:06 ` Amir Vadai [this message]
2014-08-25 18:06 ` [PATCH net-next V1 0/3] Make is_kdump_kernel() accessible from modules Vivek Goyal
2014-08-25 22:42 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408972014-13319-4-git-send-email-amirv@mellanox.com \
--to=amirv@mellanox.com \
--cc=akpm@linux-foundation.org \
--cc=andi@firstfloor.org \
--cc=ariel.elior@qlogic.com \
--cc=davem@davemloft.net \
--cc=mschmidt@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=ogerlitz@mellanox.com \
--cc=vgoyal@redhat.com \
--cc=yevgenyp@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).