From f15da1c0ee13dd0e342944dccdd9014c16d4d5be Mon Sep 17 00:00:00 2001 From: Petri Savolainen Date: Thu, 24 Oct 2019 15:22:38 +0300 Subject: linux-gen: cls: change ODP_PMR_UDP/TCP ports to big endian Change ODP_PMR_UDP_DPORT, ODP_PMR_TCP_DPORT, ODP_PMR_UDP_SPORT and ODP_PMR_TCP_SPORT terms to big endian. All four needs to be changed simultaneously in order not to break some validation tests. Signed-off-by: Petri Savolainen Reviewed-by: Matias Elo Reviewed-by: Stanislaw Kardach --- .../validation/api/classification/odp_classification_tests.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/validation/api/classification/odp_classification_tests.c') diff --git a/test/validation/api/classification/odp_classification_tests.c b/test/validation/api/classification/odp_classification_tests.c index 9df869ece..3a97023cf 100644 --- a/test/validation/api/classification/odp_classification_tests.c +++ b/test/validation/api/classification/odp_classification_tests.c @@ -223,8 +223,8 @@ void configure_cls_pmr_chain(void) cos_list[CLS_PMR_CHAIN_SRC]); CU_ASSERT_FATAL(pmr_list[CLS_PMR_CHAIN_SRC] != ODP_PMR_INVALID); - val = CLS_PMR_CHAIN_PORT; - maskport = 0xffff; + val = odp_cpu_to_be_16(CLS_PMR_CHAIN_PORT); + maskport = odp_cpu_to_be_16(0xffff); odp_cls_pmr_param_init(&pmr_param); pmr_param.term = find_first_supported_l3_pmr(); pmr_param.match.value = &val; @@ -573,8 +573,8 @@ void configure_pmr_cos(void) cos_list[CLS_PMR] = odp_cls_cos_create(cosname, &cls_param); CU_ASSERT_FATAL(cos_list[CLS_PMR] != ODP_COS_INVALID); - val = CLS_PMR_PORT; - mask = 0xffff; + val = odp_cpu_to_be_16(CLS_PMR_PORT); + mask = odp_cpu_to_be_16(0xffff); odp_cls_pmr_param_init(&pmr_param); pmr_param.term = find_first_supported_l3_pmr(); pmr_param.match.value = &val; @@ -655,8 +655,8 @@ void configure_pktio_pmr_composite(void) pmr_params[0].match.mask = &mask; pmr_params[0].val_sz = sizeof(addr); - val = CLS_PMR_SET_PORT; - maskport = 0xffff; + val = odp_cpu_to_be_16(CLS_PMR_SET_PORT); + maskport = odp_cpu_to_be_16(0xffff); odp_cls_pmr_param_init(&pmr_params[1]); pmr_params[1].term = find_first_supported_l3_pmr(); pmr_params[1].match.value = &val; -- cgit v1.2.3