mlx5: fs_tcp is only used for INET or INET6.

This commit is contained in:
John Baldwin 2022-04-13 16:08:21 -07:00
parent 29a843177e
commit 75095cd38f

View File

@ -93,7 +93,9 @@ mlx5e_accel_fs_add_inpcb(struct mlx5e_priv *priv,
{
struct mlx5_flow_destination dest = {};
struct mlx5e_flow_table *ft = NULL;
struct mlx5e_accel_fs_tcp *fs_tcp;
#if defined(INET) || defined(INET6)
struct mlx5e_accel_fs_tcp *fs_tcp = &priv->fts.accel_tcp;
#endif
struct mlx5_flow_rule *flow;
struct mlx5_flow_spec *spec;
@ -101,8 +103,6 @@ mlx5e_accel_fs_add_inpcb(struct mlx5e_priv *priv,
if (!spec)
return (ERR_PTR(-ENOMEM));
fs_tcp = &priv->fts.accel_tcp;
spec->match_criteria_enable = MLX5_MATCH_OUTER_HEADERS;
INP_RLOCK(inp);