qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Contribution - L2TPv3 transport


From: Anton Ivanov (antivano)
Subject: Re: [Qemu-devel] Contribution - L2TPv3 transport
Date: Tue, 4 Mar 2014 17:28:34 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

On 04/03/14 16:55, Paolo Bonzini wrote:
> Il 04/03/2014 17:48, Anton Ivanov (antivano) ha scritto:
>>>> >> +static ssize_t net_l2tpv3_receive_dgram_iov(NetClientState *nc, 
>>>> const struct iovec *iov, int iovcnt)
>>> > Long line; you can split after , to fit within 80 columns.
>> OK
>>> >
>>>> >> +{
>>>> >> +    NetL2TPV3State *s = DO_UPCAST(NetL2TPV3State, nc, nc);
>>>> >> +
>>>> >> +    struct msghdr message;
>>>> >> +    int ret;
>>>> >> +
>>>> >> +    if (iovcnt > MAX_L2TPV3_IOVCNT - 1) {
>>>> >> +    fprintf(stderr, "iovec too long %d > %d, change 
>>>> l2tpv3.h\n", iovcnt, MAX_L2TPV3_IOVCNT);
>>>> >> +    return -1;
>>> > Is printing to stderr always the right thing to do?  It seems to 
>>> me that
>>> > you should look into using QError.
>> Thanks, will look into it.
>>
>
> Actually no, this does not need to use QError.  You just need 
> "error_report", which is the same as fprintf(stderr) but will add nice 
> timestamps in front of the error message if enabled.

Everything updated to that, Eric's comments (except QError and bus 
alignment) taken in to account too.

I have done a compromise on the buffer at the moment and set it to 2048. 
I need to understand fully how this gets paged in and how to make that 
process optimal, then we will adjust it. The idea is to expand on this 
in the future to allow jumbo frames (up to 8k).

I will rebuild it, retest it to make sure it works and provide an 
updated version tomorrow.

One question - what git client are you using to do git send-mail. While 
debian does have a reference to git send-mail in the main git manpage, 
it does not seem to have it as a part of git.

By the way - apologies for the code quality, as you have probably 
guessed, I am not a "proper" developer - I am a network 
engineer/sysadmin by trade.

A.

>
> Paolo

reply via email to

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