qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter
Date: Fri, 25 Sep 2015 17:13:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Jason Wang <address@hidden> writes:

> On 09/25/2015 03:18 PM, Yang Hongyang wrote:
>>
>>
>> On 09/24/2015 05:12 PM, Markus Armbruster wrote:
>>> Yang Hongyang <address@hidden> writes:
[...]
>>>> +static ssize_t filter_buffer_receive_iov(NetFilterState *nf,
>>>> +                                         NetClientState *sender,
>>>> +                                         unsigned flags,
>>>> +                                         const struct iovec *iov,
>>>> +                                         int iovcnt,
>>>> +                                         NetPacketSent *sent_cb)
>>>> +{
>>>> +    FilterBufferState *s = FILTER_BUFFER(nf);
>>>> +
>>>> +    /*
>>>> +     * we return size when buffer a packet, the sender will take it as
>>>> +     * a already sent packet, so sent_cb should not be called later
[...]
>>>> +     * FIXME: even if guest can't receive packet for some reasons.
>>>> Filter
>>>> +     * can still accept packet until its internal queue is full.
>>>> +     */
>>>
>>> I'm not sure I understand the comment.
>>
>> This is taken from Jason's comments, may be he can have a better explain?
>
> For example. For some reason, receiver could not receive more packets
> (.can_receive() returns zero). Without a filter, at most one packet will
> be queued in incoming queue and sender's poll will be disabled unit its
> sent_cb() was called. With a filter, it will keep receive the packets
> without caring about the receiver. This is suboptimal. May need more
> thoughts (e.g keeping sent_cb).

Aha.  Perhaps you can work that explanation into the comment.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]