On Fri, Jul 17, 2015 at 07:43:08PM +0530, Bala Manoharan wrote:
> Hi Stuart,
> 
> Pls raise a bug for POOL_DROP implementation. I will implement drop policy.
> 
> Regards,
> Bala
> 

Will do.

I assume then that the intention is that you set a default CoS for the
pktio, then set the drop policy for the CoS so that packets are dropped,
which seems reasonable.

Having to set a default queue is still a problem though, should this be
considered a linux-generic bug?

--
Stuart.

> On 17 July 2015 at 19:40, Bill Fischofer <[email protected]> wrote:
> 
> > odp_cos_set_drop() should certainly be implemented. If it's not that
> > should be reported as a bug against both the classifier and the test suite.
> >
> > On Fri, Jul 17, 2015 at 8:54 AM, Stuart Haslam <[email protected]>
> > wrote:
> >
> >> 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
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to