diff --git a/include/odp/api/spec/classification.h b/include/odp/api/spec/classification.h index c10ee0addd..52091bbfbc 100644 --- a/include/odp/api/spec/classification.h +++ b/include/odp/api/spec/classification.h @@ -855,8 +855,8 @@ odp_queue_t odp_cls_hash_result(odp_cos_t cos, odp_packet_t packet); * * Before destroying a CoS, all the PMRs referring to the CoS (as a source or * destination CoS) must be destroyed first. Also, the CoS must not be in use - * as the default CoS in any pktio (see odp_pktio_default_cos_set()) or as the - * destination CoS of any IPsec SA. + * as the default or error CoS in any pktio (see odp_pktio_default_cos_set() and + * odp_pktio_error_cos_set()), or as the destination CoS of any IPsec SA. * * @param cos CoS handle * diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h index 6c70e3192b..97e5c44ac2 100644 --- a/include/odp/api/spec/packet_io.h +++ b/include/odp/api/spec/packet_io.h @@ -678,31 +678,40 @@ int odp_pktio_mac_addr_set(odp_pktio_t pktio, const void *mac_addr, int size); /** - * Setup per-port default class-of-service. + * Setup interface default class-of-service * - * @param pktio Ingress port pktio handle. - * @param default_cos Class-of-service set to all packets arriving at this - * ingress port. Use ODP_COS_INVALID to remove the default - * CoS. + * Set default CoS for packets arriving from this packet IO interface, or remove + * the current default CoS by passing ODP_COS_INVALID as 'default_cos'. The + * 'default_cos' must be unique per odp_pktio_t instance. This function may be + * called multiple times on the same interface, and each successful call + * replaces the previous default CoS binding. + * + * @param pktio Packet IO handle + * @param default_cos CoS handle or ODP_COS_INVALID * * @retval 0 on success * @retval <0 on failure - * - * @note The default_cos has to be unique per odp_pktio_t instance. */ int odp_pktio_default_cos_set(odp_pktio_t pktio, odp_cos_t default_cos); /** - * Setup per-port error class-of-service + * Setup interface error class-of-service * - * @param pktio Ingress port pktio handle. - * @param error_cos class-of-service set to all packets arriving at this - * ingress port that contain an error. + * Set CoS for packets arriving from this packet IO interface that contain + * errors detected during packet parsing, or remove the current error CoS by + * passing ODP_COS_INVALID as 'error_cos'. This function may be called multiple + * times on the same interface, and each successful call replaces the previous + * error CoS binding. + * + * When no error CoS is configured, it's implementation defined how packets with + * parsing errors are handled (they may be discarded similarly to classification + * failures). + * + * @param pktio Packet IO handle + * @param error_cos CoS handle or ODP_COS_INVALID * * @retval 0 on success * @retval <0 on failure - * - * @note Optional. */ int odp_pktio_error_cos_set(odp_pktio_t pktio, odp_cos_t error_cos);