[dpdk-dev] net/avp: fix build with non x86

Message ID 1491227915-9410-1-git-send-email-jerin.jacob@caviumnetworks.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Jerin Jacob April 3, 2017, 1:58 p.m. UTC
  sys/io.h is an x86 specific header file and
AVP driver is not using any x86 specific IO
operation. Hence removing the sys/io.h reference
to fix the build issue on non x86 platforms.

Fixes: 5567f9689cf8 ("net/avp: support driver registration")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
 drivers/net/avp/avp_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Ferruh Yigit April 3, 2017, 2:06 p.m. UTC | #1
On 4/3/2017 2:58 PM, Jerin Jacob wrote:
> sys/io.h is an x86 specific header file and
> AVP driver is not using any x86 specific IO
> operation. Hence removing the sys/io.h reference
> to fix the build issue on non x86 platforms.
> 
> Fixes: 5567f9689cf8 ("net/avp: support driver registration")
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

Squashed into relevant commit in next-net, thanks.
  
Allain Legacy April 3, 2017, 2:10 p.m. UTC | #2
> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Monday, April 03, 2017 9:59 AM
> To: dev@dpdk.org
> Cc: YIGIT, FERRUH; Legacy, Allain; Jerin Jacob
> Subject: [dpdk-dev] [PATCH] net/avp: fix build with non x86
> 
> sys/io.h is an x86 specific header file and AVP driver is not using any x86
> specific IO operation. Hence removing the sys/io.h reference to fix the build
> issue on non x86 platforms.
> 
> Fixes: 5567f9689cf8 ("net/avp: support driver registration")
> 
> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>

In addition to this, since we do not support AVP devices on anything but x86_64 perhaps it would be appropriate to avoid compilation altogether on other architectures.  That is, by disabling CONFIG_RTE_LIBRTE_AVP_PMD by default and only enabling for x86_64 on icc/gcc/clang for linuxapp?

Allain

Allain Legacy, Software Developer, Wind River
direct 613.270.2279 fax: 613.492.7870 skype: allain.legacy
350 Terry Fox Drive, Suite 200, Ottawa, Ontario, K2K 2W5
  
Jerin Jacob April 3, 2017, 2:22 p.m. UTC | #3
On Mon, Apr 03, 2017 at 02:10:41PM +0000, Legacy, Allain wrote:
> > -----Original Message-----
> > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> > Sent: Monday, April 03, 2017 9:59 AM
> > To: dev@dpdk.org
> > Cc: YIGIT, FERRUH; Legacy, Allain; Jerin Jacob
> > Subject: [dpdk-dev] [PATCH] net/avp: fix build with non x86
> > 
> > sys/io.h is an x86 specific header file and AVP driver is not using any x86
> > specific IO operation. Hence removing the sys/io.h reference to fix the build
> > issue on non x86 platforms.
> > 
> > Fixes: 5567f9689cf8 ("net/avp: support driver registration")
> > 
> > Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> 
> In addition to this, since we do not support AVP devices on anything but x86_64 perhaps it would be appropriate to avoid compilation altogether on other architectures.  That is, by disabling CONFIG_RTE_LIBRTE_AVP_PMD by default and only enabling for x86_64 on icc/gcc/clang for linuxapp?

If that is the case then Please send a patch to fix it appropriately.

> 
> Allain
> 
> Allain Legacy, Software Developer, Wind River
> direct 613.270.2279 fax: 613.492.7870 skype: allain.legacy
> 350 Terry Fox Drive, Suite 200, Ottawa, Ontario, K2K 2W5
> 
> 
> 
>
  
Ferruh Yigit April 3, 2017, 2:23 p.m. UTC | #4
On 4/3/2017 3:22 PM, Jerin Jacob wrote:
> On Mon, Apr 03, 2017 at 02:10:41PM +0000, Legacy, Allain wrote:
>>> -----Original Message-----
>>> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
>>> Sent: Monday, April 03, 2017 9:59 AM
>>> To: dev@dpdk.org
>>> Cc: YIGIT, FERRUH; Legacy, Allain; Jerin Jacob
>>> Subject: [dpdk-dev] [PATCH] net/avp: fix build with non x86
>>>
>>> sys/io.h is an x86 specific header file and AVP driver is not using any x86
>>> specific IO operation. Hence removing the sys/io.h reference to fix the build
>>> issue on non x86 platforms.
>>>
>>> Fixes: 5567f9689cf8 ("net/avp: support driver registration")
>>>
>>> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
>>
>> In addition to this, since we do not support AVP devices on anything but x86_64 perhaps it would be appropriate to avoid compilation altogether on other architectures.  That is, by disabling CONFIG_RTE_LIBRTE_AVP_PMD by default and only enabling for x86_64 on icc/gcc/clang for linuxapp?
> 
> If that is the case then Please send a patch to fix it appropriately.

+1
  
Allain Legacy April 3, 2017, 3:47 p.m. UTC | #5
> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Monday, April 03, 2017 10:22 AM
<...>
> 
> If that is the case then Please send a patch to fix it appropriately.

Will do, thanks for fixing this error.
  

Patch

diff --git a/drivers/net/avp/avp_ethdev.c b/drivers/net/avp/avp_ethdev.c
index 23a59c1..989152e 100644
--- a/drivers/net/avp/avp_ethdev.c
+++ b/drivers/net/avp/avp_ethdev.c
@@ -35,7 +35,6 @@ 
 #include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
-#include <sys/io.h>
 
 #include <rte_ethdev.h>
 #include <rte_memcpy.h>