From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Liang, Cunming" Subject: Re: [PATCH v9 12/12] abi: fix v2.1 abi broken issue Date: Mon, 01 Jun 2015 16:48:01 +0800 Message-ID: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit To: Stephen Hemminger , dev@dpdk.org Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 57CA25693 for ; Mon, 1 Jun 2015 10:48:05 +0200 (CEST) In-Reply-To: <20150529082722.26b22923@urahara> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. > > Also, doesn't some doc file have to be updated for the announcement? Yes, the ABI section in release note (doc/guides/rel_notes/abi.rst) shall update for the announcement.