Re: [lng-odp] [PATCH 2/2] linux-generic: netmap: sync tx queues

2015-10-12 Thread Stuart Haslam
On Fri, Oct 09, 2015 at 04:04:28PM +0300, Matias Elo wrote:
> Sync tx queues to recover from overload. Previously send
> could get permanently stuck here.
> 

I'm not able to get netmap pktio working reliably, receive side seems
fine (I can get about 10Mpps) but transmit side is very flaky, though
this patch improved things a bit.

My setup is that I have two 10G ports (ixgbe, 82599ES) directly connected
with an external loopback cable. Running two netmap pkt-gen instances
(tx and rx mode) expected at 14.88Mpps.

I tried running the pktio validation tests on the same ports;

ODP_PKTIO_IF0=eth4 ODP_PKTIO_IF1=eth5 ./test/validation/pktio/pktio_main

But it always fails on the packet tx/rx tests - tx is reported as being
successful (odp_pktio_send() and therefore nm_inject() report success)
but nothing is received. If I set ODP_PKTIO_NETMAP_DISABLE then the same
test works reliably.

I've also tried odp_generator (reports packets being sent but AFAICT
nothing appears on the wire) and odp_pktio_perf (failed completely
before this patch, now does work but is slow and reports a lot of
nm_inject() failures early on). I wonder if the problems are to do with
how long it takes the interface to come up?.. I get a bunch of messages
in dmesg during nm_open() and they take a good few seconds to settle
down and state that "NIC Link is Up at 10 Gbps".

Note that I've just realised I'm using a different version of netmap to
what's documented in the DEPENDENCIES. I'm using HEAD of
https://github.com/luigirizzo/netmap/ - because v11.1 didn't seem to
want to build against my kernel (3.19 from Ubuntu 15.04) and there are
no more recent tags.

> Signed-off-by: Matias Elo 
> ---
>  platform/linux-generic/pktio/netmap.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/platform/linux-generic/pktio/netmap.c 
> b/platform/linux-generic/pktio/netmap.c
> index 19dc697..ab4667e 100644
> --- a/platform/linux-generic/pktio/netmap.c
> +++ b/platform/linux-generic/pktio/netmap.c
> @@ -240,8 +240,10 @@ static int netmap_send(pktio_entry_t *pktio_entry, 
> odp_packet_t pkt_table[],
>   else
>   break;
>   }
> - if (odp_unlikely(i == NM_INJECT_RETRIES))
> + if (odp_unlikely(i == NM_INJECT_RETRIES)) {
> + ioctl(nm_desc->fd, NIOCTXSYNC, NULL);
>   break;
> + }
>   }
>   for (i = 0; i < nb_tx; i++)
>   odp_packet_free(pkt_table[i]);
> -- 
> 1.9.1
> 
___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp


[lng-odp] [PATCH 2/2] linux-generic: netmap: sync tx queues

2015-10-09 Thread Matias Elo
Sync tx queues to recover from overload. Previously send
could get permanently stuck here.

Signed-off-by: Matias Elo 
---
 platform/linux-generic/pktio/netmap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/platform/linux-generic/pktio/netmap.c 
b/platform/linux-generic/pktio/netmap.c
index 19dc697..ab4667e 100644
--- a/platform/linux-generic/pktio/netmap.c
+++ b/platform/linux-generic/pktio/netmap.c
@@ -240,8 +240,10 @@ static int netmap_send(pktio_entry_t *pktio_entry, 
odp_packet_t pkt_table[],
else
break;
}
-   if (odp_unlikely(i == NM_INJECT_RETRIES))
+   if (odp_unlikely(i == NM_INJECT_RETRIES)) {
+   ioctl(nm_desc->fd, NIOCTXSYNC, NULL);
break;
+   }
}
for (i = 0; i < nb_tx; i++)
odp_packet_free(pkt_table[i]);
-- 
1.9.1

___
lng-odp mailing list
lng-odp@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/lng-odp