From patchwork Tue Jul 21 17:47:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 74584 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 878ECA0526; Tue, 21 Jul 2020 19:47:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1946F1C039; Tue, 21 Jul 2020 19:47:24 +0200 (CEST) Received: from mail-wr1-f99.google.com (mail-wr1-f99.google.com [209.85.221.99]) by dpdk.org (Postfix) with ESMTP id E216A1C02C for ; Tue, 21 Jul 2020 19:47:21 +0200 (CEST) Received: by mail-wr1-f99.google.com with SMTP id a14so7182456wra.5 for ; Tue, 21 Jul 2020 10:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=OSm/+31hDTjS0JDXwg4akIGnsSTGtq6U57BK5Tcqoa8=; b=JOGv2D067DzgNXxVOAypgpD0SJo0rduhC++Xc/GS08R5S+PfrZGHeSST4ofbHsdQmq x4BO+2EfZLqDTna8ZMnS9aKIXdVsVwk2H+Zrqpv4o+iS8koaTERN9DUp5enKCqpRp/Zq SvvtK+esX7tLL3BP+BwPfYpWYxTTWJKqBgWvc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=OSm/+31hDTjS0JDXwg4akIGnsSTGtq6U57BK5Tcqoa8=; b=ZeBE037MKkxnvccAcC60HDeKHBIa3vux8S1bGI1IIBoHA42Kkaa37uobqqIybksGbd 8jx9kz8plUW3fUKjyaZeKc9MGC9I+AC/xPuRo4MqkKCNbi09NuYoDudy5l5DH9cF5nLy 20CJCbkF5uCeA1dWRl1O73PfaEYOOtlKgON3hnxcxIQFyeYSvsajW8fB8LiIMklyuBig Ngw+DWRKp2Ug20XhfIW7XqM3lyASx4VAZB9/TrANesVpBaAyy23BhXi9l2WYoqGavFCv LlKN12mfoCz51F+rYGtx9Jq8JN3IIZ+YmWdI5PnBbr99KXvwCek0YkQXB4K3iUEDW4TS tbFw== X-Gm-Message-State: AOAM5318pLIUk/eoo/zqIVUMg5d8Hb+p3veyDahE5/+KuT2KozkMHp1z war65C6HP8Taelrz4l6oNxyJj2v74TslDSQJILJ2bQxXjO9RKiRL+fheTGw1YWOYAGkHUIk7zca 0cbUelVBIl4sZ2mmd5bI584tmmEj/DNIKlTLTDG85wgvOcBfVtXwHaoDm9d++i7jE3/fbgaUId7 ehOQ== X-Google-Smtp-Source: ABdhPJypvbANQwM6xve1LsuKqGj77AZWuzf0NxPjVrP1bxTLx/ZcipoNXHi7WrZSWpCiWtqvWwmQUuM9RZdh X-Received: by 2002:a05:6000:1288:: with SMTP id f8mr19376786wrx.62.1595353641253; Tue, 21 Jul 2020 10:47:21 -0700 (PDT) Received: from localhost.localdomain ([192.19.223.252]) by smtp-relay.gmail.com with ESMTPS id y6sm71632wmb.38.2020.07.21.10.47.20 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jul 2020 10:47:21 -0700 (PDT) X-Relaying-Domain: broadcom.com From: Ajit Khaparde To: dev@dpdk.org Date: Tue, 21 Jul 2020 10:47:11 -0700 Message-Id: <20200721174712.48625-1-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 1/2] net/bnxt: add meson build option 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Add an option in meson build to indicate the memory management scheme. bnxt_eem_system is set to false by default. Signed-off-by: Ajit Khaparde --- doc/guides/nics/bnxt.rst | 9 +++++++++ drivers/net/bnxt/meson.build | 16 ++++++++++++++-- meson_options.txt | 2 ++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst index 6ff75d0a2..dcb4309d2 100644 --- a/doc/guides/nics/bnxt.rst +++ b/doc/guides/nics/bnxt.rst @@ -809,6 +809,15 @@ is stopped. Note that TX (or RX) vector mode can be enabled independently from RX (or TX) vector mode. +Configuration +------------- + +Compilation options +~~~~~~~~~~~~~~~~~~~ + +- ``bnxt_eem_system`` (default **false**) +This option allows to select the flow table memory management scheme. + Appendix -------- diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build index 8529b333c..21a1df915 100644 --- a/drivers/net/bnxt/meson.build +++ b/drivers/net/bnxt/meson.build @@ -4,6 +4,14 @@ install_headers('rte_pmd_bnxt.h') +bnxt_eem_sys = (get_option('bnxt_eem_system')) +if bnxt_eem_sys + dpdk_conf.set('RTE_LIBRTE_BNXT_PMD_SYSTEM', true) + cflags += [ + '-DTF_USE_SYSTEM_MEM' + ] +endif + includes += include_directories('tf_ulp') includes += include_directories('tf_core') @@ -29,7 +37,6 @@ sources = files('bnxt_cpr.c', 'tf_core/rand.c', 'tf_core/stack.c', 'tf_core/tf_em_common.c', - 'tf_core/tf_em_host.c', 'tf_core/tf_em_internal.c', 'tf_core/tf_rm.c', 'tf_core/tf_tbl.c', @@ -45,7 +52,6 @@ sources = files('bnxt_cpr.c', 'tf_core/tf_if_tbl.c', 'tf_core/ll.c', 'tf_core/tf_global_cfg.c', - 'tf_core/tf_em_host.c', 'tf_core/tf_shadow_identifier.c', 'hcapi/hcapi_cfa_p4.c', @@ -67,6 +73,12 @@ sources = files('bnxt_cpr.c', 'rte_pmd_bnxt.c') +if bnxt_eem_sys + sources += files('tf_core/tf_em_system.c') +elif not bnxt_eem_sys + sources += files('tf_core/tf_em_host.c') +endif + if arch_subdir == 'x86' sources += files('bnxt_rxtx_vec_sse.c') elif arch_subdir == 'arm' and host_machine.cpu_family().startswith('aarch64') diff --git a/meson_options.txt b/meson_options.txt index 9bf18ab6b..24d72fb10 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -2,6 +2,8 @@ option('armv8_crypto_dir', type: 'string', value: '', description: 'path to the armv8_crypto library installation directory') +option('bnxt_eem_system', type: 'boolean', value: false, + description: 'EEM system memory support') option('disable_drivers', type: 'string', value: '', description: 'Comma-separated list of drivers to explicitly disable.') option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-', From patchwork Tue Jul 21 17:47:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ajit Khaparde X-Patchwork-Id: 74585 X-Patchwork-Delegate: ajit.khaparde@broadcom.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E9F58A0526; Tue, 21 Jul 2020 19:47:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 78F1E1C05C; Tue, 21 Jul 2020 19:47:25 +0200 (CEST) Received: from mail-wr1-f100.google.com (mail-wr1-f100.google.com [209.85.221.100]) by dpdk.org (Postfix) with ESMTP id C9D0F1C037 for ; Tue, 21 Jul 2020 19:47:22 +0200 (CEST) Received: by mail-wr1-f100.google.com with SMTP id z15so22000774wrl.8 for ; Tue, 21 Jul 2020 10:47:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=z9IB2vNhPoFwGR3YUWoIeSLrl5sjcLDPUgLLGHygX3o=; b=PrVaggI65O6yR/oKtkecwpNViBRG6A5Xu87X0RJziGm4aGV02TBW5xOXbd13xYZ1x/ DwObbP/fDkXfZQ98elqRmZOw/0ppgAGuWWYzaYj4wJGPLX8bCXe3UVaSsC5gdeP9tSQ/ q2jVchq2eJPreKSDUdAXvHiWH5FRyMnv6/Xmk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z9IB2vNhPoFwGR3YUWoIeSLrl5sjcLDPUgLLGHygX3o=; b=ZZuQW3p86VlY49IYBP6q4r7dbHEPCww5xJuaYRaCg2gfW4SvnAp9+mXyfgNlDR9cet CyOnSunYJteik4l/xsff/LfTl5ngcrLVkJ1yUsqOIvNUSzKZS+iTuzxrzMNmqDaDIVvK jdQCVioLMnsWZN50B3Me0zXM7xyUNEwiJEg3QvGiZsozxkPw+Qy0BpV5vFvbYOln5Yx5 Bvx5+T+JEOlcsrJwbrNBvF03glqhFEzOUdqlhwSIJxwznnUFdsB/FloAo0+qMq4HQsrm p7IyC+ooCzQcRNtA9LnI2QVT6HoxAtwdpUNbuPyfHABXJM4rCPhcQLgtNOfUDDxginDL A/kg== X-Gm-Message-State: AOAM532HDvRC/L5lgv0t4i1tH/A0Xa5xfqJbXyWmuzUBka5o68dHsFrz Y8hDlKOXDv5GFWFrcBHuCQOUTYY1UoLsfeJDQLRH32FK4y1+1pLl1l0/dNu9HcRrrPU4Zt/JgeG cW2RBz3X+IkYUBVLXGyw70Xn4V5KbzRBxqzFm7mzOT1Zjk/M/qkwrhI2EjZ1Ele6hY+ToBa6PMO 63uw== X-Google-Smtp-Source: ABdhPJyfjK/42bo0VTkExWHX3YpN5SVmhRL49YVm0p0lj/iAPxa9pdZ5dLt4hzOfyTl902flCdM4f8z8avA3 X-Received: by 2002:adf:fb06:: with SMTP id c6mr2754686wrr.261.1595353642428; Tue, 21 Jul 2020 10:47:22 -0700 (PDT) Received: from localhost.localdomain ([192.19.223.252]) by smtp-relay.gmail.com with ESMTPS id y6sm71632wmb.38.2020.07.21.10.47.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Jul 2020 10:47:22 -0700 (PDT) X-Relaying-Domain: broadcom.com From: Ajit Khaparde To: dev@dpdk.org Date: Tue, 21 Jul 2020 10:47:12 -0700 Message-Id: <20200721174712.48625-2-ajit.khaparde@broadcom.com> X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) In-Reply-To: <20200721174712.48625-1-ajit.khaparde@broadcom.com> References: <20200721174712.48625-1-ajit.khaparde@broadcom.com> MIME-Version: 1.0 Subject: [dpdk-dev] [PATCH 2/2] doc: update bnxt doc 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Update bnxt doc to indicate support for VF-representors and some notes about rte_flow API implementation. Signed-off-by: Ajit Khaparde --- doc/guides/nics/bnxt.rst | 46 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/doc/guides/nics/bnxt.rst b/doc/guides/nics/bnxt.rst index dcb4309d2..98c47a243 100644 --- a/doc/guides/nics/bnxt.rst +++ b/doc/guides/nics/bnxt.rst @@ -688,6 +688,52 @@ optimizes flow insertions and deletions. This is a tech preview feature, and is disabled by default. It can be enabled using bnxt devargs. For ex: "-w 0000:0d:00.0,host-based-truflow=1”. +Notes +----- + +- On stopping a device port, all the flows created on a port by the + application will be flushed from the hardware and any tables maintained + by the PMD. After stopping the device port, all flows on the port become + invalid and are not represented in the system anymore. + Instead of destroying or flushing such flows an application should discard + all references to these flows and re-create the flows as required after the + port is restarted. + +- While an application is free to use the group id attribute to group flows + together using a specific criteria, the BNXT PMD currently associates this + group id to a VNIC id. One such case is grouping of flows which are filtered + on the same source or destination MAC address. This allows packets of such + flows to be directed to one or more queues associated with the VNIC id. + This implementation is supported only when TRUFLOW functionality is disabled. + +Note: A VNIC represents a virtual interface in the hardware. It is a resource +in the RX path of the chip and is used to setup various target actions such as +RSS, MAC filtering etc. for the physical function in use. + +Virtual Function Port Representors +---------------------------------- +The BNXT PMD supports the creation of VF port representors for the control +and monitoring of BNXT virtual function devices. Each port representor +corresponds to a single virtual function of that device that is connected to a +VF. When there is no hardware flow offload, each packet transmitted by the VF +will be received by the corresponding representor. Similarly each packet that is +sent to a representor will be received by the VF. Applications can take +advantage of this feature when SRIOV is enabled. The representor will allow the +first packet that is transmitted by the VF to be received by the DPDK +application which can then decide if the flow should be offloaded to the +hardware. Once the flow is offloaded in the hardware, any packet matching the +flow will be received by the VF while the DPDK application will not receive it +any more. The BNXT PMD supports creation and handling of the port representors +when the PMD is initialized on a PF or trusted-VF. The user can specify the list +of VF IDs of the VFs for which the representors are needed by using the +``devargs`` option ``representor``.:: + + -w DBDF,representor=[0,1,4] + +Note that currently hot-plugging of representor ports is not supported so all +the required representors must be specified on the creation of the PF or the +trusted VF. + Application Support -------------------