> On 25 Jul 2018, at 17:11, Maxim Uvarov <maxim.uva...@linaro.org> wrote:
> 
> For quick look it looks like mtu is not set correctly on open(). Can you try 
> this patch:
> 
> diff --git a/platform/linux-generic/pktio/netmap.c 
> b/platform/linux-generic/pktio/netmap.c
> index 0da2b7a..d4db0af 100644
> --- a/platform/linux-generic/pktio/netmap.c
> +++ b/platform/linux-generic/pktio/netmap.c
> @@ -539,6 +539,7 @@ static int netmap_open(odp_pktio_t id ODP_UNUSED, 
> pktio_entry_t *pktio_entry,
>                 goto error;
>         }
>         pkt_nm->mtu = (mtu < buf_size) ? mtu : buf_size;
> +       pkt_priv(pktio_entry)->mtu = pkt_nm->mtu;


pkt_netmap_t *pkt_nm = pkt_priv(pktio_entry), so this is unnecessary.


>> 
>> 
>> Is this a know issue or am i missing something?
>> 


As far as I can see the problem is caused by reading interface MTU incorrectly 
or netmap using unusually small buffers (assuming moongen sends packets smaller 
than MTU). The following patch should help debug the issue.

-Matias

diff --git a/platform/linux-generic/pktio/netmap.c 
b/platform/linux-generic/pktio/netmap.c
index 0da2b7afd..3e0a17542 100644
--- a/platform/linux-generic/pktio/netmap.c
+++ b/platform/linux-generic/pktio/netmap.c
@@ -538,6 +538,10 @@ static int netmap_open(odp_pktio_t id ODP_UNUSED, 
pktio_entry_t *pktio_entry,
                ODP_ERR("Unable to read interface MTU\n");
                goto error;
        }
+
+       ODP_DBG("MTU:         %" PRIu32 "\n", mtu);
+       ODP_DBG("NM buf_size: %" PRIu32 "\n", buf_size);
+
        pkt_nm->mtu = (mtu < buf_size) ? mtu : buf_size;
 
        /* Check if RSS is supported. If not, set 'max_input_queues' to 1. */


Reply via email to