lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 3 Jun 2016 20:07:57 +0000
From:	Casey Leedom <leedom@...lsio.com>
To:	Hariprasad S <hariprasad@...lsio.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	Nirranjan Kirubaharan <nirranjan@...lsio.com>
Subject: Re: [PATCH net-next] cxgb4: Reduce resource allocation in kdump
 kernel

  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 <hariprasad@...lsio.com>
Sent: Friday, June 3, 2016 10:35:45 AM
To: davem@...emloft.net
Cc: netdev@...r.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 <hariprasad@...lsio.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ