Skip to contentSkip to conversation

qemu_mips: Fix CONFIG_NET_MULTI build warning

PATCH New Shinya Kuribayashi 2 participants 3 messages Oct 19, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu_mips: Fix CONFIG_NET_MULTI build warning

eth.c:497:2: warning: #warning Ethernet driver is deprecated. Please update to use CONFIG_NET_MULTI

---

I have a few concerns about this fix:

First. I'm not sure why CONFIG_NET_MULTI is "undef"ed for qemu_mips, while CONFIG_DRIVER_NE2000 has been enabled for qemu_mips at an early stage.

I don't follow recent changes around eth.c and CONFIG_NET_MULTI, but it's probably CONFIG_NET_MULTI used to be used strictly for multi ports, isn't it?

Next. As far as looking at drivers/net/ne2000*.[ch], NE2000 driver doesn't seem to require board_eth_init() or cpu_eth_init(). Right? Therefore I've not added a corresponding hook in board/qemu_mips/ qemu_mips.c. If my understanding is wrong, please let me know.

 include/configs/qemu-mips.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/qemu-mips.h +1 -1
index cbacdf9..f419174 100644
@@ -157,7 +157,7 @@
 
 #define CONFIG_ENV_OVERWRITE	1
 
-#undef CONFIG_NET_MULTI
+#define CONFIG_NET_MULTI
 
 #define MEM_SIZE		128
 
Signature · 1 line
1.6.5.1
#1 lore raw

PATCH 1/1 qemu_mips: Fix CONFIG_NET_MULTI build warning

Hi Shinya,

Quoted 7 lines · Shinya Kuribayashi

eth.c:497:2: warning: #warning Ethernet driver is deprecated. Please update to use CONFIG_NET_MULTI

---

I have a few concerns about this fix:

Quoted 9 lines

First. I'm not sure why CONFIG_NET_MULTI is "undef"ed for qemu_mips, while CONFIG_DRIVER_NE2000 has been enabled for qemu_mips at an early stage.

I don't follow recent changes around eth.c and CONFIG_NET_MULTI, but it's probably CONFIG_NET_MULTI used to be used strictly for multi ports, isn't it?

Currently, there are two incompatible networking APIs. One that uses CONFIG_NET_MULTI, and one that doesn't. I'm trying to move everything towards the former (single-port applications are of course a degenerate instance of multi-port ones). Once all drivers have been ported to the MULTI API, that config option will magically disappear.

Quoted 6 lines

Next. As far as looking at drivers/net/ne2000*.[ch], NE2000 driver doesn't seem to require board_eth_init() or cpu_eth_init(). Right? Therefore I've not added a corresponding hook in board/qemu_mips/ qemu_mips.c. If my understanding is wrong, please let me know.

The NE2000 driver hasn't been ported yet. It's on my short term to-do list, and will be in the next release (01.2010, I guess?)

Quoted 8 lines
 include/configs/qemu-mips.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/configs/qemu-mips.h +0 -0
index cbacdf9..f419174 100644

include/configs/qemu-mips.h line 162

Quoted 7 lines
include/configs/qemu-mips.h +1 -1
@@ -157,7 +157,7 @@
 
 #define CONFIG_ENV_OVERWRITE	1
 
-#undef CONFIG_NET_MULTI
+#define CONFIG_NET_MULTI
 
 

This won't do anything other than disabling networking. Since QEMU is an emulator, though, maybe it would make sense to use a device driver that has CONFIG_NET_MULTI support?

include/configs/qemu-mips.h line 162

Quoted 3 lines
include/configs/qemu-mips.h +0 -0
 #define MEM_SIZE		128

If the warning isn't more than a nuisance, please live with it for now.

regards,
Ben

#2 lore raw

PATCH 1/1 qemu_mips: Fix CONFIG_NET_MULTI build warning

Hi Ben,

Quoted 9 lines · Ben Warren
Quoted 8 lines · Shinya Kuribayashi

First. I'm not sure why CONFIG_NET_MULTI is "undef"ed for qemu_mips, while CONFIG_DRIVER_NE2000 has been enabled for qemu_mips at an early stage.

I don't follow recent changes around eth.c and CONFIG_NET_MULTI, but it's probably CONFIG_NET_MULTI used to be used strictly for multi ports, isn't it?

Quoted 5 lines

Currently, there are two incompatible networking APIs. One that uses CONFIG_NET_MULTI, and one that doesn't. I'm trying to move everything towards the former (single-port applications are of course a degenerate instance of multi-port ones). Once all drivers have been ported to the MULTI API, that config option will magically disappear.

Thanks, got it.

Quoted 7 lines
Quoted 5 lines

Next. As far as looking at drivers/net/ne2000*.[ch], NE2000 driver doesn't seem to require board_eth_init() or cpu_eth_init(). Right? Therefore I've not added a corresponding hook in board/qemu_mips/ qemu_mips.c. If my understanding is wrong, please let me know.

The NE2000 driver hasn't been ported yet. It's on my short term to-do list, and will be in the next release (01.2010, I guess?)

So CONFIG_NE2000_DRIVER needs some work, and is not ready for migration. I missed that point, thanks for clarification.

Quoted 11 lines

include/configs/qemu-mips.h line 162

Quoted 8 lines
include/configs/qemu-mips.h +1 -1
@@ -157,7 +157,7 @@
 
 #define CONFIG_ENV_OVERWRITE    1
 
-#undef CONFIG_NET_MULTI
+#define CONFIG_NET_MULTI
 
 

This won't do anything other than disabling networking. Since QEMU is an emulator, though, maybe it would make sense to use a device driver that has CONFIG_NET_MULTI support?

Who knows? It's hard, at least for me, to say. But it'd be better to port NE2000 driver into an appropriate shape whether it's used by QEMU or not.

Quoted 4 lines

include/configs/qemu-mips.h line 162

Quoted 3 lines
include/configs/qemu-mips.h +0 -0
 #define MEM_SIZE        128

If the warning isn't more than a nuisance, please live with it for now.

No problem. Please ignore the patch.

Thanks,

Shinya