Camel case should not be used in the API. We can refer to RFC number and terms
in documentation, but field names should use ODP style (no camel case).
For example,
typedef struct {
/** The number of octets in valid MAC frames
* received on this interface, including
* the MAC header and FCS. See ifHCInOctets
* counter description in RFC 3635 for details.
*/
uint64_t in_octets;
uint64_t in_ucastpkts;
...
} odp_pktio_stat_counters_t;
-Petri
From: EXT Mike Holmes [mailto:[email protected]]
Sent: Thursday, October 15, 2015 3:13 PM
To: Bill Fischofer
Cc: Savolainen, Petri (Nokia - FI/Espoo); [email protected]
Subject: Re: [lng-odp] pktio statistic counters
On 15 October 2015 at 13:01, Bill Fischofer <[email protected]> wrote:
If we're going to follow RFC MIB specifications we should use the field names
as specified in the RFCs. We already need to update the checkpatch rules to
allow camel case since CUnit uses that anyway. We can simply have a
recommendation that ODP doesn't use camel case except in cases like these. It
actually helps highlight the fact that these are externally specified names
rather than ODP names.
Agree on using RFC names and I think checkpatch already ignores "MiB", but a
patch to add Cunit exceptions is a good idea
Bill
On Thu, Oct 15, 2015 at 6:09 AM, Savolainen, Petri (Nokia - FI/Espoo)
<[email protected]> wrote:
Hi,
These RFCs could be the ones we are looking for pktio interface level counters.
https://tools.ietf.org/html/rfc3635
https://tools.ietf.org/html/rfc2863
https://tools.ietf.org/html/rfc2819
The editor tool can be used to double check which RFC is the lastest...
https://www.rfc-editor.org/info/rfc3635
https://www.rfc-editor.org/info/rfc2863
The counters could be these, but in 64 bit version in ODP API.
For example, ifInOctets would be specified as
typedef struct {
uint64_t in_octets;
uint64_t in_ucastpkts;
...
} odp_pktio_stat_counters_t;
ifInOctets
ifInUcastPkts
ifInDiscards
ifInErrors
ifInUnknownProtos
ifOutOctets
ifOutUcastPkts
ifOutDiscards
ifOutErrors
ifInOctets The number of octets in valid MAC frames
received on this interface, including
the MAC header and FCS. This does
include the number of octets in valid
MAC Control frames received on this
Interface
ifInUcastPkts Refer to [RFC2863]. Note that this does
not include MAC Control frames
...
-Petri
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp
--
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org │ Open source software for ARM SoCs
_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp