net/nfp: remove unneeded data endian convert operation

Message ID 20230612031625.1832874-1-chaoyong.he@corigine.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/nfp: remove unneeded data endian convert operation |

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/Intel-compilation success Compilation OK
ci/github-robot: build success github build: passed
ci/intel-Functional success Functional PASS
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch-unit-testing success Testing PASS
ci/iol-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Chaoyong He June 12, 2023, 3:16 a.m. UTC
  Both of the data types are CPU endian, so there is no need
to do the data endian convert operation.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
 drivers/net/nfp/nfp_flow.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Ferruh Yigit June 12, 2023, 10:21 a.m. UTC | #1
On 6/12/2023 4:16 AM, Chaoyong He wrote:
> Both of the data types are CPU endian, so there is no need
> to do the data endian convert operation.
> 
> Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
> Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
>

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c
index 14749f03a2..30b96b15ef 100644
--- a/drivers/net/nfp/nfp_flow.c
+++ b/drivers/net/nfp/nfp_flow.c
@@ -727,7 +727,7 @@  nfp_flow_key_layers_calculate_items(const struct rte_flow_item items[],
 				return -ERANGE;
 			ethdev = &rte_eth_devices[port_id->id];
 			representor = ethdev->data->dev_private;
-			key_ls->port = rte_cpu_to_be_32(representor->port_id);
+			key_ls->port = representor->port_id;
 			break;
 		case RTE_FLOW_ITEM_TYPE_VLAN:
 			PMD_DRV_LOG(DEBUG, "RTE_FLOW_ITEM_TYPE_VLAN detected");