[ovs-dev] [PATCH V2 01/10] netdev: Extend rx_recv to pass multiple packets.
Thomas Graf
tgraf at redhat.com
Fri Mar 21 21:48:48 UTC 2014
On 03/21/2014 10:28 PM, Pravin Shelar wrote:
> I think it is not possible. Why vswitchd would generate such action if
> the packet is not going somewhere?
[...]
> right, there is memory leak for packet size less than eth-header.
> unfortunately dp_netdev_port_input() would not know if packet is
> deleted, since it can send it to odp-execute.
> At this point there is three places where we delete packet:
> 1. dp_netdev_port_input()
> 2. odp action (drop)
> 3. odp-actions callback.
>
> I do not think if we can centralize it.
odp_execute_actions() and the callback can be made returning a bool
indicating whether the buffer was consumed, much like the kernel
rx handler.
I think it's slightly fragile as-is. Definitely don't want to hold
up the series because of this. I'm happy to propose this as a follow up
as well.
>>> - retval = rx->netdev->netdev_class->rx_recv(rx, buffer);
>>> + retval = rx->netdev->netdev_class->rx_recv(rx, buffers, cnt);
>>> if (!retval) {
>>> COVERAGE_INC(netdev_received);
>>
>>
>> What would be awesome here is a COVERAGE_ADD(netdev_batched, cnt).
>
> I am not sure what do u mean, but we can get avg batch size by looking
> at all packets recved and this count for given period of time.
True, hit+miss/netdev_received will provide a similar average.
More information about the dev
mailing list