[1/9] net/mlx5: fix translate vport function name

Message ID 1555276357-4892-2-git-send-email-orika@mellanox.com
State Superseded
Delegated to: Shahaf Shuler
Headers show
Series
  • net/mlx5: add Direct Verbs E-Switch support
Related show

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS
ci/checkpatch success coding style OK

Commit Message

Ori Kam April 14, 2019, 9:12 p.m.
Modify the translate vport function to match other translate items
naming convestions.

Fixes: 0fe3f18f78d8 ("net/mlx5: add source vport match to the ingress rules")
Cc: viacheslavo@mellanox.com

Signed-off-by: Ori Kam <orika@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Yongseok Koh April 16, 2019, 11:47 p.m. | #1
On Sun, Apr 14, 2019 at 09:12:29PM +0000, Ori Kam wrote:
> Modify the translate vport function to match other translate items
> naming convestions.
> 
> Fixes: 0fe3f18f78d8 ("net/mlx5: add source vport match to the ingress rules")
> Cc: viacheslavo@mellanox.com
> 
> Signed-off-by: Ori Kam <orika@mellanox.com>
> ---

Small suggestion. How about flow_dv_translate_item_src_vport()? Looks quite long
name..

Either you take it or not,
Acked-by: Yongseok Koh <yskoh@mellanox.com>

>  drivers/net/mlx5/mlx5_flow_dv.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
> index 3862b26..7b582f0 100644
> --- a/drivers/net/mlx5/mlx5_flow_dv.c
> +++ b/drivers/net/mlx5/mlx5_flow_dv.c
> @@ -3087,8 +3087,8 @@ struct field_modify_info modify_tcp[] = {
>   *   Mask
>   */
>  static void
> -flow_dv_translate_source_vport(void *matcher, void *key,
> -			      int16_t port, uint16_t mask)
> +flow_dv_translate_item_source_vport(void *matcher, void *key,
> +				    int16_t port, uint16_t mask)
>  {
>  	void *misc_m = MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters);
>  	void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
> @@ -3492,10 +3492,10 @@ struct field_modify_info modify_tcp[] = {
>  		 * Add matching on source vport index only
>  		 * for ingress rules in E-Switch configurations.
>  		 */
> -		flow_dv_translate_source_vport(matcher.mask.buf,
> -					       dev_flow->dv.value.buf,
> -					       priv->vport_id,
> -					       0xffff);
> +		flow_dv_translate_item_source_vport(matcher.mask.buf,
> +						    dev_flow->dv.value.buf,
> +						    priv->vport_id,
> +						    0xffff);
>  	}
>  	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
>  		int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);
> -- 
> 1.8.3.1
>

Patch

diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 3862b26..7b582f0 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -3087,8 +3087,8 @@  struct field_modify_info modify_tcp[] = {
  *   Mask
  */
 static void
-flow_dv_translate_source_vport(void *matcher, void *key,
-			      int16_t port, uint16_t mask)
+flow_dv_translate_item_source_vport(void *matcher, void *key,
+				    int16_t port, uint16_t mask)
 {
 	void *misc_m = MLX5_ADDR_OF(fte_match_param, matcher, misc_parameters);
 	void *misc_v = MLX5_ADDR_OF(fte_match_param, key, misc_parameters);
@@ -3492,10 +3492,10 @@  struct field_modify_info modify_tcp[] = {
 		 * Add matching on source vport index only
 		 * for ingress rules in E-Switch configurations.
 		 */
-		flow_dv_translate_source_vport(matcher.mask.buf,
-					       dev_flow->dv.value.buf,
-					       priv->vport_id,
-					       0xffff);
+		flow_dv_translate_item_source_vport(matcher.mask.buf,
+						    dev_flow->dv.value.buf,
+						    priv->vport_id,
+						    0xffff);
 	}
 	for (; items->type != RTE_FLOW_ITEM_TYPE_END; items++) {
 		int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL);