From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 2143D1B74F for ; Mon, 16 Oct 2017 16:51:38 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Oct 2017 07:51:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.43,371,1503385200"; d="scan'208";a="725412" Received: from tanjianf-mobl.ccr.corp.intel.com (HELO [10.255.30.2]) ([10.255.30.2]) by orsmga001.jf.intel.com with ESMTP; 16 Oct 2017 07:51:36 -0700 To: "Basierski, SebastianX" , "'skhare@vmware.com'" References: <1505821646-33594-1-git-send-email-sebastianx.basierski@intel.com> <3A7E81AC661B4646A4CE6F2E09B7B74E4BAA2B@HASMSX106.ger.corp.intel.com> <3A7E81AC661B4646A4CE6F2E09B7B74E4BBC3F@HASMSX106.ger.corp.intel.com> Cc: "'dev@dpdk.org'" , "Jain, Deepak K" From: "Tan, Jianfeng" Message-ID: Date: Mon, 16 Oct 2017 22:51:36 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <3A7E81AC661B4646A4CE6F2E09B7B74E4BBC3F@HASMSX106.ger.corp.intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] pmd_virtio: Unchecked return value from library X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Oct 2017 14:51:39 -0000 Hi Sebastian, Sorry for the late response. I missed the previous emails. On 10/16/2017 4:32 PM, Basierski, SebastianX wrote: >> flags = fcntl(dev->vhostfd, F_GETFL); >> - fcntl(dev->vhostfd, F_SETFL, flags | O_NONBLOCK); >> + if (fcntl(dev->vhostfd, F_SETFL, >> + flags | O_NONBLOCK) == -1) >> + return; > Actually, even it fails, I still prefer to continue instead of "return" here. Maybe, we can report an error message here. > > Thanks, > Jianfeng > > > > Hi Jianfeng, > > I'like to continue with the task. > So please let me know if You are certain with Your option: > continue instead of return (and add error report), despite possibility of returning error from fcntl. Even "return" directly, please add an error message here so that users can notice such error. Besides, the subject can be changed to: "net/virtio: fix unchecked return value" Thanks, Jianfeng