Looks good to me. Of course I came up with those changes so maybe we should get another reviewer? :-) Also, don't forget to mention "Bug #29998" in the commit message ...
Casey ________________________________________ From: Hariprasad Shenai <haripra...@chelsio.com> Sent: Friday, June 3, 2016 10:35:45 AM To: da...@davemloft.net Cc: netdev@vger.kernel.org; Casey Leedom; Nirranjan Kirubaharan; Hariprasad S Subject: [PATCH net-next] cxgb4: Reduce resource allocation in kdump kernel When is_kdump_kernel() is true, reduce our memory footprint by only using a single "Queue Set" and Forcing Master so we can reinitialize the Firmware/Chip. Signed-off-by: Hariprasad Shenai <haripra...@chelsio.com> --- drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 477db477b133..5317187d0073 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -64,6 +64,7 @@ #include <net/bonding.h> #include <net/addrconf.h> #include <asm/uaccess.h> +#include <linux/crash_dump.h> #include "cxgb4.h" #include "t4_regs.h" @@ -3735,7 +3736,8 @@ static int adap_init0(struct adapter *adap) return ret; /* Contact FW, advertising Master capability */ - ret = t4_fw_hello(adap, adap->mbox, adap->mbox, MASTER_MAY, &state); + ret = t4_fw_hello(adap, adap->mbox, adap->mbox, + is_kdump_kernel() ? MASTER_MUST : MASTER_MAY, &state); if (ret < 0) { dev_err(adap->pdev_dev, "could not connect to FW, error %d\n", ret); @@ -4366,6 +4368,14 @@ static void cfg_queues(struct adapter *adap) if (q10g > netif_get_num_default_rss_queues()) q10g = netif_get_num_default_rss_queues(); + /* Reduce memory usage in kdump environment by using only one queue + * and disable all offload. + */ + if (is_kdump_kernel()) { + q10g = 1; + adap->params.offload = 0; + } + for_each_port(adap, i) { struct port_info *pi = adap2pinfo(adap, i); -- 2.3.4