From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59392) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKsd1-00026l-4R for Qemu-devel@nongnu.org; Tue, 04 Mar 2014 11:55:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WKscv-0006te-50 for Qemu-devel@nongnu.org; Tue, 04 Mar 2014 11:55:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WKscu-0006tY-Lv for Qemu-devel@nongnu.org; Tue, 04 Mar 2014 11:55:33 -0500 Message-ID: <5316057E.8000304@redhat.com> Date: Tue, 04 Mar 2014 17:55:26 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <5310489A.4060501@cisco.com> <53105EB0.3060702@redhat.com> <5315EEFE.6060605@cisco.com> <53160065.50908@redhat.com> <531603DE.2010400@cisco.com> In-Reply-To: <531603DE.2010400@cisco.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Contribution - L2TPv3 transport List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Anton Ivanov (antivano)" , Eric Blake Cc: "Qemu-devel@nongnu.org" , Stefan Hajnoczi 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. Paolo