From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2 1/4] lib/ether: optimize the 'rte_eth_tunnel_filter_conf' structure Date: Thu, 28 Jan 2016 09:21:54 +0100 Message-ID: <5550736.IEy5vK2CRV@xps13> References: <1453706722-29427-1-git-send-email-xutao.sun@intel.com> <1453966217-10510-1-git-send-email-xutao.sun@intel.com> <1453966217-10510-2-git-send-email-xutao.sun@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Xutao Sun Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 47909C386 for ; Thu, 28 Jan 2016 09:23:05 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id l66so14405775wml.0 for ; Thu, 28 Jan 2016 00:23:05 -0800 (PST) In-Reply-To: <1453966217-10510-2-git-send-email-xutao.sun@intel.com> 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-01-28 15:30, Xutao Sun: > Change the fields of outer_mac and inner_mac from pointer to struct in order to keep the code's readability. [...] > - tunnel_filter_conf.outer_mac = &res->outer_mac; > - tunnel_filter_conf.inner_mac = &res->inner_mac; > + (void)rte_memcpy(&tunnel_filter_conf.outer_mac, &res->outer_mac, > + ETHER_ADDR_LEN); > + (void)rte_memcpy(&tunnel_filter_conf.inner_mac, &res->inner_mac, > + ETHER_ADDR_LEN); The (void) casting is useless here. > --- a/lib/librte_ether/rte_eth_ctrl.h > +++ b/lib/librte_ether/rte_eth_ctrl.h > @@ -280,8 +280,8 @@ enum rte_tunnel_iptype { > * Tunneling Packet filter configuration. > */ > struct rte_eth_tunnel_filter_conf { > - struct ether_addr *outer_mac; /**< Outer MAC address filter. */ > - struct ether_addr *inner_mac; /**< Inner MAC address filter. */ > + struct ether_addr outer_mac; /**< Outer MAC address filter. */ > + struct ether_addr inner_mac; /**< Inner MAC address filter. */ It is an API change. Please remove the deprecation notice and update the release notes in this patch (atomically).