bnx2x: save RAM in kdump kernel by disabling TPA
authorMichal Schmidt <mschmidt@redhat.com>
Tue, 25 Feb 2014 15:04:26 +0000 (16:04 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Feb 2014 20:27:50 +0000 (15:27 -0500)
When running in a kdump kernel, disable TPA. This saves memory, which
tends to be scarce in kdump.

TPA, being a receive acceleration, is unlikely to be useful for kdump,
whose purpose is to send the memory image out.

This saves additional 5 MB in the kdump environment.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c

index 230dea62389549decc47ae8ecabff3a030d58826..5e74599b05c73d2687a1b106dad13bdf576f2835 100644 (file)
@@ -11804,6 +11804,8 @@ 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;
 
        /* Set TPA flags */
        if (bp->disable_tpa) {