Hi Andrew, On Sat, Jun 9, 2018 at 2:23 AM, Andrew Rybchenko <arybche...@solarflare.com> wrote:
> BTW, thinking about function I found out there is a trap in private area > size related to the function. I think that the function description should > highlight that rte_pktmbuf_priv_size(m->pool) should be used to > find out the size of private area since indirect mbuf has size of the > direct private are in its priv_size (but we return pointer to the indirect > mbuf (the mbuf itself) private area here). > hmm... I guess I didn't realize that. I think that what I'm going to do is just remove the check for m->priv_size == 0 entirely. It seems like checking the priv_size is just going to cause more problems down the road than it is worth. The whole point of this was just to have a simple API function to access the private area, not to fully save the programmer from shooting him/herself in the foot by accessing a private data area which doesn't necessarily exist. thanks, dan