All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: davem@davemloft.net, kuba@kernel.org
Cc: Coiby Xu <coxu@redhat.com>,
	netdev@vger.kernel.org, sassmann@redhat.com,
	anthony.l.nguyen@intel.com,
	Dave Switzer <david.switzer@intel.com>
Subject: [PATCH net-next 2/8] i40e: use minimal Tx and Rx pairs for kdump
Date: Fri, 23 Apr 2021 09:42:41 -0700	[thread overview]
Message-ID: <20210423164247.3252913-3-anthony.l.nguyen@intel.com> (raw)
In-Reply-To: <20210423164247.3252913-1-anthony.l.nguyen@intel.com>

From: Coiby Xu <coxu@redhat.com>

Set the number of the MSI-X vectors to 1. When MSI-X is enabled,
it's not allowed to use more TC queue pairs than MSI-X vectors
(pf->num_lan_msix) exist. Thus the number of Tx and Rx pairs
(vsi->num_queue_pairs) will be equal to the number of MSI-X vectors,
i.e., 1.

Signed-off-by: Coiby Xu <coxu@redhat.com>
Tested-by: Dave Switzer <david.switzer@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
 drivers/net/ethernet/intel/i40e/i40e_main.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 687ef52a8116..b51b8e25501d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -6,6 +6,7 @@
 #include <linux/pci.h>
 #include <linux/bpf.h>
 #include <generated/utsrelease.h>
+#include <linux/crash_dump.h>
 
 /* Local includes */
 #include "i40e.h"
@@ -15506,6 +15507,14 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	if (err)
 		goto err_switch_setup;
 
+	/* Reduce Tx and Rx pairs for kdump
+	 * When MSI-X is enabled, it's not allowed to use more TC queue
+	 * pairs than MSI-X vectors (pf->num_lan_msix) exist. Thus
+	 * vsi->num_queue_pairs will be equal to pf->num_lan_msix, i.e., 1.
+	 */
+	if (is_kdump_kernel())
+		pf->num_lan_msix = 1;
+
 	pf->udp_tunnel_nic.set_port = i40e_udp_tunnel_set_port;
 	pf->udp_tunnel_nic.unset_port = i40e_udp_tunnel_unset_port;
 	pf->udp_tunnel_nic.flags = UDP_TUNNEL_NIC_INFO_MAY_SLEEP;
-- 
2.26.2


  parent reply	other threads:[~2021-04-23 16:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 16:42 [PATCH net-next 0/8][pull request] 40GbE Intel Wired LAN Driver Updates 2021-04-23 Tony Nguyen
2021-04-23 16:42 ` [PATCH net-next 1/8] i40e: refactor repeated link state reporting code Tony Nguyen
2021-04-23 16:42 ` Tony Nguyen [this message]
2021-04-23 16:42 ` [PATCH net-next 3/8] i40e: use minimal Rx and Tx ring buffers for kdump Tony Nguyen
2021-04-23 16:42 ` [PATCH net-next 4/8] i40e: use minimal admin queue " Tony Nguyen
2021-04-23 16:42 ` [PATCH net-next 5/8] iavf: remove duplicate free resources calls Tony Nguyen
2021-04-23 16:42 ` [PATCH net-next 6/8] iavf: change the flex-byte support number to macro definition Tony Nguyen
2021-04-23 16:42 ` [PATCH net-next 7/8] iavf: enhance the duplicated FDIR list scan handling Tony Nguyen
2021-04-23 16:42 ` [PATCH net-next 8/8] iavf: redefine the magic number for FDIR GTP-U header fields Tony Nguyen
2021-04-23 21:10 ` [PATCH net-next 0/8][pull request] 40GbE Intel Wired LAN Driver Updates 2021-04-23 patchwork-bot+netdevbpf

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=20210423164247.3252913-3-anthony.l.nguyen@intel.com \
    --to=anthony.l.nguyen@intel.com \
    --cc=coxu@redhat.com \
    --cc=davem@davemloft.net \
    --cc=david.switzer@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sassmann@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.