Re: [PATCH v2 1/4] lib/ether: optimize the 'rte_eth_tunnel_filter_conf' structure
From: Sun, Xutao <hidden>
Date: 2016-01-28 09:05:51
Hi, Thomas
-----Original Message----- From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] Sent: Thursday, January 28, 2016 4:22 PM To: Sun, Xutao <redacted> Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 1/4] lib/ether: optimize the 'rte_eth_tunnel_filter_conf' structure 2016-01-28 15:30, Xutao Sun:quoted
Change the fields of outer_mac and inner_mac from pointer to struct inorder to keep the code's readability. [...]quoted
- 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.quoted
--- 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).
I will remove the deprecation notice and update the release notes. Is it an ABI change instead of an API change? Thanks, Xutao