[dpdk-dev] RES: RES: hw.nic_uio.bdfs

2014-04-17 Thread Thomas Monjalon
Hi Fred, 2014-03-26 04:22, Fred Pedrisa: > Here is my fix for probe code : > > static int > nic_uio_probe (device_t dev) > { > int i, len; > char *remaining; > long bus = 0, device = 0, function = 0; > remaining = bdf_str; > len = strlen(remaining); > >

[dpdk-dev] RES: RES: hw.nic_uio.bdfs

2014-03-26 Thread Fred Pedrisa
Hello, Here is my fix for probe code : static int nic_uio_probe (device_t dev) { int i, len; char *remaining; long bus = 0, device = 0, function = 0; remaining = bdf_str; len = strlen(remaining); for (i = 0; remaining && len >= 5 && i < len;i+=6) {

[dpdk-dev] RES: RES: hw.nic_uio.bdfs

2014-03-26 Thread Fred Pedrisa
Hello, Anyways, here is my proposition for this code : static void nic_uio_load(void) { char *remaining; long bus = 0, device = 0, function = 0; char bdf_str[1024]; int i, j, len; device_t dev; memset(bdf_str, 0, sizeof(bdf_str)); TUNABLE_S