From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 0EAF71B2B4 for ; Tue, 13 Feb 2018 16:39:12 +0100 (CET) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Feb 2018 07:39:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,507,1511856000"; d="scan'208";a="17799777" Received: from yyehudai-mobl1.ger.corp.intel.com ([10.252.7.214]) by orsmga008.jf.intel.com with SMTP; 13 Feb 2018 07:39:09 -0800 Received: by (sSMTP sendmail emulation); Tue, 13 Feb 2018 15:39:08 +0000 Date: Tue, 13 Feb 2018 15:39:07 +0000 From: Bruce Richardson To: "Van Haaren, Harry" Cc: Thomas Monjalon , "Burakov, Anatoly" , "dev@dpdk.org" , "Tan, Jianfeng" Message-ID: <20180213153906.GA160@bricha3-MOBL3.ger.corp.intel.com> References: <46a01b34318bbc799a0911fbb166a592c34ffa66.1518267551.git.anatoly.burakov@intel.com> <7815253.RbYmxIpbrz@xps> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.1 (2017-09-22) Subject: Re: [dpdk-dev] [PATCH] eal: fix rte_errno values for IPC API 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: Tue, 13 Feb 2018 15:39:13 -0000 On Tue, Feb 13, 2018 at 02:16:08PM +0000, Van Haaren, Harry wrote: > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > Sent: Tuesday, February 13, 2018 1:51 PM > > To: Burakov, Anatoly > > Cc: dev@dpdk.org; Tan, Jianfeng > > Subject: Re: [dpdk-dev] [PATCH] eal: fix rte_errno values for IPC API > > > > > > rte_errno values should not be negative. > > > > > > > > Fixes: bacaa2754017 ("eal: add channel for multi-process communication") > > > > Fixes: 783b6e54971d ("eal: add synchronous multi-process communication") > > > > Cc: jianfeng.tan@intel.com > > > > Signed-off-by: Anatoly Burakov > > > > > > Reviewed-by: Jianfeng Tan > > > > > > Thanks for fixing this. > > > > Applied, thanks > > > > There are a lot of similar issues: > > > > git grep -l 'rte_errno = -E' | sed 's,[^/]*$,,' | sort -u > > > > drivers/event/opdl/ > > drivers/event/sw/ > > > lib/librte_eventdev/ > > > I just checked the eventdev.h port_link() docs, which indicate negative return values. > Perhaps the header is wrong too - but the PMDs adhere to the library header in this case. > > Is there a requirement for rte_errno to be positive? > It looks to be declared as per-lcore signed int in rte_errno.h +20 > I think I wrote that part of the documentation, and it never crossed my mind that people would set rte_errno to negative values, given how errno from system calls are always positive. However, I think this omission should be rectified, and we should enforce having rte_errno values as positive. > Either-way, if we want to change the PMDs, we should change the Eventdev APIs, > which means API breakage, and application changes to handle changed return values. > > Sound like more work than it is worth it to me? I would view it as restoring sanity (or balance to the force if you prefer! :-) ), so I'd definitely be ok with an ABI break to do that. /Bruce