Re: [lng-odp] [PATCH 5/5] validation: cls: split pmr chain test
Agreed. Error CoS and L2 should be added as separate suites and I would preferable add them in odp_classification_test_pmr.c so that each are tested separately. Maybe rename the file also :) As I pointed out enhancements can be done once API freeze is accepted. Regards, Bala On 14 January 2016 at 13:26, Ivan Khoronzhuk wrote: > > > On 14.01.16 07:55, Bala Manoharan wrote: >> >> The idea behind this suite is to have a mechanism to test the >> behaviour of the system after applying all the different PMR, default >> CoS, error CoS and L2 and L3 CoS values. your suggested changes tests >> each and every configuration individually which defeats the idea of >> the suite. >> There is a dedicated suite to test individual PMR values behaviour. >> >> Regards, >> Bala > > Maybe, but it's hard to figure out what is broken, especially when some > parts are not supported or implemented. In case of splitting it's possible > to see what doesn't work, I can drop this patch but IMHO, one test includes > a lot of different units that has not been tested before, like error CoS, > default CoS (it was created but not tested), CoS with L2 pr...And now > all in one chunk...one broken and seems like all are broken. It can be > leaved like this but it should be tested separately. > > > >> >> >> On 12 January 2016 at 23:41, Ivan Khoronzhuk >> wrote: >>> >>> These tests are simple classification tests and better to see results >>> for each of them separately. >>> >>> Signed-off-by: Ivan Khoronzhuk >>> --- >>> test/validation/classification/classification.h| 22 --- >>> .../classification/odp_classification_tests.c | 72 >>> -- >>> 2 files changed, 38 insertions(+), 56 deletions(-) >>> >>> diff --git a/test/validation/classification/classification.h >>> b/test/validation/classification/classification.h >>> index f363812..6d2e55f 100644 >>> --- a/test/validation/classification/classification.h >>> +++ b/test/validation/classification/classification.h >>> @@ -13,7 +13,6 @@ >>> #define SHM_PKT_BUF_SIZE1024 >>> >>> /* Config values for Default CoS */ >>> -#define TEST_DEFAULT 1 >>> #defineCLS_DEFAULT 0 >>> #define CLS_DEFAULT_SADDR "10.0.0.1/32" >>> #define CLS_DEFAULT_DADDR "10.0.0.100/32" >>> @@ -21,29 +20,24 @@ >>> #define CLS_DEFAULT_DPORT 2048 >>> >>> /* Config values for Error CoS */ >>> -#define TEST_ERROR 1 >>> #define CLS_ERROR 1 >>> >>> /* Config values for PMR_CHAIN */ >>> -#define TEST_PMR_CHAIN 1 >>> #define CLS_PMR_CHAIN_SRC 2 >>> #define CLS_PMR_CHAIN_DST 3 >>> #define CLS_PMR_CHAIN_SADDR"10.0.0.5/32" >>> #define CLS_PMR_CHAIN_PORT 3000 >>> >>> /* Config values for PMR */ >>> -#define TEST_PMR 1 >>> #define CLS_PMR4 >>> #define CLS_PMR_PORT 4000 >>> >>> /* Config values for PMR SET */ >>> -#define TEST_PMR_SET 1 >>> #define CLS_PMR_SET5 >>> #define CLS_PMR_SET_SADDR "10.0.0.6/32" >>> #define CLS_PMR_SET_PORT 5000 >>> >>> /* Config values for CoS L2 Priority */ >>> -#define TEST_L2_QOS1 >>> #define CLS_L2_QOS_0 6 >>> #define CLS_L2_QOS_MAX 5 >>> >>> @@ -68,8 +62,20 @@ void classification_test_pktio_set_skip(void); >>> void classification_test_pktio_set_headroom(void); >>> void classification_test_pmr_terms_avail(void); >>> void classification_test_pmr_terms_cap(void); >>> -void classification_test_pktio_configure(void); >>> -void classification_test_pktio_test(void); >>> + >>> +void classification_test_configure_pktio_default_cos(void); >>> +void classification_test_configure_pktio_error_cos(void); >>> +void classification_test_configure_cls_pmr_chain(void); >>> +void classification_test_configure_cos_with_l2_priority(void); >>> +void classification_test_configure_pmr_cos(void); >>> +void classification_test_configure_pktio_pmr_match_set_cos(void); >>> + >>> +void classification_test_pktio_default_cos(void); >>> +void classification_test_pktio_error_cos(void); >>> +void classification_test_cls_pmr_chain(void); >>> +void classification_test_cos_with_l2_priority(void); >>> +void classification_test_pmr_cos(void); >>> +void classification_test_pktio_pmr_match_set_cos(void); >>> >>> void classification_test_pmr_term_tcp_dport(void); >>> void classification_test_pmr_term_tcp_sport(void); >>> diff --git a/test/validation/classification/odp_classification_tests.c >>> b/test/validation/classification/odp_classification_tests.c >>> index 34fc570..482e2d0 100644 >>> --- a/test/validation/classification/odp_classification_tests.c >>> +++ b/test/validation/classification/odp_classification_tests.c >>> @@ -133,7 +133,7 @@ cls_create_packet(bool vlan, odp_atomic_u32_t *seq, >>> bool flag_udp) >>> return pkt; >>> } >>> >>> -void configure_cls_pmr_chain(void) >>> +void classification_test_configure_cls_pmr_chain(void)
Re: [lng-odp] [PATCH 5/5] validation: cls: split pmr chain test
On 14.01.16 07:55, Bala Manoharan wrote: The idea behind this suite is to have a mechanism to test the behaviour of the system after applying all the different PMR, default CoS, error CoS and L2 and L3 CoS values. your suggested changes tests each and every configuration individually which defeats the idea of the suite. There is a dedicated suite to test individual PMR values behaviour. Regards, Bala Maybe, but it's hard to figure out what is broken, especially when some parts are not supported or implemented. In case of splitting it's possible to see what doesn't work, I can drop this patch but IMHO, one test includes a lot of different units that has not been tested before, like error CoS, default CoS (it was created but not tested), CoS with L2 pr...And now all in one chunk...one broken and seems like all are broken. It can be leaved like this but it should be tested separately. On 12 January 2016 at 23:41, Ivan Khoronzhuk wrote: These tests are simple classification tests and better to see results for each of them separately. Signed-off-by: Ivan Khoronzhuk --- test/validation/classification/classification.h| 22 --- .../classification/odp_classification_tests.c | 72 -- 2 files changed, 38 insertions(+), 56 deletions(-) diff --git a/test/validation/classification/classification.h b/test/validation/classification/classification.h index f363812..6d2e55f 100644 --- a/test/validation/classification/classification.h +++ b/test/validation/classification/classification.h @@ -13,7 +13,6 @@ #define SHM_PKT_BUF_SIZE1024 /* Config values for Default CoS */ -#define TEST_DEFAULT 1 #defineCLS_DEFAULT 0 #define CLS_DEFAULT_SADDR "10.0.0.1/32" #define CLS_DEFAULT_DADDR "10.0.0.100/32" @@ -21,29 +20,24 @@ #define CLS_DEFAULT_DPORT 2048 /* Config values for Error CoS */ -#define TEST_ERROR 1 #define CLS_ERROR 1 /* Config values for PMR_CHAIN */ -#define TEST_PMR_CHAIN 1 #define CLS_PMR_CHAIN_SRC 2 #define CLS_PMR_CHAIN_DST 3 #define CLS_PMR_CHAIN_SADDR"10.0.0.5/32" #define CLS_PMR_CHAIN_PORT 3000 /* Config values for PMR */ -#define TEST_PMR 1 #define CLS_PMR4 #define CLS_PMR_PORT 4000 /* Config values for PMR SET */ -#define TEST_PMR_SET 1 #define CLS_PMR_SET5 #define CLS_PMR_SET_SADDR "10.0.0.6/32" #define CLS_PMR_SET_PORT 5000 /* Config values for CoS L2 Priority */ -#define TEST_L2_QOS1 #define CLS_L2_QOS_0 6 #define CLS_L2_QOS_MAX 5 @@ -68,8 +62,20 @@ void classification_test_pktio_set_skip(void); void classification_test_pktio_set_headroom(void); void classification_test_pmr_terms_avail(void); void classification_test_pmr_terms_cap(void); -void classification_test_pktio_configure(void); -void classification_test_pktio_test(void); + +void classification_test_configure_pktio_default_cos(void); +void classification_test_configure_pktio_error_cos(void); +void classification_test_configure_cls_pmr_chain(void); +void classification_test_configure_cos_with_l2_priority(void); +void classification_test_configure_pmr_cos(void); +void classification_test_configure_pktio_pmr_match_set_cos(void); + +void classification_test_pktio_default_cos(void); +void classification_test_pktio_error_cos(void); +void classification_test_cls_pmr_chain(void); +void classification_test_cos_with_l2_priority(void); +void classification_test_pmr_cos(void); +void classification_test_pktio_pmr_match_set_cos(void); void classification_test_pmr_term_tcp_dport(void); void classification_test_pmr_term_tcp_sport(void); diff --git a/test/validation/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c index 34fc570..482e2d0 100644 --- a/test/validation/classification/odp_classification_tests.c +++ b/test/validation/classification/odp_classification_tests.c @@ -133,7 +133,7 @@ cls_create_packet(bool vlan, odp_atomic_u32_t *seq, bool flag_udp) return pkt; } -void configure_cls_pmr_chain(void) +void classification_test_configure_cls_pmr_chain(void) { /* PKTIO --> PMR_SRC(SRC IP ADDR) --> PMR_DST (TCP SPORT) */ @@ -230,7 +230,7 @@ void configure_cls_pmr_chain(void) CU_ASSERT(retval == 0); } -void test_cls_pmr_chain(void) +void classification_test_cls_pmr_chain(void) { odp_packet_t pkt; odph_ipv4hdr_t *ip; @@ -284,7 +284,7 @@ void test_cls_pmr_chain(void) odp_packet_free(pkt); } -void configure_pktio_default_cos(void) +void classification_test_configure_pktio_default_cos(void) { int retval; odp_queue_param_t qparam; @@ -318,7 +318,7 @@ void configure_pktio_default_cos(void) CU_ASSERT(retval == 0); } -void test_pktio_default_cos(void) +void classification_test_pktio_default_cos(void
Re: [lng-odp] [PATCH 5/5] validation: cls: split pmr chain test
The idea behind this suite is to have a mechanism to test the behaviour of the system after applying all the different PMR, default CoS, error CoS and L2 and L3 CoS values. your suggested changes tests each and every configuration individually which defeats the idea of the suite. There is a dedicated suite to test individual PMR values behaviour. Regards, Bala On 12 January 2016 at 23:41, Ivan Khoronzhuk wrote: > These tests are simple classification tests and better to see results > for each of them separately. > > Signed-off-by: Ivan Khoronzhuk > --- > test/validation/classification/classification.h| 22 --- > .../classification/odp_classification_tests.c | 72 > -- > 2 files changed, 38 insertions(+), 56 deletions(-) > > diff --git a/test/validation/classification/classification.h > b/test/validation/classification/classification.h > index f363812..6d2e55f 100644 > --- a/test/validation/classification/classification.h > +++ b/test/validation/classification/classification.h > @@ -13,7 +13,6 @@ > #define SHM_PKT_BUF_SIZE1024 > > /* Config values for Default CoS */ > -#define TEST_DEFAULT 1 > #defineCLS_DEFAULT 0 > #define CLS_DEFAULT_SADDR "10.0.0.1/32" > #define CLS_DEFAULT_DADDR "10.0.0.100/32" > @@ -21,29 +20,24 @@ > #define CLS_DEFAULT_DPORT 2048 > > /* Config values for Error CoS */ > -#define TEST_ERROR 1 > #define CLS_ERROR 1 > > /* Config values for PMR_CHAIN */ > -#define TEST_PMR_CHAIN 1 > #define CLS_PMR_CHAIN_SRC 2 > #define CLS_PMR_CHAIN_DST 3 > #define CLS_PMR_CHAIN_SADDR"10.0.0.5/32" > #define CLS_PMR_CHAIN_PORT 3000 > > /* Config values for PMR */ > -#define TEST_PMR 1 > #define CLS_PMR4 > #define CLS_PMR_PORT 4000 > > /* Config values for PMR SET */ > -#define TEST_PMR_SET 1 > #define CLS_PMR_SET5 > #define CLS_PMR_SET_SADDR "10.0.0.6/32" > #define CLS_PMR_SET_PORT 5000 > > /* Config values for CoS L2 Priority */ > -#define TEST_L2_QOS1 > #define CLS_L2_QOS_0 6 > #define CLS_L2_QOS_MAX 5 > > @@ -68,8 +62,20 @@ void classification_test_pktio_set_skip(void); > void classification_test_pktio_set_headroom(void); > void classification_test_pmr_terms_avail(void); > void classification_test_pmr_terms_cap(void); > -void classification_test_pktio_configure(void); > -void classification_test_pktio_test(void); > + > +void classification_test_configure_pktio_default_cos(void); > +void classification_test_configure_pktio_error_cos(void); > +void classification_test_configure_cls_pmr_chain(void); > +void classification_test_configure_cos_with_l2_priority(void); > +void classification_test_configure_pmr_cos(void); > +void classification_test_configure_pktio_pmr_match_set_cos(void); > + > +void classification_test_pktio_default_cos(void); > +void classification_test_pktio_error_cos(void); > +void classification_test_cls_pmr_chain(void); > +void classification_test_cos_with_l2_priority(void); > +void classification_test_pmr_cos(void); > +void classification_test_pktio_pmr_match_set_cos(void); > > void classification_test_pmr_term_tcp_dport(void); > void classification_test_pmr_term_tcp_sport(void); > diff --git a/test/validation/classification/odp_classification_tests.c > b/test/validation/classification/odp_classification_tests.c > index 34fc570..482e2d0 100644 > --- a/test/validation/classification/odp_classification_tests.c > +++ b/test/validation/classification/odp_classification_tests.c > @@ -133,7 +133,7 @@ cls_create_packet(bool vlan, odp_atomic_u32_t *seq, bool > flag_udp) > return pkt; > } > > -void configure_cls_pmr_chain(void) > +void classification_test_configure_cls_pmr_chain(void) > { > /* PKTIO --> PMR_SRC(SRC IP ADDR) --> PMR_DST (TCP SPORT) */ > > @@ -230,7 +230,7 @@ void configure_cls_pmr_chain(void) > CU_ASSERT(retval == 0); > } > > -void test_cls_pmr_chain(void) > +void classification_test_cls_pmr_chain(void) > { > odp_packet_t pkt; > odph_ipv4hdr_t *ip; > @@ -284,7 +284,7 @@ void test_cls_pmr_chain(void) > odp_packet_free(pkt); > } > > -void configure_pktio_default_cos(void) > +void classification_test_configure_pktio_default_cos(void) > { > int retval; > odp_queue_param_t qparam; > @@ -318,7 +318,7 @@ void configure_pktio_default_cos(void) > CU_ASSERT(retval == 0); > } > > -void test_pktio_default_cos(void) > +void classification_test_pktio_default_cos(void) > { > odp_packet_t pkt; > odp_queue_t queue; > @@ -344,7 +344,7 @@ void test_pktio_default_cos(void) > odp_packet_free(pkt); > } > > -void configure_pktio_error_cos(void) > +void classification_test_configure_pktio_error_cos(void) > { > int retval; > odp_queue_param_t qparam; > @@ -380,7 +380,7 @@ void configure_pktio_error_cos(v
[lng-odp] [PATCH 5/5] validation: cls: split pmr chain test
These tests are simple classification tests and better to see results for each of them separately. Signed-off-by: Ivan Khoronzhuk --- test/validation/classification/classification.h| 22 --- .../classification/odp_classification_tests.c | 72 -- 2 files changed, 38 insertions(+), 56 deletions(-) diff --git a/test/validation/classification/classification.h b/test/validation/classification/classification.h index f363812..6d2e55f 100644 --- a/test/validation/classification/classification.h +++ b/test/validation/classification/classification.h @@ -13,7 +13,6 @@ #define SHM_PKT_BUF_SIZE1024 /* Config values for Default CoS */ -#define TEST_DEFAULT 1 #defineCLS_DEFAULT 0 #define CLS_DEFAULT_SADDR "10.0.0.1/32" #define CLS_DEFAULT_DADDR "10.0.0.100/32" @@ -21,29 +20,24 @@ #define CLS_DEFAULT_DPORT 2048 /* Config values for Error CoS */ -#define TEST_ERROR 1 #define CLS_ERROR 1 /* Config values for PMR_CHAIN */ -#define TEST_PMR_CHAIN 1 #define CLS_PMR_CHAIN_SRC 2 #define CLS_PMR_CHAIN_DST 3 #define CLS_PMR_CHAIN_SADDR"10.0.0.5/32" #define CLS_PMR_CHAIN_PORT 3000 /* Config values for PMR */ -#define TEST_PMR 1 #define CLS_PMR4 #define CLS_PMR_PORT 4000 /* Config values for PMR SET */ -#define TEST_PMR_SET 1 #define CLS_PMR_SET5 #define CLS_PMR_SET_SADDR "10.0.0.6/32" #define CLS_PMR_SET_PORT 5000 /* Config values for CoS L2 Priority */ -#define TEST_L2_QOS1 #define CLS_L2_QOS_0 6 #define CLS_L2_QOS_MAX 5 @@ -68,8 +62,20 @@ void classification_test_pktio_set_skip(void); void classification_test_pktio_set_headroom(void); void classification_test_pmr_terms_avail(void); void classification_test_pmr_terms_cap(void); -void classification_test_pktio_configure(void); -void classification_test_pktio_test(void); + +void classification_test_configure_pktio_default_cos(void); +void classification_test_configure_pktio_error_cos(void); +void classification_test_configure_cls_pmr_chain(void); +void classification_test_configure_cos_with_l2_priority(void); +void classification_test_configure_pmr_cos(void); +void classification_test_configure_pktio_pmr_match_set_cos(void); + +void classification_test_pktio_default_cos(void); +void classification_test_pktio_error_cos(void); +void classification_test_cls_pmr_chain(void); +void classification_test_cos_with_l2_priority(void); +void classification_test_pmr_cos(void); +void classification_test_pktio_pmr_match_set_cos(void); void classification_test_pmr_term_tcp_dport(void); void classification_test_pmr_term_tcp_sport(void); diff --git a/test/validation/classification/odp_classification_tests.c b/test/validation/classification/odp_classification_tests.c index 34fc570..482e2d0 100644 --- a/test/validation/classification/odp_classification_tests.c +++ b/test/validation/classification/odp_classification_tests.c @@ -133,7 +133,7 @@ cls_create_packet(bool vlan, odp_atomic_u32_t *seq, bool flag_udp) return pkt; } -void configure_cls_pmr_chain(void) +void classification_test_configure_cls_pmr_chain(void) { /* PKTIO --> PMR_SRC(SRC IP ADDR) --> PMR_DST (TCP SPORT) */ @@ -230,7 +230,7 @@ void configure_cls_pmr_chain(void) CU_ASSERT(retval == 0); } -void test_cls_pmr_chain(void) +void classification_test_cls_pmr_chain(void) { odp_packet_t pkt; odph_ipv4hdr_t *ip; @@ -284,7 +284,7 @@ void test_cls_pmr_chain(void) odp_packet_free(pkt); } -void configure_pktio_default_cos(void) +void classification_test_configure_pktio_default_cos(void) { int retval; odp_queue_param_t qparam; @@ -318,7 +318,7 @@ void configure_pktio_default_cos(void) CU_ASSERT(retval == 0); } -void test_pktio_default_cos(void) +void classification_test_pktio_default_cos(void) { odp_packet_t pkt; odp_queue_t queue; @@ -344,7 +344,7 @@ void test_pktio_default_cos(void) odp_packet_free(pkt); } -void configure_pktio_error_cos(void) +void classification_test_configure_pktio_error_cos(void) { int retval; odp_queue_param_t qparam; @@ -380,7 +380,7 @@ void configure_pktio_error_cos(void) CU_ASSERT(retval == 0); } -void test_pktio_error_cos(void) +void classification_test_pktio_error_cos(void) { odp_queue_t queue; odp_packet_t pkt; @@ -434,7 +434,7 @@ void classification_test_pktio_set_headroom(void) CU_ASSERT(retval < 0); } -void configure_cos_with_l2_priority(void) +void classification_test_configure_cos_with_l2_priority(void) { uint8_t num_qos = CLS_L2_QOS_MAX; odp_cos_t cos_tbl[CLS_L2_QOS_MAX]; @@ -487,7 +487,7 @@ void configure_cos_with_l2_priority(void) CU_ASSERT(retval == 0); } -void test_cos_with_l2_priority(void) +void classification_test_cos_