Skip to content

Commit e735da5

Browse files
committed
Merge branch 'qed-general-fixes'
Yuval Mintz says: ==================== qed*: General fixes This series contain several fixes for qed and qede. - #1 [and ~#5] relate to XDP cleanups - #2 and #5 correct VF behavior - #3 and #4 fix and add missing configurations needed for RoCE & storage ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents cf68017 + be47c55 commit e735da5

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

drivers/net/ethernet/qlogic/qed/qed_cxt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,7 @@ void qed_qm_init_pf(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
14601460
params.is_first_pf = p_hwfn->first_on_engine;
14611461
params.num_pf_cids = iids.cids;
14621462
params.num_vf_cids = iids.vf_cids;
1463+
params.num_tids = iids.tids;
14631464
params.start_pq = qm_info->start_pq;
14641465
params.num_pf_pqs = qm_info->num_pqs - qm_info->num_vf_pqs;
14651466
params.num_vf_pqs = qm_info->num_vf_pqs;

drivers/net/ethernet/qlogic/qed/qed_dev.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,7 @@ qed_hw_init_pf_doorbell_bar(struct qed_hwfn *p_hwfn, struct qed_ptt *p_ptt)
13701370
NULL) +
13711371
qed_cxt_get_proto_cid_count(p_hwfn, PROTOCOLID_ETH,
13721372
NULL);
1373-
norm_regsize = roundup(QED_PF_DEMS_SIZE * non_pwm_conn, 4096);
1373+
norm_regsize = roundup(QED_PF_DEMS_SIZE * non_pwm_conn, PAGE_SIZE);
13741374
min_addr_reg1 = norm_regsize / 4096;
13751375
pwm_regsize = db_bar_size - norm_regsize;
13761376

drivers/net/ethernet/qlogic/qed/qed_main.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,10 +1093,12 @@ static int qed_slowpath_stop(struct qed_dev *cdev)
10931093
qed_free_stream_mem(cdev);
10941094
if (IS_QED_ETH_IF(cdev))
10951095
qed_sriov_disable(cdev, true);
1096+
}
1097+
1098+
qed_nic_stop(cdev);
10961099

1097-
qed_nic_stop(cdev);
1100+
if (IS_PF(cdev))
10981101
qed_slowpath_irq_free(cdev);
1099-
}
11001102

11011103
qed_disable_msix(cdev);
11021104

drivers/net/ethernet/qlogic/qede/qede_filter.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,11 +1028,6 @@ int qede_xdp(struct net_device *dev, struct netdev_xdp *xdp)
10281028
{
10291029
struct qede_dev *edev = netdev_priv(dev);
10301030

1031-
if (IS_VF(edev)) {
1032-
DP_NOTICE(edev, "VFs don't support XDP\n");
1033-
return -EOPNOTSUPP;
1034-
}
1035-
10361031
switch (xdp->command) {
10371032
case XDP_SETUP_PROG:
10381033
return qede_xdp_set(edev, xdp->prog);

drivers/net/ethernet/qlogic/qede/qede_main.c

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,23 @@ static const struct net_device_ops qede_netdev_ops = {
563563
#endif
564564
};
565565

566+
static const struct net_device_ops qede_netdev_vf_ops = {
567+
.ndo_open = qede_open,
568+
.ndo_stop = qede_close,
569+
.ndo_start_xmit = qede_start_xmit,
570+
.ndo_set_rx_mode = qede_set_rx_mode,
571+
.ndo_set_mac_address = qede_set_mac_addr,
572+
.ndo_validate_addr = eth_validate_addr,
573+
.ndo_change_mtu = qede_change_mtu,
574+
.ndo_vlan_rx_add_vid = qede_vlan_rx_add_vid,
575+
.ndo_vlan_rx_kill_vid = qede_vlan_rx_kill_vid,
576+
.ndo_set_features = qede_set_features,
577+
.ndo_get_stats64 = qede_get_stats64,
578+
.ndo_udp_tunnel_add = qede_udp_tunnel_add,
579+
.ndo_udp_tunnel_del = qede_udp_tunnel_del,
580+
.ndo_features_check = qede_features_check,
581+
};
582+
566583
/* -------------------------------------------------------------------------
567584
* START OF PROBE / REMOVE
568585
* -------------------------------------------------------------------------
@@ -622,7 +639,10 @@ static void qede_init_ndev(struct qede_dev *edev)
622639

623640
ndev->watchdog_timeo = TX_TIMEOUT;
624641

625-
ndev->netdev_ops = &qede_netdev_ops;
642+
if (IS_VF(edev))
643+
ndev->netdev_ops = &qede_netdev_vf_ops;
644+
else
645+
ndev->netdev_ops = &qede_netdev_ops;
626646

627647
qede_set_ethtool_ops(ndev);
628648

@@ -1313,6 +1333,9 @@ static void qede_free_mem_fp(struct qede_dev *edev, struct qede_fastpath *fp)
13131333
if (fp->type & QEDE_FASTPATH_RX)
13141334
qede_free_mem_rxq(edev, fp->rxq);
13151335

1336+
if (fp->type & QEDE_FASTPATH_XDP)
1337+
qede_free_mem_txq(edev, fp->xdp_tx);
1338+
13161339
if (fp->type & QEDE_FASTPATH_TX)
13171340
qede_free_mem_txq(edev, fp->txq);
13181341
}

0 commit comments

Comments
 (0)