Skip to content

Commit d28a06d

Browse files
dickmanmaorSaeed Mahameed
authored andcommitted
net/mlx5: Geneve, Fix handling of Geneve object id as error code
On success, mlx5_geneve_tlv_option_create returns non negative Geneve object id. In case the object id is positive value the caller functions will handle it as an error (non zero) and will fail to offload the Geneve rule. Fix this by changing caller function ,mlx5_geneve_tlv_option_add, to return 0 in case valid non negative object id was provided. Fixes: 0ccc171 ("net/mlx5: Geneve, Manage Geneve TLV options") Signed-off-by: Maor Dickman <[email protected]> Reviewed-by: Raed Salem <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 1bf8b0d commit d28a06d

File tree

1 file changed

+1
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/lib

1 file changed

+1
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/lib/geneve.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ int mlx5_geneve_tlv_option_add(struct mlx5_geneve *geneve, struct geneve_opt *op
105105
geneve->opt_type = opt->type;
106106
geneve->obj_id = res;
107107
geneve->refcount++;
108+
res = 0;
108109
}
109110

110111
unlock:

0 commit comments

Comments
 (0)