From owner-freebsd-net@FreeBSD.ORG Thu Sep 11 18:13:36 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A677E486 for ; Thu, 11 Sep 2014 18:13:36 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 76E9591 for ; Thu, 11 Sep 2014 18:13:36 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id h18so3280143igc.15 for ; Thu, 11 Sep 2014 11:13:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=5rveQ2oPj39ACn1UWUzvAA/OWrDI9cgrI4GeA/mR8r8=; b=0UK0Ts41jfjHf4520LkbFkn2wOIfswqeoJkq0mbEASJjkHXnwuo0W1EjH8IbyPh9Y9 XQwnpuAF7BA2IWyON/Q0kYGilSDJPaT86m9atgQS7ITCt0m8nb6YDOB64Xct0ZI3Br96 8SngLroN1tJtZ6eJz+T6NMqimymfR6NJuwcgB9FVCpj4UWEg5rP23D1yXTswsgLOQdr9 y1YL3GSzRyVgxLz6aNsD7m6on9rLzQKpu2QKGyNMaswcm+O1UoysklH5gPcrzVuzvSRB iy91k4+SFtVM4Mvw0Aep0l5quIwqFlT88cJwqXkz3tM5XCXQcZUR3rrVXQX8BdxtchXg kdRQ== MIME-Version: 1.0 X-Received: by 10.43.136.134 with SMTP id ik6mr4151416icc.6.1410459215674; Thu, 11 Sep 2014 11:13:35 -0700 (PDT) Received: by 10.107.8.132 with HTTP; Thu, 11 Sep 2014 11:13:35 -0700 (PDT) Date: Thu, 11 Sep 2014 12:13:35 -0600 Message-ID: Subject: netmap and jumbo packets From: David To: "freebsd-net@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Sep 2014 18:13:36 -0000 Hi, I am learning to use netmap. Currently I got pkt-gen working (without drivers). When I try to set packet size above 2048 I got an error. Searching through the code I found in sys/dev/netmap/netmap_mem2.c the size constrain. I change it like this: diff --git a/sys/dev/netmap/netmap_mem2.c b/sys/dev/netmap/netmap_mem2.c index a15a8c7..8c561cb 100644 --- a/sys/dev/netmap/netmap_mem2.c +++ b/sys/dev/netmap/netmap_mem2.c @@ -25,6 +25,7 @@ #ifdef linux #include "bsd_glue.h" +#include #endif /* linux */ #ifdef __APPLE__ @@ -54,7 +55,7 @@ __FBSDID("$FreeBSD: head/sys/dev/netmap/netmap.c 241723 2012-1 #include #include "netmap_mem2.h" -#define NETMAP_BUF_MAX_NUM 20*4096*2 /* large machine */ +#define NETMAP_BUF_MAX_NUM 10*4096*2 /* large machine */ #define NETMAP_POOL_MAX_NAMSZ 32 @@ -183,7 +184,7 @@ struct netmap_obj_params netmap_params[NETMAP_POOLS_NR] =3D { .num =3D 200, }, [NETMAP_BUF_POOL] =3D { - .size =3D 2048, + .size =3D 8192, .num =3D NETMAP_BUF_MAX_NUM, }, }; (first change is not related) I had to change NETMAP_BUF_MAX_NUM because of the amount of memory needed. This way I can send packets as big as 8192 (which is what I need). Is there any problems this will bring on? (maybe decrease the performance or any other side effect) thanks --=20 David D=C3=ADaz Barquero Ingenier=C3=ADa en Computadores Tecnol=C3=B3gico de Costa Rica