Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e7e0728 authored by David S. Miller's avatar David S. Miller
Browse files

Merge tag 'mlx5-fixes-2017-09-28' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux



Saeed Mahameed says:

====================
mlx5-fixes-2017-09-28

Misc. fixes for mlx5 drivers.
====================

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 9d538fa6 353f59f4
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -139,7 +139,7 @@ TRACE_EVENT(mlx5_fs_del_fg,
	{MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO, "NEXT_PRIO"}
	{MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO, "NEXT_PRIO"}


TRACE_EVENT(mlx5_fs_set_fte,
TRACE_EVENT(mlx5_fs_set_fte,
	    TP_PROTO(const struct fs_fte *fte, bool new_fte),
	    TP_PROTO(const struct fs_fte *fte, int new_fte),
	    TP_ARGS(fte, new_fte),
	    TP_ARGS(fte, new_fte),
	    TP_STRUCT__entry(
	    TP_STRUCT__entry(
		__field(const struct fs_fte *, fte)
		__field(const struct fs_fte *, fte)
@@ -149,7 +149,7 @@ TRACE_EVENT(mlx5_fs_set_fte,
		__field(u32, action)
		__field(u32, action)
		__field(u32, flow_tag)
		__field(u32, flow_tag)
		__field(u8,  mask_enable)
		__field(u8,  mask_enable)
		__field(bool, new_fte)
		__field(int, new_fte)
		__array(u32, mask_outer, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4))
		__array(u32, mask_outer, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4))
		__array(u32, mask_inner, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4))
		__array(u32, mask_inner, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4))
		__array(u32, mask_misc, MLX5_ST_SZ_DW(fte_match_set_misc))
		__array(u32, mask_misc, MLX5_ST_SZ_DW(fte_match_set_misc))
+2 −2
Original line number Original line Diff line number Diff line
@@ -291,7 +291,7 @@ void mlx5e_enable_vlan_filter(struct mlx5e_priv *priv)
	priv->fs.vlan.filter_disabled = false;
	priv->fs.vlan.filter_disabled = false;
	if (priv->netdev->flags & IFF_PROMISC)
	if (priv->netdev->flags & IFF_PROMISC)
		return;
		return;
	mlx5e_del_any_vid_rules(priv);
	mlx5e_del_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_CTAG_VID, 0);
}
}


void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv)
void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv)
@@ -302,7 +302,7 @@ void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv)
	priv->fs.vlan.filter_disabled = true;
	priv->fs.vlan.filter_disabled = true;
	if (priv->netdev->flags & IFF_PROMISC)
	if (priv->netdev->flags & IFF_PROMISC)
		return;
		return;
	mlx5e_add_any_vid_rules(priv);
	mlx5e_add_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_CTAG_VID, 0);
}
}


int mlx5e_vlan_rx_add_vid(struct net_device *dev, __always_unused __be16 proto,
int mlx5e_vlan_rx_add_vid(struct net_device *dev, __always_unused __be16 proto,
+5 −8
Original line number Original line Diff line number Diff line
@@ -184,7 +184,6 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv)
	struct mlx5e_sw_stats temp, *s = &temp;
	struct mlx5e_sw_stats temp, *s = &temp;
	struct mlx5e_rq_stats *rq_stats;
	struct mlx5e_rq_stats *rq_stats;
	struct mlx5e_sq_stats *sq_stats;
	struct mlx5e_sq_stats *sq_stats;
	u64 tx_offload_none = 0;
	int i, j;
	int i, j;


	memset(s, 0, sizeof(*s));
	memset(s, 0, sizeof(*s));
@@ -199,6 +198,7 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv)
		s->rx_lro_bytes	+= rq_stats->lro_bytes;
		s->rx_lro_bytes	+= rq_stats->lro_bytes;
		s->rx_csum_none	+= rq_stats->csum_none;
		s->rx_csum_none	+= rq_stats->csum_none;
		s->rx_csum_complete += rq_stats->csum_complete;
		s->rx_csum_complete += rq_stats->csum_complete;
		s->rx_csum_unnecessary += rq_stats->csum_unnecessary;
		s->rx_csum_unnecessary_inner += rq_stats->csum_unnecessary_inner;
		s->rx_csum_unnecessary_inner += rq_stats->csum_unnecessary_inner;
		s->rx_xdp_drop += rq_stats->xdp_drop;
		s->rx_xdp_drop += rq_stats->xdp_drop;
		s->rx_xdp_tx += rq_stats->xdp_tx;
		s->rx_xdp_tx += rq_stats->xdp_tx;
@@ -229,14 +229,11 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv)
			s->tx_queue_dropped	+= sq_stats->dropped;
			s->tx_queue_dropped	+= sq_stats->dropped;
			s->tx_xmit_more		+= sq_stats->xmit_more;
			s->tx_xmit_more		+= sq_stats->xmit_more;
			s->tx_csum_partial_inner += sq_stats->csum_partial_inner;
			s->tx_csum_partial_inner += sq_stats->csum_partial_inner;
			tx_offload_none		+= sq_stats->csum_none;
			s->tx_csum_none		+= sq_stats->csum_none;
			s->tx_csum_partial	+= sq_stats->csum_partial;
		}
		}
	}
	}


	/* Update calculated offload counters */
	s->tx_csum_partial = s->tx_packets - tx_offload_none - s->tx_csum_partial_inner;
	s->rx_csum_unnecessary = s->rx_packets - s->rx_csum_none - s->rx_csum_complete;

	s->link_down_events_phy = MLX5_GET(ppcnt_reg,
	s->link_down_events_phy = MLX5_GET(ppcnt_reg,
				priv->stats.pport.phy_counters,
				priv->stats.pport.phy_counters,
				counter_set.phys_layer_cntrs.link_down_events);
				counter_set.phys_layer_cntrs.link_down_events);
@@ -3333,8 +3330,8 @@ static int mlx5e_handle_feature(struct net_device *netdev,


	err = feature_handler(netdev, enable);
	err = feature_handler(netdev, enable);
	if (err) {
	if (err) {
		netdev_err(netdev, "%s feature 0x%llx failed err %d\n",
		netdev_err(netdev, "%s feature %pNF failed, err %d\n",
			   enable ? "Enable" : "Disable", feature, err);
			   enable ? "Enable" : "Disable", &feature, err);
		return err;
		return err;
	}
	}


+3 −0
Original line number Original line Diff line number Diff line
@@ -627,6 +627,7 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,


	if (lro) {
	if (lro) {
		skb->ip_summed = CHECKSUM_UNNECESSARY;
		skb->ip_summed = CHECKSUM_UNNECESSARY;
		rq->stats.csum_unnecessary++;
		return;
		return;
	}
	}


@@ -644,7 +645,9 @@ static inline void mlx5e_handle_csum(struct net_device *netdev,
			skb->csum_level = 1;
			skb->csum_level = 1;
			skb->encapsulation = 1;
			skb->encapsulation = 1;
			rq->stats.csum_unnecessary_inner++;
			rq->stats.csum_unnecessary_inner++;
			return;
		}
		}
		rq->stats.csum_unnecessary++;
		return;
		return;
	}
	}
csum_none:
csum_none:
+6 −0
Original line number Original line Diff line number Diff line
@@ -68,6 +68,7 @@ struct mlx5e_sw_stats {
	u64 rx_xdp_drop;
	u64 rx_xdp_drop;
	u64 rx_xdp_tx;
	u64 rx_xdp_tx;
	u64 rx_xdp_tx_full;
	u64 rx_xdp_tx_full;
	u64 tx_csum_none;
	u64 tx_csum_partial;
	u64 tx_csum_partial;
	u64 tx_csum_partial_inner;
	u64 tx_csum_partial_inner;
	u64 tx_queue_stopped;
	u64 tx_queue_stopped;
@@ -108,6 +109,7 @@ static const struct counter_desc sw_stats_desc[] = {
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_drop) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_drop) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx_full) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx_full) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_none) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial_inner) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial_inner) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_queue_stopped) },
	{ MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_queue_stopped) },
@@ -339,6 +341,7 @@ struct mlx5e_rq_stats {
	u64 packets;
	u64 packets;
	u64 bytes;
	u64 bytes;
	u64 csum_complete;
	u64 csum_complete;
	u64 csum_unnecessary;
	u64 csum_unnecessary_inner;
	u64 csum_unnecessary_inner;
	u64 csum_none;
	u64 csum_none;
	u64 lro_packets;
	u64 lro_packets;
@@ -363,6 +366,7 @@ static const struct counter_desc rq_stats_desc[] = {
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, packets) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, packets) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, bytes) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, bytes) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_complete) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_complete) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_unnecessary) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_unnecessary_inner) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_unnecessary_inner) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_none) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, csum_none) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, xdp_drop) },
	{ MLX5E_DECLARE_RX_STAT(struct mlx5e_rq_stats, xdp_drop) },
@@ -392,6 +396,7 @@ struct mlx5e_sq_stats {
	u64 tso_bytes;
	u64 tso_bytes;
	u64 tso_inner_packets;
	u64 tso_inner_packets;
	u64 tso_inner_bytes;
	u64 tso_inner_bytes;
	u64 csum_partial;
	u64 csum_partial_inner;
	u64 csum_partial_inner;
	u64 nop;
	u64 nop;
	/* less likely accessed in data path */
	/* less likely accessed in data path */
@@ -408,6 +413,7 @@ static const struct counter_desc sq_stats_desc[] = {
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, tso_bytes) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, tso_bytes) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, tso_inner_packets) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, tso_inner_packets) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, tso_inner_bytes) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, tso_inner_bytes) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, csum_partial) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, csum_partial_inner) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, csum_partial_inner) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, nop) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, nop) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, csum_none) },
	{ MLX5E_DECLARE_TX_STAT(struct mlx5e_sq_stats, csum_none) },
Loading