From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <nhorman@tuxdriver.com>
Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58])
 by dpdk.org (Postfix) with ESMTP id 8EEB24F9A
 for <dev@dpdk.org>; Wed, 21 Mar 2018 14:04:59 +0100 (CET)
Received: from cpe-2606-a000-111b-40b7-640c-26a-4e16-9225.dyn6.twc.com
 ([2606:a000:111b:40b7:640c:26a:4e16:9225] helo=localhost)
 by smtp.tuxdriver.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63)
 (envelope-from <nhorman@tuxdriver.com>)
 id 1eydPu-0006Sh-IN; Wed, 21 Mar 2018 09:04:51 -0400
Date: Wed, 21 Mar 2018 09:04:01 -0400
From: Neil Horman <nhorman@tuxdriver.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>
Cc: John McNamara <john.mcnamara@intel.com>,
 Marko Kovacevic <marko.kovacevic@intel.com>,
 Thomas Monjalon <thomas@monjalon.net>,
 Reshma Pattan <reshma.pattan@intel.com>, dev@dpdk.org
Message-ID: <20180321130401.GA3225@hmswarspite.think-freely.org>
References: <20180309112531.292163-1-ferruh.yigit@intel.com>
 <20180320163404.7780-1-ferruh.yigit@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20180320163404.7780-1-ferruh.yigit@intel.com>
User-Agent: Mutt/1.9.2 (2017-12-15)
X-Spam-Score: -2.9 (--)
X-Spam-Status: No
Subject: Re: [dpdk-dev] [PATCH v5] ethdev: return named opaque type instead
 of void pointer
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Mar 2018 13:05:00 -0000

On Tue, Mar 20, 2018 at 04:34:04PM +0000, Ferruh Yigit wrote:
> "struct rte_eth_rxtx_callback" is defined as internal data structure and
> used as named opaque type.
> 
> So the functions that are adding callbacks can return objects in this
> type instead of void pointer.
> 
> Also const qualifier added to "struct rte_eth_rxtx_callback *" to
> protect it better from application modification.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
> v2:
> * keep using struct * in parameters, instead add callback functions
> return struct rte_eth_rxtx_callback pointer.
> 
> v4:
> * Remove deprecation notice. LIBABIVER already increased in this release
> 
> v5:
> * add const qualifier to rte_eth_rxtx_callback
I still wish we could find a way to remove the inline functions and truly
protect that struct, but a const is definately better than nothing

Acked-by: Neil Horman <nhorman@tuxdriver.com>