{
struct mlx5e_rep_priv *rpriv = mlx5e_rep_to_rep_priv(rep);
struct mlx5e_priv *priv = netdev_priv(rpriv->netdev);
-
+ struct mlx5_rep_uplink_priv *uplink_priv = &rpriv->uplink_priv;
int err;
if (test_bit(MLX5E_STATE_OPENED, &priv->state)) {
goto err_remove_sqs;
/* init shared tc flow table */
- err = mlx5e_tc_esw_init(&rpriv->tc_ht);
+ err = mlx5e_tc_esw_init(&uplink_priv->tc_ht);
if (err)
goto err_neigh_cleanup;
mlx5e_remove_sqs_fwd_rules(priv);
/* clean uplink offloaded TC rules, delete shared tc flow table */
- mlx5e_tc_esw_cleanup(&rpriv->tc_ht);
+ mlx5e_tc_esw_cleanup(&rpriv->uplink_priv.tc_ht);
mlx5e_rep_neigh_cleanup(rpriv);
}
unsigned long min_interval; /* jiffies */
};
+struct mlx5_rep_uplink_priv {
+ /* Filters DB - instantiated by the uplink representor and shared by
+ * the uplink's VFs
+ */
+ struct rhashtable tc_ht;
+};
+
struct mlx5e_rep_priv {
struct mlx5_eswitch_rep *rep;
struct mlx5e_neigh_update_table neigh_update;
struct net_device *netdev;
struct mlx5_flow_handle *vport_rx_rule;
struct list_head vport_sqs_list;
- struct rhashtable tc_ht; /* valid for uplink rep */
+ struct mlx5_rep_uplink_priv uplink_priv; /* valid for uplink rep */
};
static inline
if (MLX5_VPORT_MANAGER(priv->mdev) && esw->mode == SRIOV_OFFLOADS) {
uplink_rpriv = mlx5_eswitch_get_uplink_priv(esw, REP_ETH);
- return &uplink_rpriv->tc_ht;
+ return &uplink_rpriv->uplink_priv.tc_ht;
} else
return &priv->fs.tc.ht;
}