net/mlx5e: Remove unreachable code in mlx5e_xmit()
After some commits, mlx5e_txwqe_build_eseg() lost its ability to return boolean value and became effectively void. Change its return type to void and remove unreachable branches. Signed-off-by: Vladyslav Tarasiuk <vladyslavt@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
39e8cc6d75
commit
f68406ca3b
|
@ -162,7 +162,7 @@ static inline unsigned int mlx5e_accel_tx_ids_len(struct mlx5e_txqsq *sq,
|
|||
/* Part of the eseg touched by TX offloads */
|
||||
#define MLX5E_ACCEL_ESEG_LEN offsetof(struct mlx5_wqe_eth_seg, mss)
|
||||
|
||||
static inline bool mlx5e_accel_tx_eseg(struct mlx5e_priv *priv,
|
||||
static inline void mlx5e_accel_tx_eseg(struct mlx5e_priv *priv,
|
||||
struct sk_buff *skb,
|
||||
struct mlx5_wqe_eth_seg *eseg, u16 ihs)
|
||||
{
|
||||
|
@ -175,8 +175,6 @@ static inline bool mlx5e_accel_tx_eseg(struct mlx5e_priv *priv,
|
|||
if (skb->encapsulation && skb->ip_summed == CHECKSUM_PARTIAL)
|
||||
mlx5e_tx_tunnel_accel(skb, eseg, ihs);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline void mlx5e_accel_tx_finish(struct mlx5e_txqsq *sq,
|
||||
|
|
|
@ -706,16 +706,12 @@ void mlx5e_tx_mpwqe_ensure_complete(struct mlx5e_txqsq *sq)
|
|||
mlx5e_tx_mpwqe_session_complete(sq);
|
||||
}
|
||||
|
||||
static bool mlx5e_txwqe_build_eseg(struct mlx5e_priv *priv, struct mlx5e_txqsq *sq,
|
||||
static void mlx5e_txwqe_build_eseg(struct mlx5e_priv *priv, struct mlx5e_txqsq *sq,
|
||||
struct sk_buff *skb, struct mlx5e_accel_tx_state *accel,
|
||||
struct mlx5_wqe_eth_seg *eseg, u16 ihs)
|
||||
{
|
||||
if (unlikely(!mlx5e_accel_tx_eseg(priv, skb, eseg, ihs)))
|
||||
return false;
|
||||
|
||||
mlx5e_accel_tx_eseg(priv, skb, eseg, ihs);
|
||||
mlx5e_txwqe_build_eseg_csum(sq, skb, accel, eseg);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
netdev_tx_t mlx5e_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
|
@ -744,10 +740,7 @@ netdev_tx_t mlx5e_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
if (mlx5e_tx_skb_supports_mpwqe(skb, &attr)) {
|
||||
struct mlx5_wqe_eth_seg eseg = {};
|
||||
|
||||
if (unlikely(!mlx5e_txwqe_build_eseg(priv, sq, skb, &accel, &eseg,
|
||||
attr.ihs)))
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
mlx5e_txwqe_build_eseg(priv, sq, skb, &accel, &eseg, attr.ihs);
|
||||
mlx5e_sq_xmit_mpwqe(sq, skb, &eseg, netdev_xmit_more());
|
||||
return NETDEV_TX_OK;
|
||||
}
|
||||
|
@ -762,9 +755,7 @@ netdev_tx_t mlx5e_xmit(struct sk_buff *skb, struct net_device *dev)
|
|||
/* May update the WQE, but may not post other WQEs. */
|
||||
mlx5e_accel_tx_finish(sq, wqe, &accel,
|
||||
(struct mlx5_wqe_inline_seg *)(wqe->data + wqe_attr.ds_cnt_inl));
|
||||
if (unlikely(!mlx5e_txwqe_build_eseg(priv, sq, skb, &accel, &wqe->eth, attr.ihs)))
|
||||
return NETDEV_TX_OK;
|
||||
|
||||
mlx5e_txwqe_build_eseg(priv, sq, skb, &accel, &wqe->eth, attr.ihs);
|
||||
mlx5e_sq_xmit_wqe(sq, skb, &attr, &wqe_attr, wqe, pi, netdev_xmit_more());
|
||||
|
||||
return NETDEV_TX_OK;
|
||||
|
|
Loading…
Reference in New Issue