SHA256
1
0
forked from pool/dpdk
dpdk/0001-enic-fix-Type-punning-and-strict-aliasing-warning.patch
Ismail Dönmez 2d571212a5 Accepting request 390534 from home:markoschandras:network
I want to maintain dpdk in Factory and would like to use network as the devel project.

OBS-URL: https://build.opensuse.org/request/show/390534
OBS-URL: https://build.opensuse.org/package/show/network/dpdk?expand=0&rev=1
2016-04-26 09:01:32 +00:00

37 lines
1.1 KiB
Diff

From 8b7d703c5d892060c663697c74e30e2ee91362a8 Mon Sep 17 00:00:00 2001
From: Nirmoy Das <ndas@suse.de>
Date: Mon, 11 Apr 2016 15:01:06 +0200
Subject: [PATCH 1/2] enic: fix "Type-punning and strict-aliasing" warning
Inspired by http://pkgs.fedoraproject.org/cgit/rpms/dpdk.git/tree/dpdk-2.2-punning.patch
---
drivers/net/enic/enic_ethdev.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/net/enic/enic_ethdev.c b/drivers/net/enic/enic_ethdev.c
index 6bea940..d0214b6 100644
--- a/drivers/net/enic/enic_ethdev.c
+++ b/drivers/net/enic/enic_ethdev.c
@@ -372,13 +372,15 @@ static void enicpmd_dev_stop(struct rte_eth_dev *eth_dev)
{
struct rte_eth_link link;
struct enic *enic = pmd_priv(eth_dev);
+ uint64_t *dev_link_ptr = (uint64_t *)&eth_dev->data->dev_link;
+ uint64_t *link_ptr = (uint64_t *)&link;
ENICPMD_FUNC_TRACE();
enic_disable(enic);
memset(&link, 0, sizeof(link));
- rte_atomic64_cmpset((uint64_t *)&eth_dev->data->dev_link,
- *(uint64_t *)&eth_dev->data->dev_link,
- *(uint64_t *)&link);
+ rte_atomic64_cmpset(dev_link_ptr,
+ *dev_link_ptr,
+ *link_ptr);
}
/*
--
2.6.2