That's what I was thinking as well. Expect a patch for review later today. Thanks.
On Thu, Apr 7, 2016 at 3:24 AM, Bogdan Pricope <bogdan.pric...@enea.com> wrote: > Hi, > > > > I would prefer to avoid odp_pktio_info() as ‘getting’ part will be called > for every input packet and it contains a memset() and a memcpy(). > > > > I was thinking to an API similar with queue API: > > > > int odp_pktio_context_set(odp_pktio_t pktio, void *context) > > { > > pktio_entry_t *entry = *get_pktio_entry*(pktio); > > if (!entry) > > return -1; > > entry->s.context = context; > > return 0; > > > > } > > void *odp_pktio_context(odp_pktio_t pktio) > > { > > pktio_entry_t *entry = *get_pktio_entry*(pktio); > > if (!entry) > > return NULL; > > return entry->s.context; > > } > > > > Best regards, > > Bogdan > > > > *From:* Bill Fischofer [mailto:bill.fischo...@linaro.org] > *Sent:* Thursday, April 07, 2016 1:04 AM > *To:* Bogdan Pricope <bogdan.pric...@enea.com> > *Cc:* lng-odp@lists.linaro.org; openfastp...@list.openfastpath.org > *Subject:* Re: [openfastpath] User defined context pointer associated > with pktio > > > > Hi Bogdan, > > > > Sorry, but it looks like this question fell through the cracks as it was > posted during BKK16 when everyone was distracted with other items. > > > > It would be trivial to add a user context field to the odp_pktio_param_t > that's specified at odp_pktio_open() time. This is retrievable via > odp_pktio_info(). Question is would that be sufficient for your use case > or do you need to be able to change the context pointer dynamically via a > setter? > > > > On Wed, Mar 9, 2016 at 1:23 AM, Bogdan Pricope <bogdan.pric...@enea.com> > wrote: > > Hi, > > > > Would it be possible to have a user defined context pointer associated > with the pktio (+ set/get functions) as we have for queues? > > > > Background: we need to be able to retrieve pointer of our interface info > starting from pktio. We previously used a workaround: set the pointer to > user defined context pointer of default output queue but that queue was > removed in latest ODP version. > > > > Best regards, > > Bogdan > > > > > _______________________________________________ > openfastpath mailing list > openfastp...@list.openfastpath.org > http://www.openfastpath.org/mailman/listinfo/openfastpath > > >
_______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp