mirror of https://gitee.com/openkylin/linux.git
cxgb4 : Fill DCB priority in vlan control headers
Signed-off-by: Anish Bhatt <anish@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8d6541b7bc
commit
397665dab5
|
@ -1137,7 +1137,7 @@ cxgb_fcoe_offload(struct sk_buff *skb, struct adapter *adap,
|
|||
*/
|
||||
netdev_tx_t t4_eth_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
u32 wr_mid;
|
||||
u32 wr_mid, ctrl0;
|
||||
u64 cntrl, *end;
|
||||
int qidx, credits;
|
||||
unsigned int flits, ndesc;
|
||||
|
@ -1274,9 +1274,15 @@ out_free: dev_kfree_skb_any(skb);
|
|||
#endif /* CONFIG_CHELSIO_T4_FCOE */
|
||||
}
|
||||
|
||||
cpl->ctrl0 = htonl(TXPKT_OPCODE_V(CPL_TX_PKT_XT) |
|
||||
TXPKT_INTF_V(pi->tx_chan) |
|
||||
TXPKT_PF_V(adap->pf));
|
||||
ctrl0 = TXPKT_OPCODE_V(CPL_TX_PKT_XT) | TXPKT_INTF_V(pi->tx_chan) |
|
||||
TXPKT_PF_V(adap->pf);
|
||||
#ifdef CONFIG_CHELSIO_T4_DCB
|
||||
if (is_t4(adap->params.chip))
|
||||
ctrl0 |= TXPKT_OVLAN_IDX_V(q->dcb_prio);
|
||||
else
|
||||
ctrl0 |= TXPKT_T5_OVLAN_IDX_V(q->dcb_prio);
|
||||
#endif
|
||||
cpl->ctrl0 = htonl(ctrl0);
|
||||
cpl->pack = htons(0);
|
||||
cpl->len = htons(skb->len);
|
||||
cpl->ctrl1 = cpu_to_be64(cntrl);
|
||||
|
|
|
@ -660,6 +660,9 @@ struct cpl_tx_pkt {
|
|||
#define TXPKT_OVLAN_IDX_S 12
|
||||
#define TXPKT_OVLAN_IDX_V(x) ((x) << TXPKT_OVLAN_IDX_S)
|
||||
|
||||
#define TXPKT_T5_OVLAN_IDX_S 12
|
||||
#define TXPKT_T5_OVLAN_IDX_V(x) ((x) << TXPKT_T5_OVLAN_IDX_S)
|
||||
|
||||
#define TXPKT_INTF_S 16
|
||||
#define TXPKT_INTF_V(x) ((x) << TXPKT_INTF_S)
|
||||
|
||||
|
|
Loading…
Reference in New Issue