diff options
| author | Tariq Toukan <tariqt@mellanox.com> | 2019-05-15 08:57:13 -0400 |
|---|---|---|
| committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-05-17 16:16:48 -0400 |
| commit | 299a11957a5f2408cd8d9261cc45688bb5541ae7 (patch) | |
| tree | 81a77cade679579746429a3acecf30088a79abbe | |
| parent | dd06486710d251140edc86ec3bbef0c25dcec1cb (diff) | |
net/mlx5e: Fix wrong xmit_more application
Cited patch refactored the xmit_more indication while not preserving
its functionality. Fix it.
Fixes: 3c31ff22b25f ("drivers: mellanox: use netdev_xmit_more() helper")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 9 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | 3 |
3 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c index 7b61126fcec9..195a7d903cec 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | |||
| @@ -361,7 +361,7 @@ netdev_tx_t mlx5e_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb, | |||
| 361 | } | 361 | } |
| 362 | 362 | ||
| 363 | stats->bytes += num_bytes; | 363 | stats->bytes += num_bytes; |
| 364 | stats->xmit_more += netdev_xmit_more(); | 364 | stats->xmit_more += xmit_more; |
| 365 | 365 | ||
| 366 | headlen = skb->len - ihs - skb->data_len; | 366 | headlen = skb->len - ihs - skb->data_len; |
| 367 | ds_cnt += !!headlen; | 367 | ds_cnt += !!headlen; |
| @@ -624,7 +624,8 @@ mlx5i_txwqe_build_datagram(struct mlx5_av *av, u32 dqpn, u32 dqkey, | |||
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | netdev_tx_t mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb, | 626 | netdev_tx_t mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb, |
| 627 | struct mlx5_av *av, u32 dqpn, u32 dqkey) | 627 | struct mlx5_av *av, u32 dqpn, u32 dqkey, |
| 628 | bool xmit_more) | ||
| 628 | { | 629 | { |
| 629 | struct mlx5_wq_cyc *wq = &sq->wq; | 630 | struct mlx5_wq_cyc *wq = &sq->wq; |
| 630 | struct mlx5i_tx_wqe *wqe; | 631 | struct mlx5i_tx_wqe *wqe; |
| @@ -660,7 +661,7 @@ netdev_tx_t mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb, | |||
| 660 | } | 661 | } |
| 661 | 662 | ||
| 662 | stats->bytes += num_bytes; | 663 | stats->bytes += num_bytes; |
| 663 | stats->xmit_more += netdev_xmit_more(); | 664 | stats->xmit_more += xmit_more; |
| 664 | 665 | ||
| 665 | headlen = skb->len - ihs - skb->data_len; | 666 | headlen = skb->len - ihs - skb->data_len; |
| 666 | ds_cnt += !!headlen; | 667 | ds_cnt += !!headlen; |
| @@ -705,7 +706,7 @@ netdev_tx_t mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb, | |||
| 705 | goto err_drop; | 706 | goto err_drop; |
| 706 | 707 | ||
| 707 | mlx5e_txwqe_complete(sq, skb, opcode, ds_cnt, num_wqebbs, num_bytes, | 708 | mlx5e_txwqe_complete(sq, skb, opcode, ds_cnt, num_wqebbs, num_bytes, |
| 708 | num_dma, wi, cseg, false); | 709 | num_dma, wi, cseg, xmit_more); |
| 709 | 710 | ||
| 710 | return NETDEV_TX_OK; | 711 | return NETDEV_TX_OK; |
| 711 | 712 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c index ada1b7c0e0b8..9ca492b430d8 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | |||
| @@ -619,7 +619,7 @@ static int mlx5i_xmit(struct net_device *dev, struct sk_buff *skb, | |||
| 619 | struct mlx5_ib_ah *mah = to_mah(address); | 619 | struct mlx5_ib_ah *mah = to_mah(address); |
| 620 | struct mlx5i_priv *ipriv = epriv->ppriv; | 620 | struct mlx5i_priv *ipriv = epriv->ppriv; |
| 621 | 621 | ||
| 622 | return mlx5i_sq_xmit(sq, skb, &mah->av, dqpn, ipriv->qkey); | 622 | return mlx5i_sq_xmit(sq, skb, &mah->av, dqpn, ipriv->qkey, netdev_xmit_more()); |
| 623 | } | 623 | } |
| 624 | 624 | ||
| 625 | static void mlx5i_set_pkey_index(struct net_device *netdev, int id) | 625 | static void mlx5i_set_pkey_index(struct net_device *netdev, int id) |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h index 9165ca567047..e19ba3fcd1b7 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h | |||
| @@ -119,7 +119,8 @@ static inline void mlx5i_sq_fetch_wqe(struct mlx5e_txqsq *sq, | |||
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | netdev_tx_t mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb, | 121 | netdev_tx_t mlx5i_sq_xmit(struct mlx5e_txqsq *sq, struct sk_buff *skb, |
| 122 | struct mlx5_av *av, u32 dqpn, u32 dqkey); | 122 | struct mlx5_av *av, u32 dqpn, u32 dqkey, |
| 123 | bool xmit_more); | ||
| 123 | void mlx5i_handle_rx_cqe(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe); | 124 | void mlx5i_handle_rx_cqe(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe); |
| 124 | void mlx5i_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats); | 125 | void mlx5i_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats); |
| 125 | 126 | ||
