Ping. Bala and Bill have reviewed this set.
> -----Original Message----- > From: EXT Bala Manoharan [mailto:bala.manoha...@linaro.org] > Sent: Thursday, January 07, 2016 2:34 PM > To: Savolainen, Petri (Nokia - FI/Espoo) > Cc: LNG ODP Mailman List > Subject: Re: [lng-odp] [API-NEXT PATCH 1/2] api: classifier: align enum > type naming > > Reviewed-by: Balasubramanian Manoharan <bala.manoha...@linaro.org> > Regards, > Bala > > > On 7 January 2016 at 17:46, Petri Savolainen <petri.savolai...@nokia.com> > wrote: > > All ODP API enums are typedef'd and type name has > > a '_t' post-fix. > > > > Signed-off-by: Petri Savolainen <petri.savolai...@nokia.com> > > --- > > example/classifier/odp_classifier.c | 12 ++++++--- > --- > > include/odp/api/classification.h | 16 ++++++++- > ------- > > .../linux-generic/include/odp_classification_datamodel.h | 2 +- > > 3 files changed, 15 insertions(+), 15 deletions(-) > > > > diff --git a/example/classifier/odp_classifier.c > b/example/classifier/odp_classifier.c > > index c14f89e..efb5cf9 100644 > > --- a/example/classifier/odp_classifier.c > > +++ b/example/classifier/odp_classifier.c > > @@ -56,7 +56,7 @@ typedef struct { > > odp_atomic_u64_t pool_pkt_count; /**< count of received packets > */ > > char cos_name[ODP_COS_NAME_LEN]; /**< cos name */ > > struct { > > - odp_pmr_term_e term; /**< odp pmr term value */ > > + odp_pmr_term_t term; /**< odp pmr term value */ > > uint64_t val; /**< pmr term value */ > > uint64_t mask; /**< pmr term mask */ > > uint32_t val_sz; /**< size of the pmr term */ > > @@ -89,7 +89,7 @@ static void print_info(char *progname, appl_args_t > *appl_args); > > static void usage(char *progname); > > static void configure_cos(odp_pktio_t pktio, appl_args_t *args); > > static void configure_default_cos(odp_pktio_t pktio, appl_args_t > *args); > > -static int convert_str_to_pmr_enum(char *token, odp_pmr_term_e *term, > > +static int convert_str_to_pmr_enum(char *token, odp_pmr_term_t *term, > > uint32_t *offset); > > static int parse_pmr_policy(appl_args_t *appl_args, char *argv[], char > *optarg); > > > > @@ -691,7 +691,7 @@ static void swap_pkt_addrs(odp_packet_t pkt_tbl[], > unsigned len) > > } > > } > > > > -static int convert_str_to_pmr_enum(char *token, odp_pmr_term_e *term, > > +static int convert_str_to_pmr_enum(char *token, odp_pmr_term_t *term, > > uint32_t *offset) > > { > > if (NULL == token) > > @@ -717,7 +717,7 @@ static int parse_pmr_policy(appl_args_t *appl_args, > char *argv[], char *optarg) > > int policy_count; > > char *token; > > size_t len; > > - odp_pmr_term_e term; > > + odp_pmr_term_t term; > > global_statistics *stats; > > char *pmr_str; > > uint32_t offset; > > @@ -922,9 +922,9 @@ static void usage(char *progname) > > "\n" > > "Mandatory OPTIONS:\n" > > " -i, --interface Eth interface\n" > > - " -p, --policy > [<odp_pmr_term_e>|<offset>]:<value>:<mask bits>:<queue name>\n" > > + " -p, --policy > [<odp_pmr_term_t>|<offset>]:<value>:<mask bits>:<queue name>\n" > > "\n" > > - "<odp_pmr_term_e> Packet Matching Rule > defined with odp_pmr_term_e " > > + "<odp_pmr_term_t> Packet Matching Rule > defined with odp_pmr_term_t " > > "for the policy\n" > > "<offset> Absolute offset in bytes > from frame start to define a " > > "ODP_PMR_CUSTOM_FRAME Packet Matching Rule for > the policy\n" > > diff --git a/include/odp/api/classification.h > b/include/odp/api/classification.h > > index c9493c2..f46912e 100644 > > --- a/include/odp/api/classification.h > > +++ b/include/odp/api/classification.h > > @@ -62,7 +62,7 @@ extern "C" { > > /** > > * class of service packet drop policies > > */ > > -typedef enum odp_cls_drop { > > +typedef enum { > > ODP_COS_DROP_POOL, /**< Follow buffer pool drop policy */ > > ODP_COS_DROP_NEVER, /**< Never drop, ignoring buffer pool > policy */ > > } odp_cls_drop_t; > > @@ -72,7 +72,7 @@ typedef enum odp_cls_drop { > > * for fields that may be used to calculate > > * the flow signature, if present in a packet. > > */ > > -typedef enum odp_cos_hdr_flow_fields { > > +typedef enum { > > ODP_COS_FHDR_IN_PKTIO, /**< Ingress port number */ > > ODP_COS_FHDR_L2_SAP, /**< Ethernet Source MAC address */ > > ODP_COS_FHDR_L2_DAP, /**< Ethernet Destination MAC address */ > > @@ -86,7 +86,7 @@ typedef enum odp_cos_hdr_flow_fields { > > ODP_COS_FHDR_IPSEC_SPI, /**< IPsec session identifier */ > > ODP_COS_FHDR_LD_VNI, /**< NVGRE/VXLAN network identifier */ > > ODP_COS_FHDR_USER /**< Application-specific header > field(s) */ > > -} odp_cos_hdr_flow_fields_e; > > +} odp_cos_hdr_flow_fields_t; > > > > /** > > * Class of service parameters > > @@ -226,7 +226,7 @@ int odp_cos_with_l3_qos(odp_pktio_t pktio_in, > > /** > > * @typedef odp_cos_flow_set_t > > * Set of header fields that take part in flow signature hash > calculation: > > - * bit positions per odp_cos_hdr_flow_fields_e enumeration. > > + * bit positions per odp_cos_hdr_flow_fields_t enumeration. > > */ > > > > /** > > @@ -240,7 +240,7 @@ int odp_cos_with_l3_qos(odp_pktio_t pktio_in, > > * for fields that may be used to calculate > > * the PMR, if present in a packet. > > */ > > -typedef enum odp_pmr_term { > > +typedef enum { > > ODP_PMR_LEN, /**< Total length of received packet*/ > > ODP_PMR_ETHTYPE_0, /**< Initial (outer) > > Ethertype only (*val=uint16_t)*/ > > @@ -270,13 +270,13 @@ typedef enum odp_pmr_term { > > > > /** Inner header may repeat above values with this offset */ > > ODP_PMR_INNER_HDR_OFF = 32 > > -} odp_pmr_term_e; > > +} odp_pmr_term_t; > > > > /** > > * Following structure is used to define a packet matching rule > > */ > > typedef struct odp_pmr_match_t { > > - odp_pmr_term_e term; /**< PMR term value to be matched */ > > + odp_pmr_term_t term; /**< PMR term value to be matched */ > > const void *val; /**< Value to be matched */ > > const void *mask; /**< Masked set of bits to be matched */ > > uint32_t val_sz; /**< Size of the term value */ > > @@ -334,7 +334,7 @@ int odp_cos_pmr_cos(odp_pmr_t pmr_id, odp_cos_t > src_cos, odp_cos_t dst_cos); > > /** > > * Inquire about matching terms supported by the classifier > > * > > - * @return A mask one bit per enumerated term, one for each of > op_pmr_term_e > > + * @return A mask one bit per enumerated term, one for each of > odp_pmr_term_t > > */ > > unsigned long long odp_pmr_terms_cap(void); > > > > diff --git a/platform/linux- > generic/include/odp_classification_datamodel.h b/platform/linux- > generic/include/odp_classification_datamodel.h > > index 5b65202..27d8a52 100644 > > --- a/platform/linux-generic/include/odp_classification_datamodel.h > > +++ b/platform/linux-generic/include/odp_classification_datamodel.h > > @@ -54,7 +54,7 @@ Stores the Term and Value mapping for a PMR. > > The maximum size of value currently supported in 64 bits > > **/ > > typedef struct pmr_term_value { > > - odp_pmr_term_e term; /* PMR Term */ > > + odp_pmr_term_t term; /* PMR Term */ > > uint64_t val; /**< Value to be matched */ > > uint64_t mask; /**< Masked set of bits to be matched */ > > uint32_t offset; /**< Offset if term == > ODP_PMR_CUSTOM_FRAME */ > > -- > > 2.6.3 > > > > _______________________________________________ > > lng-odp mailing list > > lng-odp@lists.linaro.org > > https://lists.linaro.org/mailman/listinfo/lng-odp _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp