diff options
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h | 4 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 4 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 13 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 3 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 6 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 91 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 1 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.c | 4 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fpga/cmd.h | 2 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fpga/core.c | 3 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_cmd.c | 8 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/fs_core.h | 11 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.c | 3 | ||||
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 2 | ||||
| -rw-r--r-- | include/linux/mlx5/device.h | 5 | ||||
| -rw-r--r-- | include/linux/mlx5/driver.h | 1 | ||||
| -rw-r--r-- | include/linux/mlx5/mlx5_ifc.h | 3 |
17 files changed, 133 insertions, 31 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h b/drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h index 1e3a6c3e4132..80eef4163f52 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/diag/fs_tracepoint.h | |||
| @@ -139,7 +139,7 @@ TRACE_EVENT(mlx5_fs_del_fg, | |||
| 139 | {MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO, "NEXT_PRIO"} | 139 | {MLX5_FLOW_CONTEXT_ACTION_FWD_NEXT_PRIO, "NEXT_PRIO"} |
| 140 | 140 | ||
| 141 | TRACE_EVENT(mlx5_fs_set_fte, | 141 | TRACE_EVENT(mlx5_fs_set_fte, |
| 142 | TP_PROTO(const struct fs_fte *fte, bool new_fte), | 142 | TP_PROTO(const struct fs_fte *fte, int new_fte), |
| 143 | TP_ARGS(fte, new_fte), | 143 | TP_ARGS(fte, new_fte), |
| 144 | TP_STRUCT__entry( | 144 | TP_STRUCT__entry( |
| 145 | __field(const struct fs_fte *, fte) | 145 | __field(const struct fs_fte *, fte) |
| @@ -149,7 +149,7 @@ TRACE_EVENT(mlx5_fs_set_fte, | |||
| 149 | __field(u32, action) | 149 | __field(u32, action) |
| 150 | __field(u32, flow_tag) | 150 | __field(u32, flow_tag) |
| 151 | __field(u8, mask_enable) | 151 | __field(u8, mask_enable) |
| 152 | __field(bool, new_fte) | 152 | __field(int, new_fte) |
| 153 | __array(u32, mask_outer, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4)) | 153 | __array(u32, mask_outer, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4)) |
| 154 | __array(u32, mask_inner, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4)) | 154 | __array(u32, mask_inner, MLX5_ST_SZ_DW(fte_match_set_lyr_2_4)) |
| 155 | __array(u32, mask_misc, MLX5_ST_SZ_DW(fte_match_set_misc)) | 155 | __array(u32, mask_misc, MLX5_ST_SZ_DW(fte_match_set_misc)) |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c index f11fd07ac4dd..850cdc980ab5 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | |||
| @@ -291,7 +291,7 @@ void mlx5e_enable_vlan_filter(struct mlx5e_priv *priv) | |||
| 291 | priv->fs.vlan.filter_disabled = false; | 291 | priv->fs.vlan.filter_disabled = false; |
| 292 | if (priv->netdev->flags & IFF_PROMISC) | 292 | if (priv->netdev->flags & IFF_PROMISC) |
| 293 | return; | 293 | return; |
| 294 | mlx5e_del_any_vid_rules(priv); | 294 | mlx5e_del_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_CTAG_VID, 0); |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv) | 297 | void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv) |
| @@ -302,7 +302,7 @@ void mlx5e_disable_vlan_filter(struct mlx5e_priv *priv) | |||
| 302 | priv->fs.vlan.filter_disabled = true; | 302 | priv->fs.vlan.filter_disabled = true; |
| 303 | if (priv->netdev->flags & IFF_PROMISC) | 303 | if (priv->netdev->flags & IFF_PROMISC) |
| 304 | return; | 304 | return; |
| 305 | mlx5e_add_any_vid_rules(priv); | 305 | mlx5e_add_vlan_rule(priv, MLX5E_VLAN_RULE_TYPE_ANY_CTAG_VID, 0); |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | int mlx5e_vlan_rx_add_vid(struct net_device *dev, __always_unused __be16 proto, | 308 | int mlx5e_vlan_rx_add_vid(struct net_device *dev, __always_unused __be16 proto, |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index dfc29720ab77..cc11bbbd0309 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c | |||
| @@ -184,7 +184,6 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv) | |||
| 184 | struct mlx5e_sw_stats temp, *s = &temp; | 184 | struct mlx5e_sw_stats temp, *s = &temp; |
| 185 | struct mlx5e_rq_stats *rq_stats; | 185 | struct mlx5e_rq_stats *rq_stats; |
| 186 | struct mlx5e_sq_stats *sq_stats; | 186 | struct mlx5e_sq_stats *sq_stats; |
| 187 | u64 tx_offload_none = 0; | ||
| 188 | int i, j; | 187 | int i, j; |
| 189 | 188 | ||
| 190 | memset(s, 0, sizeof(*s)); | 189 | memset(s, 0, sizeof(*s)); |
| @@ -199,6 +198,7 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv) | |||
| 199 | s->rx_lro_bytes += rq_stats->lro_bytes; | 198 | s->rx_lro_bytes += rq_stats->lro_bytes; |
| 200 | s->rx_csum_none += rq_stats->csum_none; | 199 | s->rx_csum_none += rq_stats->csum_none; |
| 201 | s->rx_csum_complete += rq_stats->csum_complete; | 200 | s->rx_csum_complete += rq_stats->csum_complete; |
| 201 | s->rx_csum_unnecessary += rq_stats->csum_unnecessary; | ||
| 202 | s->rx_csum_unnecessary_inner += rq_stats->csum_unnecessary_inner; | 202 | s->rx_csum_unnecessary_inner += rq_stats->csum_unnecessary_inner; |
| 203 | s->rx_xdp_drop += rq_stats->xdp_drop; | 203 | s->rx_xdp_drop += rq_stats->xdp_drop; |
| 204 | s->rx_xdp_tx += rq_stats->xdp_tx; | 204 | s->rx_xdp_tx += rq_stats->xdp_tx; |
| @@ -229,14 +229,11 @@ static void mlx5e_update_sw_counters(struct mlx5e_priv *priv) | |||
| 229 | s->tx_queue_dropped += sq_stats->dropped; | 229 | s->tx_queue_dropped += sq_stats->dropped; |
| 230 | s->tx_xmit_more += sq_stats->xmit_more; | 230 | s->tx_xmit_more += sq_stats->xmit_more; |
| 231 | s->tx_csum_partial_inner += sq_stats->csum_partial_inner; | 231 | s->tx_csum_partial_inner += sq_stats->csum_partial_inner; |
| 232 | tx_offload_none += sq_stats->csum_none; | 232 | s->tx_csum_none += sq_stats->csum_none; |
| 233 | s->tx_csum_partial += sq_stats->csum_partial; | ||
| 233 | } | 234 | } |
| 234 | } | 235 | } |
| 235 | 236 | ||
| 236 | /* Update calculated offload counters */ | ||
| 237 | s->tx_csum_partial = s->tx_packets - tx_offload_none - s->tx_csum_partial_inner; | ||
| 238 | s->rx_csum_unnecessary = s->rx_packets - s->rx_csum_none - s->rx_csum_complete; | ||
| 239 | |||
| 240 | s->link_down_events_phy = MLX5_GET(ppcnt_reg, | 237 | s->link_down_events_phy = MLX5_GET(ppcnt_reg, |
| 241 | priv->stats.pport.phy_counters, | 238 | priv->stats.pport.phy_counters, |
| 242 | counter_set.phys_layer_cntrs.link_down_events); | 239 | counter_set.phys_layer_cntrs.link_down_events); |
| @@ -3333,8 +3330,8 @@ static int mlx5e_handle_feature(struct net_device *netdev, | |||
| 3333 | 3330 | ||
| 3334 | err = feature_handler(netdev, enable); | 3331 | err = feature_handler(netdev, enable); |
| 3335 | if (err) { | 3332 | if (err) { |
| 3336 | netdev_err(netdev, "%s feature 0x%llx failed err %d\n", | 3333 | netdev_err(netdev, "%s feature %pNF failed, err %d\n", |
| 3337 | enable ? "Enable" : "Disable", feature, err); | 3334 | enable ? "Enable" : "Disable", &feature, err); |
| 3338 | return err; | 3335 | return err; |
| 3339 | } | 3336 | } |
| 3340 | 3337 | ||
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index f1dd638384d3..15a1687483cc 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | |||
| @@ -627,6 +627,7 @@ static inline void mlx5e_handle_csum(struct net_device *netdev, | |||
| 627 | 627 | ||
| 628 | if (lro) { | 628 | if (lro) { |
| 629 | skb->ip_summed = CHECKSUM_UNNECESSARY; | 629 | skb->ip_summed = CHECKSUM_UNNECESSARY; |
| 630 | rq->stats.csum_unnecessary++; | ||
| 630 | return; | 631 | return; |
| 631 | } | 632 | } |
| 632 | 633 | ||
| @@ -644,7 +645,9 @@ static inline void mlx5e_handle_csum(struct net_device *netdev, | |||
| 644 | skb->csum_level = 1; | 645 | skb->csum_level = 1; |
| 645 | skb->encapsulation = 1; | 646 | skb->encapsulation = 1; |
| 646 | rq->stats.csum_unnecessary_inner++; | 647 | rq->stats.csum_unnecessary_inner++; |
| 648 | return; | ||
| 647 | } | 649 | } |
| 650 | rq->stats.csum_unnecessary++; | ||
| 648 | return; | 651 | return; |
| 649 | } | 652 | } |
| 650 | csum_none: | 653 | csum_none: |
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h index 6d199ffb1c0b..f8637213afc0 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | |||
| @@ -68,6 +68,7 @@ struct mlx5e_sw_stats { | |||
| 68 | u64 rx_xdp_drop; | 68 | u64 rx_xdp_drop; |
| 69 | u64 rx_xdp_tx; | 69 | u64 rx_xdp_tx; |
| 70 | u64 rx_xdp_tx_full; | 70 | u64 rx_xdp_tx_full; |
| 71 | u64 tx_csum_none; | ||
| 71 | u64 tx_csum_partial; | 72 | u64 tx_csum_partial; |
| 72 | u64 tx_csum_partial_inner; | 73 | u64 tx_csum_partial_inner; |
| 73 | u64 tx_queue_stopped; | 74 | u64 tx_queue_stopped; |
| @@ -108,6 +109,7 @@ static const struct counter_desc sw_stats_desc[] = { | |||
| 108 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_drop) }, | 109 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_drop) }, |
| 109 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx) }, | 110 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx) }, |
| 110 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx_full) }, | 111 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, rx_xdp_tx_full) }, |
| 112 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_none) }, | ||
| 111 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial) }, | 113 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial) }, |
| 112 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial_inner) }, | 114 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_csum_partial_inner) }, |
| 113 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_queue_stopped) }, | 115 | { MLX5E_DECLARE_STAT(struct mlx5e_sw_stats, tx_queue_stopped) }, |
| @@ -339,6 +341,7 @@ struct mlx5e_rq_stats { | |||
| 339 | u64 packets; | 341 | u64 packets; |
| 340 | u64 bytes; | 342 | u64 bytes; |
| 341 | u64 csum_complete; | ||
