From owner-freebsd-hackers@freebsd.org Tue May 26 05:32:42 2020 Return-Path: Delivered-To: freebsd-hackers@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 8F5462F1E04; Tue, 26 May 2020 05:32:42 +0000 (UTC) (envelope-from denis.sale@gmail.com) Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 49WMzs56gtz4Q72; Tue, 26 May 2020 05:32:41 +0000 (UTC) (envelope-from denis.sale@gmail.com) Received: by mail-lj1-f171.google.com with SMTP id w10so22998067ljo.0; Mon, 25 May 2020 22:32:41 -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:from:date:message-id:subject:to:cc; bh=R1htnne8u3x5p9iOBiA4EDnIJlD2W+SPE/+yoJoeOB4=; b=NyQIbPzWlKBeD1UcQG5b/2KTkA0ZLOUoqYJE6a4vVz1/Gjg2SoJWlYy4+ujXyjHZsV W5OX6tmi6WgCBk9M3uuqBtyWgMzNJCuHzSb8W1e2bfjAR+lBhPsiTAtNSBee2jgMgDuf +8V3hN076Zgev5es2gIZpRRMv5g6hNRZQtt0K0RpzTXkXXWYi8HzbUPFMiWtqdb5B/YJ jEfD24RlOfWjjEJpUxzUDHGs2N1Fd2wc8AlNjBPi+qdh8S/lxMGLxRjZWjf8bWlt5M8R QMaZTXOaNKPsv9RDGtRy4aCL54hkJvK354l62hhvYuXJ1PDEkmtH3uVU9AJiQzk+fIB6 RjaA== X-Gm-Message-State: AOAM532OGzG90hjUhUpNXIW75XE+qMUwlqz0fUSlgtrZ+RcH4QA1JhwW gYwoi4ulZJm4jVUx6jw733jTyVqqmwg= X-Google-Smtp-Source: ABdhPJzA/uLoS4ftXka3jOZz0YyYsWClC8Wln0n2ESEiJ/gz/ILz/YSa2Fowvk1qmj7LC1KU6YTmTw== X-Received: by 2002:a2e:1506:: with SMTP id s6mr4896591ljd.296.1590471159723; Mon, 25 May 2020 22:32:39 -0700 (PDT) Received: from mail-lj1-f174.google.com (mail-lj1-f174.google.com. [209.85.208.174]) by smtp.gmail.com with ESMTPSA id t5sm5678005lff.39.2020.05.25.22.32.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 May 2020 22:32:39 -0700 (PDT) Received: by mail-lj1-f174.google.com with SMTP id v16so22975479ljc.8; Mon, 25 May 2020 22:32:39 -0700 (PDT) X-Received: by 2002:a2e:740f:: with SMTP id p15mr7845504ljc.214.1590471159073; Mon, 25 May 2020 22:32:39 -0700 (PDT) MIME-Version: 1.0 From: Denis Salopek Date: Tue, 26 May 2020 07:32:34 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: cheating with iflib To: freebsd-net@freebsd.org Cc: freebsd-hackers@freebsd.org X-Rspamd-Queue-Id: 49WMzs56gtz4Q72 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of denissale@gmail.com designates 209.85.208.171 as permitted sender) smtp.mailfrom=denissale@gmail.com X-Spamd-Result: default: False [-2.35 / 15.00]; FROM_NEQ_ENVFROM(0.00)[denissal@freebsd.org,denissale@gmail.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; DMARC_NA(0.00)[freebsd.org]; NEURAL_HAM_LONG(-0.87)[-0.870]; RCVD_COUNT_THREE(0.00)[4]; NEURAL_HAM_MEDIUM(-0.98)[-0.979]; NEURAL_HAM_SHORT(-0.50)[-0.499]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.171:from]; FORGED_SENDER(0.30)[denissal@freebsd.org,denissale@gmail.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.171:from]; R_DKIM_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TAGGED_FROM(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 May 2020 05:32:42 -0000 Hi everyone. I want to write a driver for NetFPGA SUME. It's a network device with 4 physical 10G interfaces connected to the host with only one PCI endpoint. Upon loading, the existing SUME Linux driver allocates four netdevs, essentially creating four different 10G 'virtual' interfaces in the OS. It then multiplexes packets based on header meta-data generated by hardware. Using iflib, is a similar thing possible on FreeBSD: can I attach four separate interfaces (or instances of iflib) without modifying the SUME hardware and "cheat" it so all four use the same PCI device? Is iflib appropriate for this? Another question: performance-wise, how good are iflib drivers when compared to non-iflib ones? Has someone benchmarked, stress-tested or compared netmap rx/fwd on ix or ixl NICs on FreeBSD 11 vs newer? Thank you, Denis