@@ -408,7 +408,11 @@ static netdev_tx_t mlxsw_sp_port_xmit(struct sk_buff *skb,}mlxsw_sp_txhdr_construct(skb,&tx_info);-len=skb->len;+/* TX header is consumed by HW on the way so we shouldn't count its+*bytesasbeingsent.+*/+len=skb->len-MLXSW_TXHDR_LEN;+/* Due to a race we might fail here because of a full queue. In that*unlikelycasewesimplydropthepacket.*/
@@ -316,7 +316,10 @@ static netdev_tx_t mlxsw_sx_port_xmit(struct sk_buff *skb,}}mlxsw_sx_txhdr_construct(skb,&tx_info);-len=skb->len;+/* TX header is consumed by HW on the way so we shouldn't count its+*bytesasbeingsent.+*/+len=skb->len-MLXSW_TXHDR_LEN;/* Due to a race we might fail here because of a full queue. In that*unlikelycasewesimplydropthepacket.*/