Merge branch 'qed-Bug-fixes'
Manish Chopra says: ==================== qed*: Bug fixes. This series contains general qed/qede fixes. Please consider applying this to "net" ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
2ba036b970
@ -53,7 +53,7 @@
|
||||
extern const struct qed_common_ops qed_common_ops_pass;
|
||||
|
||||
#define QED_MAJOR_VERSION 8
|
||||
#define QED_MINOR_VERSION 33
|
||||
#define QED_MINOR_VERSION 37
|
||||
#define QED_REVISION_VERSION 0
|
||||
#define QED_ENGINEERING_VERSION 20
|
||||
|
||||
|
@ -2216,7 +2216,7 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
|
||||
u16 num_queues = 0;
|
||||
|
||||
/* Since the feature controls only queue-zones,
|
||||
* make sure we have the contexts [rx, tx, xdp] to
|
||||
* make sure we have the contexts [rx, xdp, tcs] to
|
||||
* match.
|
||||
*/
|
||||
for_each_hwfn(cdev, i) {
|
||||
@ -2226,7 +2226,8 @@ static int qed_fill_eth_dev_info(struct qed_dev *cdev,
|
||||
u16 cids;
|
||||
|
||||
cids = hwfn->pf_params.eth_pf_params.num_cons;
|
||||
num_queues += min_t(u16, l2_queues, cids / 3);
|
||||
cids /= (2 + info->num_tc);
|
||||
num_queues += min_t(u16, l2_queues, cids);
|
||||
}
|
||||
|
||||
/* queues might theoretically be >256, but interrupts'
|
||||
@ -2870,7 +2871,8 @@ static int qed_get_coalesce(struct qed_dev *cdev, u16 *coal, void *handle)
|
||||
p_hwfn = p_cid->p_owner;
|
||||
rc = qed_get_queue_coalesce(p_hwfn, coal, handle);
|
||||
if (rc)
|
||||
DP_NOTICE(p_hwfn, "Unable to read queue coalescing\n");
|
||||
DP_VERBOSE(cdev, QED_MSG_DEBUG,
|
||||
"Unable to read queue coalescing\n");
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
@ -382,6 +382,7 @@ void qed_consq_setup(struct qed_hwfn *p_hwfn);
|
||||
* @param p_hwfn
|
||||
*/
|
||||
void qed_consq_free(struct qed_hwfn *p_hwfn);
|
||||
int qed_spq_pend_post(struct qed_hwfn *p_hwfn);
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
@ -604,6 +604,9 @@ int qed_sp_pf_update_stag(struct qed_hwfn *p_hwfn)
|
||||
|
||||
p_ent->ramrod.pf_update.update_mf_vlan_flag = true;
|
||||
p_ent->ramrod.pf_update.mf_vlan = cpu_to_le16(p_hwfn->hw_info.ovlan);
|
||||
if (test_bit(QED_MF_UFP_SPECIFIC, &p_hwfn->cdev->mf_bits))
|
||||
p_ent->ramrod.pf_update.mf_vlan |=
|
||||
cpu_to_le16(((u16)p_hwfn->ufp_info.tc << 13));
|
||||
|
||||
return qed_spq_post(p_hwfn, p_ent, NULL);
|
||||
}
|
||||
|
@ -397,6 +397,11 @@ int qed_eq_completion(struct qed_hwfn *p_hwfn, void *cookie)
|
||||
|
||||
qed_eq_prod_update(p_hwfn, qed_chain_get_prod_idx(p_chain));
|
||||
|
||||
/* Attempt to post pending requests */
|
||||
spin_lock_bh(&p_hwfn->p_spq->lock);
|
||||
rc = qed_spq_pend_post(p_hwfn);
|
||||
spin_unlock_bh(&p_hwfn->p_spq->lock);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
@ -767,7 +772,7 @@ static int qed_spq_post_list(struct qed_hwfn *p_hwfn,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
|
||||
int qed_spq_pend_post(struct qed_hwfn *p_hwfn)
|
||||
{
|
||||
struct qed_spq *p_spq = p_hwfn->p_spq;
|
||||
struct qed_spq_entry *p_ent = NULL;
|
||||
@ -905,7 +910,6 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
|
||||
struct qed_spq_entry *p_ent = NULL;
|
||||
struct qed_spq_entry *tmp;
|
||||
struct qed_spq_entry *found = NULL;
|
||||
int rc;
|
||||
|
||||
if (!p_hwfn)
|
||||
return -EINVAL;
|
||||
@ -963,12 +967,7 @@ int qed_spq_completion(struct qed_hwfn *p_hwfn,
|
||||
*/
|
||||
qed_spq_return_entry(p_hwfn, found);
|
||||
|
||||
/* Attempt to post pending requests */
|
||||
spin_lock_bh(&p_spq->lock);
|
||||
rc = qed_spq_pend_post(p_hwfn);
|
||||
spin_unlock_bh(&p_spq->lock);
|
||||
|
||||
return rc;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int qed_consq_alloc(struct qed_hwfn *p_hwfn)
|
||||
|
@ -56,7 +56,7 @@
|
||||
#include <net/tc_act/tc_gact.h>
|
||||
|
||||
#define QEDE_MAJOR_VERSION 8
|
||||
#define QEDE_MINOR_VERSION 33
|
||||
#define QEDE_MINOR_VERSION 37
|
||||
#define QEDE_REVISION_VERSION 0
|
||||
#define QEDE_ENGINEERING_VERSION 20
|
||||
#define DRV_MODULE_VERSION __stringify(QEDE_MAJOR_VERSION) "." \
|
||||
@ -494,6 +494,9 @@ struct qede_reload_args {
|
||||
|
||||
/* Datapath functions definition */
|
||||
netdev_tx_t qede_start_xmit(struct sk_buff *skb, struct net_device *ndev);
|
||||
u16 qede_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||
struct net_device *sb_dev,
|
||||
select_queue_fallback_t fallback);
|
||||
netdev_features_t qede_features_check(struct sk_buff *skb,
|
||||
struct net_device *dev,
|
||||
netdev_features_t features);
|
||||
|
@ -1695,6 +1695,19 @@ netdev_tx_t qede_start_xmit(struct sk_buff *skb, struct net_device *ndev)
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
||||
u16 qede_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||
struct net_device *sb_dev,
|
||||
select_queue_fallback_t fallback)
|
||||
{
|
||||
struct qede_dev *edev = netdev_priv(dev);
|
||||
int total_txq;
|
||||
|
||||
total_txq = QEDE_TSS_COUNT(edev) * edev->dev_info.num_tc;
|
||||
|
||||
return QEDE_TSS_COUNT(edev) ?
|
||||
fallback(dev, skb, NULL) % total_txq : 0;
|
||||
}
|
||||
|
||||
/* 8B udp header + 8B base tunnel header + 32B option length */
|
||||
#define QEDE_MAX_TUN_HDR_LEN 48
|
||||
|
||||
|
@ -631,6 +631,7 @@ static const struct net_device_ops qede_netdev_ops = {
|
||||
.ndo_open = qede_open,
|
||||
.ndo_stop = qede_close,
|
||||
.ndo_start_xmit = qede_start_xmit,
|
||||
.ndo_select_queue = qede_select_queue,
|
||||
.ndo_set_rx_mode = qede_set_rx_mode,
|
||||
.ndo_set_mac_address = qede_set_mac_addr,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
@ -666,6 +667,7 @@ static const struct net_device_ops qede_netdev_vf_ops = {
|
||||
.ndo_open = qede_open,
|
||||
.ndo_stop = qede_close,
|
||||
.ndo_start_xmit = qede_start_xmit,
|
||||
.ndo_select_queue = qede_select_queue,
|
||||
.ndo_set_rx_mode = qede_set_rx_mode,
|
||||
.ndo_set_mac_address = qede_set_mac_addr,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
@ -684,6 +686,7 @@ static const struct net_device_ops qede_netdev_vf_xdp_ops = {
|
||||
.ndo_open = qede_open,
|
||||
.ndo_stop = qede_close,
|
||||
.ndo_start_xmit = qede_start_xmit,
|
||||
.ndo_select_queue = qede_select_queue,
|
||||
.ndo_set_rx_mode = qede_set_rx_mode,
|
||||
.ndo_set_mac_address = qede_set_mac_addr,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
|
Loading…
x
Reference in New Issue
Block a user