lib/ethdev: modified the definition of 'NVGRE_ENCAP'

Message ID 20231124033059.22972-1-sunyang.wu@jaguarmicro.com (mailing list archive)
State Superseded, archived
Delegated to: David Marchand
Headers
Series lib/ethdev: modified the definition of 'NVGRE_ENCAP' |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Sunyang Wu Nov. 24, 2023, 3:30 a.m. UTC
  Fix the issue of incorrect definition of 'NVGRE_ENCAP', and
modified the error comments of 'rte_flow_action_nvgre_encap'.

Fixes: c2beb1d ("ethdev: add missing items/actions to flow object converter")
Fixes: 3850cf0 ("ethdev: add tunnel encap/decap actions")
Cc: stable@dpdk.org

Signed-off-by: Joey Xing <joey.xing@jaguarmicro.com>
Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
---
 lib/ethdev/rte_flow.c | 2 +-
 lib/ethdev/rte_flow.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Comments

David Marchand Nov. 24, 2023, 1:36 p.m. UTC | #1
On Fri, Nov 24, 2023 at 4:31 AM Sunyang Wu <sunyang.wu@jaguarmicro.com> wrote:
>
> Fix the issue of incorrect definition of 'NVGRE_ENCAP', and
> modified the error comments of 'rte_flow_action_nvgre_encap'.
>
> Fixes: c2beb1d ("ethdev: add missing items/actions to flow object converter")
> Fixes: 3850cf0 ("ethdev: add tunnel encap/decap actions")

Please use the format for Fixes tag described in the contributing guide.

Fixes: c2beb1d469d2 ("ethdev: add missing items/actions to flow object
converter")
Fixes: 3850cf0c8c37 ("ethdev: add tunnel encap/decap actions")

> Cc: stable@dpdk.org

Copying more maintainers.
Apart from readability, I think this patch does not fix any real bug, does it?

>
> Signed-off-by: Joey Xing <joey.xing@jaguarmicro.com>
> Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
  
Ferruh Yigit Nov. 27, 2023, 10:42 a.m. UTC | #2
On 11/24/2023 1:36 PM, David Marchand wrote:
> On Fri, Nov 24, 2023 at 4:31 AM Sunyang Wu <sunyang.wu@jaguarmicro.com> wrote:
>>
>> Fix the issue of incorrect definition of 'NVGRE_ENCAP', and
>> modified the error comments of 'rte_flow_action_nvgre_encap'.
>>
>> Fixes: c2beb1d ("ethdev: add missing items/actions to flow object converter")
>> Fixes: 3850cf0 ("ethdev: add tunnel encap/decap actions")
> 
> Please use the format for Fixes tag described in the contributing guide.
> 
> Fixes: c2beb1d469d2 ("ethdev: add missing items/actions to flow object
> converter")
> Fixes: 3850cf0c8c37 ("ethdev: add tunnel encap/decap actions")
> 
>> Cc: stable@dpdk.org
> 
> Copying more maintainers.
> Apart from readability, I think this patch does not fix any real bug, does it?
> 

It is a genuine fix, that used struct was wrong, but as size of both
structs are same, practically functionality should be same.

I think risk is low with this patch and we can get it even at this stage
of release, but also it is safe to postpone it to next release. I leave
decision to David.


Reviewed-by: Ferruh Yigit <ferruh.yigit@amd.com>

>>
>> Signed-off-by: Joey Xing <joey.xing@jaguarmicro.com>
>> Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
> 
>
  
Ori Kam Nov. 28, 2023, 11:57 a.m. UTC | #3
Hi Joey,

> -----Original Message-----
> From: Sunyang Wu <sunyang.wu@jaguarmicro.com>
> Sent: Friday, November 24, 2023 5:31 AM
> To: dev@dpdk.org
> Cc: Ori Kam <orika@nvidia.com>; stable@dpdk.org; Joey Xing
> <joey.xing@jaguarmicro.com>
> Subject: [PATCH] lib/ethdev: modified the definition of 'NVGRE_ENCAP'
> 
> Fix the issue of incorrect definition of 'NVGRE_ENCAP', and
> modified the error comments of 'rte_flow_action_nvgre_encap'.
> 
> Fixes: c2beb1d ("ethdev: add missing items/actions to flow object converter")
> Fixes: 3850cf0 ("ethdev: add tunnel encap/decap actions")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Joey Xing <joey.xing@jaguarmicro.com>
> Signed-off-by: Sunyang Wu <sunyang.wu@jaguarmicro.com>
> ---

Acked-by: Ori Kam <orika@nvidia.com>
Best,
Ori
  

Patch

diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index 549e329558..04348e0243 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -216,7 +216,7 @@  static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 		       sizeof(struct rte_flow_action_of_push_mpls)),
 	MK_FLOW_ACTION(VXLAN_ENCAP, sizeof(struct rte_flow_action_vxlan_encap)),
 	MK_FLOW_ACTION(VXLAN_DECAP, 0),
-	MK_FLOW_ACTION(NVGRE_ENCAP, sizeof(struct rte_flow_action_vxlan_encap)),
+	MK_FLOW_ACTION(NVGRE_ENCAP, sizeof(struct rte_flow_action_nvgre_encap)),
 	MK_FLOW_ACTION(NVGRE_DECAP, 0),
 	MK_FLOW_ACTION(RAW_ENCAP, sizeof(struct rte_flow_action_raw_encap)),
 	MK_FLOW_ACTION(RAW_DECAP, sizeof(struct rte_flow_action_raw_decap)),
diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flow.h
index affdc8121b..4cdc1f1d8f 100644
--- a/lib/ethdev/rte_flow.h
+++ b/lib/ethdev/rte_flow.h
@@ -3471,7 +3471,7 @@  struct rte_flow_action_vxlan_encap {
  */
 struct rte_flow_action_nvgre_encap {
 	/**
-	 * Encapsulating vxlan tunnel definition
+	 * Encapsulating nvgre tunnel definition
 	 * (terminated by the END pattern item).
 	 */
 	struct rte_flow_item *definition;