From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH 1/8] lpm: Fix pointer aliasing issues Date: Tue, 22 Mar 2016 21:02:43 +0100 Message-ID: <2437487.IsYEmueqI7@xps13> References: <1456426121-21423-1-git-send-email-aconole@redhat.com> <1456426121-21423-2-git-send-email-aconole@redhat.com> <20160225213054.GA14936@bricha3-MOBL3> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, Bruce Richardson To: Aaron Conole Return-path: Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by dpdk.org (Postfix) with ESMTP id 0F7BD2BB4 for ; Tue, 22 Mar 2016 21:04:24 +0100 (CET) Received: by mail-wm0-f51.google.com with SMTP id r129so109103581wmr.1 for ; Tue, 22 Mar 2016 13:04:24 -0700 (PDT) In-Reply-To: <20160225213054.GA14936@bricha3-MOBL3> 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" 2016-02-25 21:30, Bruce Richardson: > On Thu, Feb 25, 2016 at 01:48:34PM -0500, Aaron Conole wrote: > > /** > > + * Convert from tbl_entry types to integer types > > + */ > > +static inline uint16_t > > +rte_lpm_tbl24_entry_to_uint16(const struct rte_lpm_tbl24_entry *entry) > > +{ > > + union { > > + uint16_t i; > > + struct rte_lpm_tbl24_entry s; > > + } tbl_entry_u; > > + > > + tbl_entry_u.s = *entry; > > + return tbl_entry_u.i; > > +} > > + > > +static inline uint16_t > > +rte_lpm_tbl8_entry_to_uint16(const struct rte_lpm_tbl8_entry *entry) > > +{ > > + union { > > + uint16_t i; > > + struct rte_lpm_tbl8_entry s; > > + } tbl_entry_u; > > + > > + tbl_entry_u.s = *entry; > > + return tbl_entry_u.i; > > +} > > + > > These two new functions could be reduced to one with the help of patch: > http://dpdk.org/dev/patchwork/patch/9087/ Aaron, any news about a rework of this patch?