From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by dpdk.org (Postfix) with ESMTP id 3C17EDE4 for ; Mon, 1 Jun 2015 15:27:35 +0200 (CEST) Received: by padjw17 with SMTP id jw17so37140530pad.2 for ; Mon, 01 Jun 2015 06:27:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=RRXlQOInUUYVdBMRKmte17ewMfERDVCp4L8UVVu0g28=; b=I8gYAQveVFTisdY3TTCrjKaFoEhkGnTjNRLqmUtpPNdDZXyMYCWUdEBTiMWjKCWJbi /eqIQFZG1zl8MghqvfTUaceBw8s1Ud/Zog8zHmogQ9PHz0SeDL5pxbcopSgw60HotJQl pGwT14PVnkGNyrMrvihKRB8Vf6FBRlhGBvwXoi1k6HT7xa49NrcWWi2TOHNnCLn3UVTY oo3DqMBLGTDNm7HUClplGn2Qg2HagfMNn4dEqH+6PzyMJOmsNfMsgbolQNlHy0xfsrNW 7C3VofxUdKYKGpHhXmmujs4JxeQ4jGji0T14Pi0fsSi58VM9djFy/DPumkh250H9uiPy NVBA== X-Gm-Message-State: ALoCoQlZE6kbMgCRuuVWtsbvGjobf4YtFKZLIhIJLyFQCxfEOJ0L7M2pD2tf7SUAF+pUpMDbxlTg X-Received: by 10.70.41.165 with SMTP id g5mr40526928pdl.143.1433165254387; Mon, 01 Jun 2015 06:27:34 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id j10sm14580334pdk.48.2015.06.01.06.27.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Jun 2015 06:27:34 -0700 (PDT) Date: Mon, 1 Jun 2015 06:27:35 -0700 From: Stephen Hemminger To: "Liang, Cunming" Message-ID: <20150601062735.68cd9714@urahara> In-Reply-To: <556C1C41.6000107@intel.com> References: <1432198563-16334-1-git-send-email-cunming.liang@intel.com> <1432889125-20255-1-git-send-email-cunming.liang@intel.com> <1432889125-20255-13-git-send-email-cunming.liang@intel.com> <20150529082722.26b22923@urahara> <556C1C41.6000107@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v9 12/12] abi: fix v2.1 abi broken issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2015 13:27:35 -0000 On Mon, 1 Jun 2015 16:48:01 +0800 "Liang, Cunming" wrote: > Hi Stephen, > > On 5/29/2015 11:27 PM, Stephen Hemminger wrote: > > On Fri, 29 May 2015 16:45:25 +0800 > > Cunming Liang wrote: > > > >> +#ifdef RTE_EAL_RX_INTR > >> +extern int > >> rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data); > >> +#else > >> +static inline int > >> +rte_eth_dev_rx_intr_ctl(uint8_t port_id, int epfd, int op, void *data) > >> +{ > >> + RTE_SET_USED(port_id); > >> + RTE_SET_USED(epfd); > >> + RTE_SET_USED(op); > >> + RTE_SET_USED(data); > >> + return -1; > >> +} > >> +#endif > > Doing ABI compatibility is good but hard. > > > > I think it would be better not to provide the functions for rx_intr_ctl unless > > the feature was configured on. That way anyone using them with incorrect config > > would detect failure at build time, rather than run time. > I tend to not agree. For rx_intr_ctl/rx_intr_ctl_q, no matter w/ or w/o > RTE_EAL_RX_INTR, it's necessary to check the return value. > The failure return shall cause application give up using epoll waiting > on the specified epfd for the port, and then degraded to pure polling mode. > So I think these failure should be handled by the caller. It is always best to fail as early in the development process as possible. What possible benefit could there be from allowing application to be linked and run with incorrect configuration.