On Tue, Mar 18, 2014 at 01:53:06PM -0700, Pravin wrote: > DPDK can receive multiple packets but current netdev API does > not allow that. Following patch allows dpif-netdev receive batch > of packet in a rx_recv() call for any netdev port. This will be > used by dpdk-netdev. > > Signed-off-by: Pravin B Shelar <[email protected]>
I didn't fully review this since Jarno already did, but I have a few comments to add to Jarno's. + /* Attempts to receive batch of packets from 'rx' and place array of pointers + * into '*pkt'. netdev is responsible for allocating buffers. + * '*cnt' points to packet count for given batch. Once packets are returned + * to caller, netdev should give up ownership of ofbpuf data. I think that this means that '*cnt' is used on input to indicate the size of the array and on output to indicate the number of packets. If so, then I'd prefer to use separate parameters for that, just because I often find this kind of interface awkward. I think that the last sentence means that the netdev transfers ownership to the caller, but it is not entirely clear to me. s/ofbpuf/ofpbuf/ also. The new packet_set_size() function seems odd to me, because both callers pass in the existing packet size. I would be inclined to drop the 'size' parameter and rename the function something like packet_pad(). _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
