net/i40e: fix ARM big endian build
This patch fixes the following error observed when compiling with ARM BE compiler. i40e_ethdev.c: In function ‘i40e_dev_tunnel_filter_set’: i40e_ethdev.c:6988:5: error: lvalue required as unary ‘&’ operand &rte_cpu_to_le_32(ipv4_addr), Fixes: edc845bd53ec ("app/testpmd: fix build on FreeBSD") Cc: stable@dpdk.org Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com> Acked-by: Beilei Xing <beilei.xing@intel.com>
This commit is contained in:
parent
0d941d16d3
commit
80c557be08
@ -6922,7 +6922,7 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
|
||||
uint8_t add)
|
||||
{
|
||||
uint16_t ip_type;
|
||||
uint32_t ipv4_addr;
|
||||
uint32_t ipv4_addr, ipv4_addr_le;
|
||||
uint8_t i, tun_type = 0;
|
||||
/* internal varialbe to convert ipv6 byte order */
|
||||
uint32_t convert_ipv6[4];
|
||||
@ -6955,8 +6955,9 @@ i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
|
||||
if (tunnel_filter->ip_type == RTE_TUNNEL_IPTYPE_IPV4) {
|
||||
ip_type = I40E_AQC_ADD_CLOUD_FLAGS_IPV4;
|
||||
ipv4_addr = rte_be_to_cpu_32(tunnel_filter->ip_addr.ipv4_addr);
|
||||
ipv4_addr_le = rte_cpu_to_le_32(ipv4_addr);
|
||||
rte_memcpy(&pfilter->element.ipaddr.v4.data,
|
||||
&rte_cpu_to_le_32(ipv4_addr),
|
||||
&ipv4_addr_le,
|
||||
sizeof(pfilter->element.ipaddr.v4.data));
|
||||
} else {
|
||||
ip_type = I40E_AQC_ADD_CLOUD_FLAGS_IPV6;
|
||||
@ -7273,7 +7274,7 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
|
||||
uint8_t add)
|
||||
{
|
||||
uint16_t ip_type;
|
||||
uint32_t ipv4_addr;
|
||||
uint32_t ipv4_addr, ipv4_addr_le;
|
||||
uint8_t i, tun_type = 0;
|
||||
/* internal variable to convert ipv6 byte order */
|
||||
uint32_t convert_ipv6[4];
|
||||
@ -7309,8 +7310,9 @@ i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
|
||||
if (tunnel_filter->ip_type == I40E_TUNNEL_IPTYPE_IPV4) {
|
||||
ip_type = I40E_AQC_ADD_CLOUD_FLAGS_IPV4;
|
||||
ipv4_addr = rte_be_to_cpu_32(tunnel_filter->ip_addr.ipv4_addr);
|
||||
ipv4_addr_le = rte_cpu_to_le_32(ipv4_addr);
|
||||
rte_memcpy(&pfilter->element.ipaddr.v4.data,
|
||||
&rte_cpu_to_le_32(ipv4_addr),
|
||||
&ipv4_addr_le,
|
||||
sizeof(pfilter->element.ipaddr.v4.data));
|
||||
} else {
|
||||
ip_type = I40E_AQC_ADD_CLOUD_FLAGS_IPV6;
|
||||
|
Loading…
x
Reference in New Issue
Block a user