From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f45.google.com (mail-pg0-f45.google.com [74.125.83.45]) by dpdk.org (Postfix) with ESMTP id 72AC85699 for ; Fri, 11 Aug 2017 17:28:37 +0200 (CEST) Received: by mail-pg0-f45.google.com with SMTP id y129so16793886pgy.4 for ; Fri, 11 Aug 2017 08:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8TfBKOfaVpqt5R4nkVzJFZ138nLy5SdLdRh90lzqau8=; b=fGyQ7f3iwe3EBTDdSq4VQ8SKmacXPwhnca+Kf5YRALuy8MpTzmBZCNvhR5N6NyAvZV 6YdBWFdsdTAsiH662FfjNbpBqAhhaiGVfNls8aUi2WK8fYFRLspXmECBPz/AyZ9IQYhd TsvdYYCiDvhXkEVlHcsUiu7L3IXj4v+ItAaCzhToTTFahLMpo0MKkZ/rn31yAVkBLtvI CWW+b7AQtoziFP7alDnufCDa+BJtgUaD4tM/unJnlmsMLhfNWgoJGgsK/ELzOCLkcyUq iwOxj6iQxwSwkBQcNeAtudIbSIK+dXGKdsna//itX7ZYtAr6VOw85juod02oT4LcjJwQ dJzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8TfBKOfaVpqt5R4nkVzJFZ138nLy5SdLdRh90lzqau8=; b=tJAVnpslyPu6p+zKyccU9OTzDqw8lHJ0l+7sr+qWdXqV5XDc2OClEcd6X1Nf9ZJHku cx0P+rpg2ESsd2bFhgAJKzaLxfg+W5hzirtI4qvIPhDaskLMpo7MYEgKwx4U675ExM4H 9z/A05D+jMstdYM/GDRdjQp4fQT99zWimB9d1MZDkvq/Aq4hgm5u0ZLWFECSyFpZZqFc QzSDHvSNJVJnXZSq81itmHRkXZ0NbPeJI99AUnUyBiwuJS32/WuYfX36eQ2wxTynccOC NQKnWBazzdkhD2d5NSRoTk06fVVLV2Zds3XKUZbbXfzDoimN7JpJH86jSWd0HoNKSGhv LxjA== X-Gm-Message-State: AHYfb5jZCbrtw9mTNBLaIHonSXMLZfyEpUs08tWGGNi1UzVY9GRZtvrZ 9B23pdUG3GHd6Ytl X-Received: by 10.84.197.3 with SMTP id m3mr18442515pld.241.1502465316674; Fri, 11 Aug 2017 08:28:36 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id c14sm2627303pfl.160.2017.08.11.08.28.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 11 Aug 2017 08:28:36 -0700 (PDT) Date: Fri, 11 Aug 2017 08:28:29 -0700 From: Stephen Hemminger To: Jasvinder Singh Cc: dev@dpdk.org, cristian.dumitrescu@intel.com, ferruh.yigit@intel.com, hemant.agrawal@nxp.com, Jerin.JacobKollanukkaran@cavium.com, wenzhuo.lu@intel.com Message-ID: <20170811082829.62ab5c0c@xeon-e3> In-Reply-To: <20170526181149.44085-1-jasvinder.singh@intel.com> References: <20170526181149.44085-1-jasvinder.singh@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 0/2] net/softnic: sw fall-back for traffic management X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2017 15:28:37 -0000 On Fri, 26 May 2017 19:11:47 +0100 Jasvinder Singh wrote: > The SoftNIC PMD provides SW fall-back option for the NICs not supporting > the Traffic Management (TM) features. > > SoftNIC PMD overview: > - The SW fall-back is based on the existing librte_sched DPDK library. > - The TM-agnostic port (the underlay device) is wrapped into a TM-aware > softnic port (the overlay device). > - Once the overlay device (virtual device) is created, the configuration of > the underlay device is taking place through the overlay device. > - The SoftNIC PMD is generic, i.e. it works for any underlay device PMD that > implements the ethdev API. > > Similarly to Ring PMD, the SoftNIC virtual device can be created in two > different ways: > 1. Through EAL command line (--vdev option)_ > 2._Through the rte_eth_softnic_create() API function called by the application > > SoftNIC PMD params: > - iface (mandatory): the ethdev port name (i.e. PCI address or vdev name) for > the underlay device > - txq_id (optional, default = 0): tx queue id of the underlay device > - deq_bsz (optional, default = 24): traffic manager dequeue burst size > - Example:_ --vdev 'net_softnic0,iface=0000:04:00.1,txq_id=0,deq_bsz=28' > > SoftNIC PMD build instructions: > - To build SoftNIC PMD, the following parameter needs to be set on > config/common_base file: CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y > - The SoftNIC PMD depends on the TM API [1] and therefore is initially > targeted for the tm-next repository > > > Patch 1 adds softnic device PMD for traffic management. > Patch 2 adds traffic management ops to the softnic device suggested in > generic ethdev API for traffic management[1]. > > [1] TM API version 4:_ > http://www.dpdk.org/dev/patchwork/patch/24411/, > http://www.dpdk.org/dev/patchwork/patch/24412/ > > > Jasvinder Singh (2): > net/softnic: add softnic PMD for traffic management > net/softnic: add traffic management ops > > MAINTAINERS | 5 + > config/common_base | 5 + > drivers/net/Makefile | 5 + > drivers/net/softnic/Makefile | 58 ++ > drivers/net/softnic/rte_eth_softnic.c | 578 ++++++++++++ > drivers/net/softnic/rte_eth_softnic.h | 99 ++ > drivers/net/softnic/rte_eth_softnic_default.c | 1104 +++++++++++++++++++++++ > drivers/net/softnic/rte_eth_softnic_internals.h | 93 ++ > drivers/net/softnic/rte_eth_softnic_tm.c | 235 +++++ > drivers/net/softnic/rte_eth_softnic_version.map | 7 + > mk/rte.app.mk | 5 +- > 11 files changed, 2193 insertions(+), 1 deletion(-) > create mode 100644 drivers/net/softnic/Makefile > create mode 100644 drivers/net/softnic/rte_eth_softnic.c > create mode 100644 drivers/net/softnic/rte_eth_softnic.h > create mode 100644 drivers/net/softnic/rte_eth_softnic_default.c > create mode 100644 drivers/net/softnic/rte_eth_softnic_internals.h > create mode 100644 drivers/net/softnic/rte_eth_softnic_tm.c > create mode 100644 drivers/net/softnic/rte_eth_softnic_version.map > Setting up a softnic plus hardware NIC is significantly more effort for applications than just using ethdev. Also, it puts the burden on the application to decide which hardware device needs softnic and which does not; putting hardware knowledge in the application is the wrong architectural direction. Why not just the simple method of putting an new field in ethdev_ops for TM. If it is NULL, then rte_ethdev TM would just fallback to doing the SoftNIC processing? Also, eth_dev_ops doesn't always have to be const. Aren't there some PMD's that insert different values based on configuration or CPU?