Skip to content

Commit 0da2b18

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== 40GbE Intel Wired LAN Driver Updates 2019-01-22 This series contains updates to i40e and xsk. Jan exports xdp_get_umem_from_qid() for other drivers/modules to use. Refactored the code use the netdev provided umems, instead of containing them inside our i40e_vsi. Aleksandr fixes an issue where RSS queues were misconfigured, so limit the RSS queue number to the online CPU number. Damian adds support for ethtool's setting and getting the FEC configuration. Grzegorz fixes a type mismatch, where the return value was not matching the function declaration. Sergey adds checks in the queue configuration handler to ensure the number of queue pairs requested by the VF is less than maximum possible. Lihong cleans up code left around from earlier silicon validation in the i40e debugfs code. Julia Lawall and Colin Ian King clean up white space indentation issues found. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents cc648f8 + d1b3fa8 commit 0da2b18

File tree

7 files changed

+301
-142
lines changed

7 files changed

+301
-142
lines changed

drivers/net/ethernet/intel/i40e/i40e.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <net/pkt_cls.h>
3535
#include <net/tc_act/tc_gact.h>
3636
#include <net/tc_act/tc_mirred.h>
37+
#include <net/xdp_sock.h>
3738
#include "i40e_type.h"
3839
#include "i40e_prototype.h"
3940
#include "i40e_client.h"
@@ -523,6 +524,8 @@ struct i40e_pf {
523524
#define I40E_FLAG_FD_SB_INACTIVE BIT(22)
524525
#define I40E_FLAG_FD_SB_TO_CLOUD_FILTER BIT(23)
525526
#define I40E_FLAG_DISABLE_FW_LLDP BIT(24)
527+
#define I40E_FLAG_RS_FEC BIT(25)
528+
#define I40E_FLAG_BASE_R_FEC BIT(26)
526529

527530
struct i40e_client_instance *cinst;
528531
bool stat_offsets_loaded;
@@ -787,11 +790,6 @@ struct i40e_vsi {
787790

788791
/* VSI specific handlers */
789792
irqreturn_t (*irq_handler)(int irq, void *data);
790-
791-
/* AF_XDP zero-copy */
792-
struct xdp_umem **xsk_umems;
793-
u16 num_xsk_umems_used;
794-
u16 num_xsk_umems;
795793
} ____cacheline_internodealigned_in_smp;
796794

797795
struct i40e_netdev_priv {
@@ -1091,6 +1089,8 @@ i40e_status i40e_set_partition_bw_setting(struct i40e_pf *pf);
10911089
i40e_status i40e_commit_partition_bw_setting(struct i40e_pf *pf);
10921090
void i40e_print_link_message(struct i40e_vsi *vsi, bool isup);
10931091

1092+
void i40e_set_fec_in_flags(u8 fec_cfg, u32 *flags);
1093+
10941094
static inline bool i40e_enabled_xdp_vsi(struct i40e_vsi *vsi)
10951095
{
10961096
return !!vsi->xdp_prog;
@@ -1104,10 +1104,10 @@ static inline struct xdp_umem *i40e_xsk_umem(struct i40e_ring *ring)
11041104
if (ring_is_xdp(ring))
11051105
qid -= ring->vsi->alloc_queue_pairs;
11061106

1107-
if (!ring->vsi->xsk_umems || !ring->vsi->xsk_umems[qid] || !xdp_on)
1107+
if (!xdp_on)
11081108
return NULL;
11091109

1110-
return ring->vsi->xsk_umems[qid];
1110+
return xdp_get_umem_from_qid(ring->vsi->netdev, qid);
11111111
}
11121112

11131113
int i40e_create_queue_channel(struct i40e_vsi *vsi, struct i40e_channel *ch);

drivers/net/ethernet/intel/i40e/i40e_debugfs.c

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,30 +1642,7 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
16421642
count = buf_tmp - i40e_dbg_netdev_ops_buf + 1;
16431643
}
16441644

1645-
if (strncmp(i40e_dbg_netdev_ops_buf, "tx_timeout", 10) == 0) {
1646-
cnt = sscanf(&i40e_dbg_netdev_ops_buf[11], "%i", &vsi_seid);
1647-
if (cnt != 1) {
1648-
dev_info(&pf->pdev->dev, "tx_timeout <vsi_seid>\n");
1649-
goto netdev_ops_write_done;
1650-
}
1651-
vsi = i40e_dbg_find_vsi(pf, vsi_seid);
1652-
if (!vsi) {
1653-
dev_info(&pf->pdev->dev,
1654-
"tx_timeout: VSI %d not found\n", vsi_seid);
1655-
} else if (!vsi->netdev) {
1656-
dev_info(&pf->pdev->dev, "tx_timeout: no netdev for VSI %d\n",
1657-
vsi_seid);
1658-
} else if (test_bit(__I40E_VSI_DOWN, vsi->state)) {
1659-
dev_info(&pf->pdev->dev, "tx_timeout: VSI %d not UP\n",
1660-
vsi_seid);
1661-
} else if (rtnl_trylock()) {
1662-
vsi->netdev->netdev_ops->ndo_tx_timeout(vsi->netdev);
1663-
rtnl_unlock();
1664-
dev_info(&pf->pdev->dev, "tx_timeout called\n");
1665-
} else {
1666-
dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n");
1667-
}
1668-
} else if (strncmp(i40e_dbg_netdev_ops_buf, "change_mtu", 10) == 0) {
1645+
if (strncmp(i40e_dbg_netdev_ops_buf, "change_mtu", 10) == 0) {
16691646
int mtu;
16701647

16711648
cnt = sscanf(&i40e_dbg_netdev_ops_buf[11], "%i %i",
@@ -1733,7 +1710,6 @@ static ssize_t i40e_dbg_netdev_ops_write(struct file *filp,
17331710
dev_info(&pf->pdev->dev, "unknown command '%s'\n",
17341711
i40e_dbg_netdev_ops_buf);
17351712
dev_info(&pf->pdev->dev, "available commands\n");
1736-
dev_info(&pf->pdev->dev, " tx_timeout <vsi_seid>\n");
17371713
dev_info(&pf->pdev->dev, " change_mtu <vsi_seid> <mtu>\n");
17381714
dev_info(&pf->pdev->dev, " set_rx_mode <vsi_seid>\n");
17391715
dev_info(&pf->pdev->dev, " napi <vsi_seid>\n");

0 commit comments

Comments
 (0)