From owner-freebsd-net@freebsd.org Thu May 13 11:04:45 2021 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B31963ABCC for ; Thu, 13 May 2021 11:04:45 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: from mail-vk1-f174.google.com (mail-vk1-f174.google.com [209.85.221.174]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FgphX2T90z4kR4; Thu, 13 May 2021 11:04:44 +0000 (UTC) (envelope-from rizzo.unipi@gmail.com) Received: by mail-vk1-f174.google.com with SMTP id n74so5350592vkc.6; Thu, 13 May 2021 04:04:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ikyGWEZedCeoB3schJHbJfaXqOAm/f+McEl/1vRUMp4=; b=VcK99LrSjIMvBGMg8qH4mW42nYxy6+5bjYp5tcOhiyt/CTdxraFTAWGyMtvEP87U21 Y0qbcoLiAGGAtH6+mxfd4MGrcmwlOd5OaPCekU7j/DiUCb9HxjMSYgZnC+TSbYsMH2ER IzjiAF2b5e5Tc2zpfV0F0yApFOreR96yRdTyXiYa9kv7Z+iLLEdJtsHZZ2DR8Hiu6gbX r/m2BnvyRl18WrTmsOlclt4BUeVcexo19tAlB//tvff2I3vcNxRXgIKA27hlag6xufbS e/36j4QppnoRfbn5tEE3paOoVqDztxlZ7QoxOk6uIHuBZ+NuqM0Gs/zk/xhPxtHzB6m3 iUvA== X-Gm-Message-State: AOAM5338RieymA+nCP/hbC0ydneYP0MtnwT+aizxc/2aNsu2mKWwe5HA kZkJAjb/Bro53oJfkLHTXSnyJc2WuK4bUPhxLjnJtOHpz8AlMg== X-Google-Smtp-Source: ABdhPJzxc1QpPSUqPpPF5niExc0n0Tu/KhXRca9+X01DxXOgjj+DcR7VHq3xWqeQOXo/zNTtDfWOb5yAa0ubfe6ngeU= X-Received: by 2002:a1f:280e:: with SMTP id o14mr19377402vko.19.1620903883025; Thu, 13 May 2021 04:04:43 -0700 (PDT) MIME-Version: 1.0 References: <91e21d18a4214af4898dd09f11144493@EX16-05.ad.unipi.it> In-Reply-To: From: Luigi Rizzo Date: Thu, 13 May 2021 13:04:31 +0200 Message-ID: Subject: Re: Vector Packet Processing (VPP) portability on FreeBSD To: Francois ten Krooden , Vincenzo Maffione Cc: Luigi Rizzo , "freebsd-net@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4FgphX2T90z4kR4 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rizzounipi@gmail.com designates 209.85.221.174 as permitted sender) smtp.mailfrom=rizzounipi@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FORGED_SENDER(0.30)[rizzo@iet.unipi.it,rizzounipi@gmail.com]; MIME_TRACE(0.00)[0:+]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FROM_NEQ_ENVFROM(0.00)[rizzo@iet.unipi.it,rizzounipi@gmail.com]; RBL_DBL_DONT_QUERY_IPS(0.00)[209.85.221.174:from]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; TAGGED_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[unipi.it]; SPAMHAUS_ZRD(0.00)[209.85.221.174:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.174:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.174:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-net] X-Mailman-Approved-At: Thu, 13 May 2021 17:30:03 +0000 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.34 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, 13 May 2021 11:04:45 -0000 On Thu, May 13, 2021 at 10:42 AM Francois ten Krooden wrote: > > Hi > > Just for info I ran a test using TREX (https://trex-tgn.cisco.com/) > Where I just sent traffic in one direction through the box running FreeBSD with VPP using the netmap interfaces. > These were the results we found before significant packet loss started occuring. > +-------------+------------------+ > | Packet Size | Throughput (pps) | > +-------------+------------------+ > | 64 bytes | 1.008 Mpps | > | 128 bytes | 920.311 kpps | > | 256 bytes | 797.789 kpps | > | 512 bytes | 706.338 kpps | > | 1024 bytes | 621.963 kpps | > | 1280 bytes | 569.140 kpps | > | 1440 bytes | 547.139 kpps | > | 1518 bytes | 524.864 kpps | > +-------------+------------------+ Those numbers are way too low for netmap. I believe you are either using the emulated mode, or issuing a system call on every single packet. I am not up to date (Vincenzo may know better) but there used to be a sysctl variable to control the operating mode: https://www.freebsd.org/cgi/man.cgi?query=netmap&sektion=4 SYSCTL VARIABLES AND MODULE PARAMETERS Some aspects of the operation of netmap and VALE are controlled through sysctl variables on FreeBSD (dev.netmap.*) and module parameters on Linux (/sys/module/netmap/parameters/*): dev.netmap.admode: 0 Controls the use of native or emulated adapter mode. 0 uses the best available option; 1 forces native mode and fails if not available; 2 forces emulated hence never fails. If it still exists, try set it to 1. If the program fails, then you should figure out why native netmap support is not compiled in. cheers luigi