From owner-freebsd-net@freebsd.org Thu May 13 11:58:52 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 AB42E63C27C for ; Thu, 13 May 2021 11:58:52 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) (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 4Fgqtz5KnJz4n8H; Thu, 13 May 2021 11:58:51 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: by mail-ed1-x52a.google.com with SMTP id b17so30684404ede.0; Thu, 13 May 2021 04:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Ywv1Rqw3VSjLtgbUWw/lTgFlT4PkG2YbLOsX6YU5KAY=; b=tQCHhb1Yhn67h5yfaAkIt7fgAjWURoTtwlvn70CKf4rkfU8UiBKo3dPxKegKjmTBBj N02u/3ArTeA/TZGtexUIcWAh+5u/ERkMWfN49dyA1mPqi9712Wf/mSfzJYJGgcboMUbP knePTMg1E6M35eSHuUplriApdQ+Pk1fmVequPJ0VqQuJlh8N0dQdl2IjttaRWLIkj+M1 6hY3LoKfIu6lVkGfY2QuTfRtvQFnPzXnYFQbLO7sz0u9AsGqJ3jGdVwlQLJCHYvs9DXH Eu0Z5yhP2NLLRGyid8kqiWA0WRvC3hNNaUw9SyGm8Ct8zKPgyypAVbGrNKDu7CJQcEKA o1fw== 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=Ywv1Rqw3VSjLtgbUWw/lTgFlT4PkG2YbLOsX6YU5KAY=; b=pdaLNbjb/kNcBelPMPuN3muRWztDWQlYI/VUIxwOi8mynLVpNgg1B4E84aKlIFAgbU pKmE3MmJABuMAHikEdHBm3KZh1OuogIYQn5CE2O07XWlvwJwrp14YycaeDV9qqVyU+TU 3klow1X5VArUAGr72pEQY2BW6unpBB9V0L5dx3mJiw2sU01C2YXHBXP1zWsA+HhRMJtX KGiVLkej+4wHCsRv2wVdtOOnSwGUjeSpNG38P98F/x12ctsbKtnGiejgpDoH2W8rRCqQ 7B6QzoHcrxF+oCy1rmiCHocUhSfeNzZXpsqyqmuDwwNBQ5Ihi0BbAN7OaF39NKnyCIHX MutA== X-Gm-Message-State: AOAM532vMg3KojA0NAhSVAS6LMjtHgN8tlFRIBy1gMuMTASVKVdMR33R tHlp4yx7hbJtYZSk6jjkbAk0Ep5b3hWhHt4QUx+3IEk4 X-Google-Smtp-Source: ABdhPJyVAtEoFkU3WVHwGwh5TIcAQMruV2ZI9lKgfjDskRHXCvqbA+uPzseujOAQuumFXs1SXCwmrCe5Q7NBbJIxNPA= X-Received: by 2002:a05:6402:46:: with SMTP id f6mr50037141edu.252.1620907130192; Thu, 13 May 2021 04:58:50 -0700 (PDT) MIME-Version: 1.0 References: <91e21d18a4214af4898dd09f11144493@EX16-05.ad.unipi.it> In-Reply-To: From: Jacques Fourie Date: Thu, 13 May 2021 07:58:39 -0400 Message-ID: Subject: Re: Vector Packet Processing (VPP) portability on FreeBSD To: Francois ten Krooden Cc: Luigi Rizzo , Vincenzo Maffione , "freebsd-net@freebsd.org" X-Rspamd-Queue-Id: 4Fgqtz5KnJz4n8H X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=tQCHhb1Y; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of jacquesfourie@gmail.com designates 2a00:1450:4864:20::52a as permitted sender) smtp.mailfrom=jacquesfourie@gmail.com X-Spamd-Result: default: False [-3.33 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.33)[-0.332]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::52a:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::52a:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::52a:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-net] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 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:58:52 -0000 On Thu, May 13, 2021 at 7:27 AM Francois ten Krooden wrote: > > On Thursday, 13 May 2021 13:05 Luigi Rizzo wrote: > > > > 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. > > Thank you. I did set this to 1 specifically now and it still works. So > then it should be running in native mode. > > I will dig a bit into the function that processes the incoming packets. > The code I currently use was added to VPP in somewhere before 2016, so it > might be that there is a bug in that code. > > Will try and see if I can find anything interesting there. > > > > > cheers > > luigi > > > A couple of questions / suggestions: Will it be possible to test using the netmap bridge app or a vale switch instead of vpp? Did you verify that the TREX setup can perform at line rate when connected back to back? Which NICs are you using? > > > Important Notice: > > This e-mail and its contents are subject to the Nanoteq (Pty) Ltd e-mail > legal notice available at: > http://www.nanoteq.com/AboutUs/EmailDisclaimer.aspx > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >