Hi,

This is what we talked about at the arch call, I summarized it up what
I've found, so hopefully it'll be easier for you to comment:

Socket, socket_mmap and dpdk pktio uses _odp_packet_cls_enq(), it can
have 3 different returns:
- pktio_select_cos(), odp_packet_alloc() or odp_packet_copydata_in()
problem: returns 0, the caller then leaks the memory passed through
*base, I think we should fix that. Plus, I think we should pass back
some of these errors through odp_pktin_recv(). At least the alloc and
copydata, not sure about pktio_select_cos(). What do you think?
- queue_enq() succeeds, and then it returns 0, the caller don't have to
care. That's OK
- queue_enq() fails, caller passes it back to pktin_poll(), which puts
it on the pktio_entry->s.in_queue[...].queue. Is this what we want? Or
should we rather drop the packet? What is the rationale for either decision?

On the other hand, _odp_packet_classifier() (which is used by loopback,
and I want to use it for ODP-DPDK) works a bit differently:
- pktio_select_cos(), odp_packet_alloc() or odp_packet_copydata_in()
problem AND queue_enq() failures: returns -1, the caller releases the
buffer and update error stats. pktin_poll() never sees the packets
failed in queue_enq(). This is the same question like above, we should
have some consistency. Plus again, we might want to escalate the alloc
and copydata failures.
- queue_enq() succeeds, caller doesn't care anymore.

Regards,

Zoltan


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

Reply via email to