From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-f65.google.com (mail-ed1-f65.google.com [209.85.208.65]) by dpdk.org (Postfix) with ESMTP id 9C61C2BF2 for ; Tue, 5 Mar 2019 21:32:09 +0100 (CET) Received: by mail-ed1-f65.google.com with SMTP id j89so8353433edb.9 for ; Tue, 05 Mar 2019 12:32:09 -0800 (PST) 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=+KOwQ562qF4KUTLfYaeHRvOaxS62n1OIJHIaOzbF0x8=; b=FnfUtX/znZXyyQl+ZOv7UFiAxVE9xqNBOT2b8/M2HqRvp3bbhIJyTtvyaqKKhwUozK OIwNGVntKkdYB5CPbQvR4cUhfZoooZ7qx9Nyr9tyRkETbOaagDHkLaRJBWeKAVUeFmtO x4JK6Dof3muW6m6YbwRpd6O2fS8L6k/5KGv/qYK7lpN7Z61GJ4JemAaZP3eyChMYGTSX eu0Pq9MoDc/2r8QdOyd2afRLk8nbm0LiO0lzTD01XPfnJWItMHqoWwLEyQfUwlN68Nny WEToo6xmMPNBoC1vBDd4fwI6rKYizUmbOWk0XNC8tV6irYaod8aMJuSp9FFPWe2SFSNj 5WzQ== 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=+KOwQ562qF4KUTLfYaeHRvOaxS62n1OIJHIaOzbF0x8=; b=n0rhgYnXHDsFblnJzx65QvkgFvCfQWlW4HEFFSvWJFtjfhvUHSl88Bvf5CHRzv91CP oygWd3neZwwbnZbB1ybWug27EWuMmE07pT3mmmLnxncq0DCpCMNgHdWoXuCcD65tgfP8 dFjHikiTd4iDnhYZf9Gu4kWVdbVUvKyof6UuBB2UZ2mIQddc+FqZ4Qm9FUdfvJzDrg81 7g2vD+XdlS+//rWjVx4+ZH5/K1C6+EULR4HMByxFqRfZmFleuVuxE47FhOZ+dpIOFnRd jcSF1vIK7p1mZ0Gtjvj6IIzh0JYSXmS1CAa8+dvWiAh0so9ccEX/LCiwOrNOyA4Gu7Cv s4hQ== X-Gm-Message-State: APjAAAVks4LfUZbYJ5HU3GkqCpFQ30bxU98CMQ8s7abS9Fk5fjSQ0z51 XSrgErkOJkCJc98aWz53/6VNifUEPDgcOnsVh00= X-Google-Smtp-Source: APXvYqywh/UdUfYZ00xEr20RDcDEpyBmHvzndQPVDZFrqs8kb+gNH1Dkg99vdGzDeuBPUo2JsKmXpFvG2J5oCrFtx68= X-Received: by 2002:a17:906:69c8:: with SMTP id g8mr1459787ejs.75.1551817929054; Tue, 05 Mar 2019 12:32:09 -0800 (PST) MIME-Version: 1.0 References: <1551185824-5501-2-git-send-email-cernay@netcope.com> <1551451054-111249-1-git-send-email-cernay@netcope.com> In-Reply-To: <1551451054-111249-1-git-send-email-cernay@netcope.com> From: Rami Rosen Date: Tue, 5 Mar 2019 22:31:57 +0200 Message-ID: To: Rastislav Cernay Cc: dev , Ferruh Yigit Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v3] net/nfb: new netcope driver 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: Tue, 05 Mar 2019 20:32:09 -0000 Hi, Added new net driver for Netcope nfb cards Signed-off-by: Rastislav Cernay Reviewed-by: Rami Rosen --- v2: remove unnecessary cast remove unnecessary zeroing move declaration to not mix with code restore skeleton example v3: add release notes add doc to doc index add architecture limits to doc edit features list add .map file change link to dependecies to official vendor site move declarations out of code remove false comments (rte_errno is set) comments to c89 style remove log from main rx loop remove redundant code MAINTAINERS | 7 + config/common_base | 4 + devtools/test-build.sh | 1 + doc/guides/nics/features/nfb.ini | 18 + doc/guides/nics/index.rst | 1 + doc/guides/nics/nfb.rst | 143 ++++++++ doc/guides/rel_notes/release_19_02.rst | 5 + drivers/net/Makefile | 1 + drivers/net/meson.build | 1 + drivers/net/nfb/Makefile | 41 +++ drivers/net/nfb/meson.build | 9 + drivers/net/nfb/nfb.h | 50 +++ drivers/net/nfb/nfb_ethdev.c | 589 ++++++++++++++++++++++++++++++++ drivers/net/nfb/nfb_rx.c | 127 +++++++ drivers/net/nfb/nfb_rx.h | 213 ++++++++++++ drivers/net/nfb/nfb_rxmode.c | 100 ++++++ drivers/net/nfb/nfb_rxmode.h | 78 +++++ drivers/net/nfb/nfb_stats.c | 78 +++++ drivers/net/nfb/nfb_stats.h | 48 +++ drivers/net/nfb/nfb_tx.c | 113 ++++++ drivers/net/nfb/nfb_tx.h | 204 +++++++++++ drivers/net/nfb/rte_nfb_pmd_version.map | 4 + mk/rte.app.mk | 1 + 23 files changed, 1836 insertions(+) create mode 100644 doc/guides/nics/features/nfb.ini create mode 100644 doc/guides/nics/nfb.rst create mode 100644 drivers/net/nfb/Makefile create mode 100644 drivers/net/nfb/meson.build create mode 100644 drivers/net/nfb/nfb.h create mode 100644 drivers/net/nfb/nfb_ethdev.c create mode 100644 drivers/net/nfb/nfb_rx.c create mode 100644 drivers/net/nfb/nfb_rx.h create mode 100644 drivers/net/nfb/nfb_rxmode.c create mode 100644 drivers/net/nfb/nfb_rxmode.h create mode 100644 drivers/net/nfb/nfb_stats.c create mode 100644 drivers/net/nfb/nfb_stats.h create mode 100644 drivers/net/nfb/nfb_tx.c create mode 100644 drivers/net/nfb/nfb_tx.h create mode 100644 drivers/net/nfb/rte_nfb_pmd_version.map Minors: +int +nfb_eth_rx_queue_init(struct nfb_device *nfb, + uint16_t rx_queue_id, + uint16_t port_id, + struct rte_mempool *mb_pool, + struct ndp_rx_queue *rxq) +{ + if (nfb == NULL) + return -EINVAL; + + rxq->queue = ndp_open_rx_queue(nfb, rx_queue_id); + if (rxq->queue == NULL) + return -EINVAL; + + rxq->nfb = nfb; + rxq->rx_queue_id = rx_queue_id; + rxq->in_port = port_id; + rxq->mb_pool = mb_pool; maybe better to have the following declaration at the beginning of the method (though not sure it will cause a compilation error under most compilers) + + const struct rte_pktmbuf_pool_private *mbp_priv = + rte_mempool_get_priv(mb_pool); static __rte_always_inline uint16_t +nfb_eth_ndp_tx(void *queue, + struct rte_mbuf **bufs, + uint16_t nb_pkts) +{ ... ... Should be "TX invalid arguments!\n"): + if (unlikely(ndp->queue == NULL || nb_pkts == 0)) { + RTE_LOG(ERR, PMD, "RX invalid arguments!\n"); + return 0; + } +