On Tue, Mar 18, 2014 at 5:01 PM, Ben Pfaff <[email protected]> wrote: > 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. > *cnt only returns packet count. All caller are expected to pass array of size MAX_RX_BATCH. I will document it.
> I think that the last sentence means that the netdev transfers > ownership to the caller, but it is not entirely clear to me. > It means that caller can free those packets. > s/ofbpuf/ofpbuf/ also. > ok. > 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(). ok, I will use that name. _______________________________________________ dev mailing list [email protected] http://openvswitch.org/mailman/listinfo/dev
