mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 00:51:44 +00:00
octeontx2-af: Re-enable MAC TX in otx2_stop processing
During QoS scheduling testing with multiple strict priority flows, the
netdev tx watchdog timeout routine is invoked when a low priority QoS
queue doesn't get a chance to transmit the packets because other high
priority flows are completely subscribing the transmit link. The netdev
tx watchdog timeout routine will stop MAC RX and TX functionality in
otx2_stop() routine before cleanup of HW TX queues which results in SMQ
flush errors because the packets belonging to low priority queues will
never gets flushed since MAC TX is disabled. This patch fixes the issue
by re-enabling MAC TX to ensure the packets in HW pipeline gets flushed
properly.
Fixes: a7faa68b4e
("octeontx2-af: Start/Stop traffic in CGX along with NPC")
Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a0d9528f6d
commit
818ed8933b
@ -905,6 +905,7 @@ u32 rvu_cgx_get_fifolen(struct rvu *rvu);
|
||||
void *rvu_first_cgx_pdata(struct rvu *rvu);
|
||||
int cgxlmac_to_pf(struct rvu *rvu, int cgx_id, int lmac_id);
|
||||
int rvu_cgx_config_tx(void *cgxd, int lmac_id, bool enable);
|
||||
int rvu_cgx_tx_enable(struct rvu *rvu, u16 pcifunc, bool enable);
|
||||
int rvu_cgx_prio_flow_ctrl_cfg(struct rvu *rvu, u16 pcifunc, u8 tx_pause, u8 rx_pause,
|
||||
u16 pfc_en);
|
||||
int rvu_cgx_cfg_pause_frm(struct rvu *rvu, u16 pcifunc, u8 tx_pause, u8 rx_pause);
|
||||
|
@ -465,6 +465,23 @@ int rvu_cgx_config_rxtx(struct rvu *rvu, u16 pcifunc, bool start)
|
||||
return mac_ops->mac_rx_tx_enable(cgxd, lmac_id, start);
|
||||
}
|
||||
|
||||
int rvu_cgx_tx_enable(struct rvu *rvu, u16 pcifunc, bool enable)
|
||||
{
|
||||
int pf = rvu_get_pf(pcifunc);
|
||||
struct mac_ops *mac_ops;
|
||||
u8 cgx_id, lmac_id;
|
||||
void *cgxd;
|
||||
|
||||
if (!is_cgx_config_permitted(rvu, pcifunc))
|
||||
return LMAC_AF_ERR_PERM_DENIED;
|
||||
|
||||
rvu_get_cgx_lmac_id(rvu->pf2cgxlmac_map[pf], &cgx_id, &lmac_id);
|
||||
cgxd = rvu_cgx_pdata(cgx_id, rvu);
|
||||
mac_ops = get_mac_ops(cgxd);
|
||||
|
||||
return mac_ops->mac_tx_enable(cgxd, lmac_id, enable);
|
||||
}
|
||||
|
||||
int rvu_cgx_config_tx(void *cgxd, int lmac_id, bool enable)
|
||||
{
|
||||
struct mac_ops *mac_ops;
|
||||
|
@ -4737,7 +4737,13 @@ int rvu_mbox_handler_nix_lf_stop_rx(struct rvu *rvu, struct msg_req *req,
|
||||
pfvf = rvu_get_pfvf(rvu, pcifunc);
|
||||
clear_bit(NIXLF_INITIALIZED, &pfvf->flags);
|
||||
|
||||
return rvu_cgx_start_stop_io(rvu, pcifunc, false);
|
||||
err = rvu_cgx_start_stop_io(rvu, pcifunc, false);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
rvu_cgx_tx_enable(rvu, pcifunc, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define RX_SA_BASE GENMASK_ULL(52, 7)
|
||||
|
Loading…
Reference in New Issue
Block a user