Is it possible to configure the pktio and classifier such that the
application receives *only* packets matching a defined set of PMRs?

I tried something like this;

pktio = odp_pktio_create(..);
cos = odp_cos_create("MyCoS");
q = odp_queue_create("MyQ", ODP_QUEUE_TYPE_SCHED, &qparam);
odp_cos_set_queue(cos, q);
odp_pmr_set_t pmr_set;
odp_pmr_match_set_create(4, pmrs, &pmr_set);
odp_pktio_pmr_match_set_cos(pmr_set, pktio, cos);

Expecting that packets matching the PMR set would be delivered to q and
non-matching packets would be dropped as there's no queue to deliver
them to. With the linux-generic implementations of pktio and the
classifier what actually happens is nothing is received at all, because
in order to receive anything on a pktio you must configure a default inq,
by calling odp_pktio_inq_setdef(). I think this is a bug in the
implementation (the setdef call installs the hook into the scheduler)
and the above sequence should really work.

Also, in classification.h we have;

/**
 * Class-of-service packet drop policies
 */
typedef enum odp_cos_drop {
>-------ODP_COS_DROP_POOL,    /**< Follow buffer pool drop policy */
>-------ODP_COS_DROP_NEVER,   /**< Never drop, ignoring buffer pool policy */
} odp_drop_e;

And odp_cos_set_drop(), but it's not clear what this is intended to do
and it's not implemented in linux-generic.

-- 
Stuart.
_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to