get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/96405/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 96405,
    "url": "http://patchwork.dpdk.org/api/patches/96405/?format=api",
    "web_url": "http://patchwork.dpdk.org/project/dpdk/patch/20210729134711.35870-2-heinrich.kuhn@netronome.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210729134711.35870-2-heinrich.kuhn@netronome.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210729134711.35870-2-heinrich.kuhn@netronome.com",
    "date": "2021-07-29T13:47:05",
    "name": "[v3,1/7] net/nfp: split rxtx headers into separate file",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": true,
    "hash": "e71da3f89fa2cf38c36cd56353e8444ffeff5048",
    "submitter": {
        "id": 1523,
        "url": "http://patchwork.dpdk.org/api/people/1523/?format=api",
        "name": "Heinrich Kuhn",
        "email": "heinrich.kuhn@netronome.com"
    },
    "delegate": {
        "id": 319,
        "url": "http://patchwork.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "http://patchwork.dpdk.org/project/dpdk/patch/20210729134711.35870-2-heinrich.kuhn@netronome.com/mbox/",
    "series": [
        {
            "id": 18064,
            "url": "http://patchwork.dpdk.org/api/series/18064/?format=api",
            "web_url": "http://patchwork.dpdk.org/project/dpdk/list/?series=18064",
            "date": "2021-07-29T13:47:04",
            "name": "Refactor the NFP PMD",
            "version": 3,
            "mbox": "http://patchwork.dpdk.org/series/18064/mbox/"
        }
    ],
    "comments": "http://patchwork.dpdk.org/api/patches/96405/comments/",
    "check": "success",
    "checks": "http://patchwork.dpdk.org/api/patches/96405/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@inbox.dpdk.org",
        "Delivered-To": "patchwork@inbox.dpdk.org",
        "Received": [
            "from mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 96BEDA034F;\n\tThu, 29 Jul 2021 15:47:31 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 811F4410F5;\n\tThu, 29 Jul 2021 15:47:31 +0200 (CEST)",
            "from mail-wr1-f41.google.com (mail-wr1-f41.google.com\n [209.85.221.41]) by mails.dpdk.org (Postfix) with ESMTP id D5B59410F3\n for <dev@dpdk.org>; Thu, 29 Jul 2021 15:47:30 +0200 (CEST)",
            "by mail-wr1-f41.google.com with SMTP id b11so1694366wrx.6\n for <dev@dpdk.org>; Thu, 29 Jul 2021 06:47:30 -0700 (PDT)",
            "from localhost.localdomain (dsl-197-245-41-228.voxdsl.co.za.\n [197.245.41.228])\n by smtp.gmail.com with ESMTPSA id v2sm3498246wro.48.2021.07.29.06.47.29\n (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128);\n Thu, 29 Jul 2021 06:47:30 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=netronome-com.20150623.gappssmtp.com; s=20150623;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=WMFWr2RG7SjrjCmMcpe3exVimXMhCrLxQ3Qo4VOTPhg=;\n b=zZ2DlS+Yu5Wr1JZe9rLO2hw6jNuKrtE695SUZle9RIZDceFiXAiQFrkS66bd4yRws9\n 3Y5ejafOnKa3ABSbVKKF2OazmUznHUM4QR0K572qccQ+1W9lyz/TSipcGDrhe9JSSbkH\n HJYRXTcjL6q/WXrhrKd5Bhr847GuruGCRD4e00Uu5YhT86qoQJTd/a+QJGBEkMjLTuc0\n iYwAKq/qDlbpKSnIl22zJBL8vNzM3xV21Shz5CSrlsaU0ZZOLW9pb2cbMabgvnYb1+vD\n u2RP9cYyCvO7cPcsU8syVknW+yNGceFtpWkEC60rrsTvCZneTgWmnBq5iotwnwis3yoh\n SI+g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=WMFWr2RG7SjrjCmMcpe3exVimXMhCrLxQ3Qo4VOTPhg=;\n b=W59ZoyBd/8j/SlZrR6VUqKW6V9BtmcBr4ruwG1t/gERTNcUjzjMyCzx4i+f9Q1hQvn\n 47stK4FZPlFjClptcYlts7vmBKTwsQWDV13SdcM9deCgyVASxbPDl2Qse4djgftmOiW6\n 9hEEfI3SsVh32GkZVSp6e1OpQnbCv062WjqZYSqiOEXM7c4HEuzrs7m4SMo5KXkPRQN8\n cGSzv4NzkH3d7iDCmNPjxZSbg3QkrQIg1mn8bwuzQC0IV/+vArd/h3pfEO5dKbS6EW7N\n ZJDRO+qXmdBLar3daMEYfbYGRs8bnanSpklyKpbBJxneUp62nVwxq/HdIw0HM/hO3h+A\n WJlQ==",
        "X-Gm-Message-State": "AOAM531o5TX/WeoaBa+T3cU2YOkK7554yPY01ybFW4Ro/ra64UYJFGmH\n GVuMf+RNrKjERVlJ02kNCmms9fkPJydTLZ0XDqTjyhDaVThD1QltbP7vbwegFruHumQ1If+fT61\n oZxj8QmZjOJjhHreD7ljAw0Ysc+Tq71W+aJv9Ds/4D9S8/SvinLMiZ0RVfY5cLt4c",
        "X-Google-Smtp-Source": "\n ABdhPJxQOid6CbJKoaDfIo5xIUkV8VEv5kNPUds7JFZJs4nyciArAzgObUXobWXvGv3WDevzHyLwaw==",
        "X-Received": "by 2002:a05:6000:1b8d:: with SMTP id\n r13mr5063388wru.311.1627566450348;\n Thu, 29 Jul 2021 06:47:30 -0700 (PDT)",
        "From": "Heinrich Kuhn <heinrich.kuhn@netronome.com>",
        "To": "dev@dpdk.org",
        "Cc": "Heinrich Kuhn <heinrich.kuhn@netronome.com>,\n Simon Horman <simon.horman@corigine.com>",
        "Date": "Thu, 29 Jul 2021 15:47:05 +0200",
        "Message-Id": "<20210729134711.35870-2-heinrich.kuhn@netronome.com>",
        "X-Mailer": "git-send-email 2.30.1 (Apple Git-130)",
        "In-Reply-To": "<20210729134711.35870-1-heinrich.kuhn@netronome.com>",
        "References": "<20210716083545.34444-1-heinrich.kuhn@netronome.com>\n <20210729134711.35870-1-heinrich.kuhn@netronome.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v3 1/7] net/nfp: split rxtx headers into separate\n file",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "DPDK patches and discussions <dev.dpdk.org>",
        "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://mails.dpdk.org/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "This change splits out the rx/tx specific structs and defines from the\nmain nfp_net_pmd header file and into their own header file.\n\nSigned-off-by: Heinrich Kuhn <heinrich.kuhn@netronome.com>\nSigned-off-by: Simon Horman <simon.horman@corigine.com>\n---\n drivers/net/nfp/nfp_net.c     |   1 +\n drivers/net/nfp/nfp_net_pmd.h | 248 ------------------------------\n drivers/net/nfp/nfp_rxtx.h    | 276 ++++++++++++++++++++++++++++++++++\n 3 files changed, 277 insertions(+), 248 deletions(-)\n create mode 100644 drivers/net/nfp/nfp_rxtx.h",
    "diff": "diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c\nindex a30e78db16..29eb8c84ad 100644\n--- a/drivers/net/nfp/nfp_net.c\n+++ b/drivers/net/nfp/nfp_net.c\n@@ -40,6 +40,7 @@\n #include \"nfpcore/nfp_nsp.h\"\n \n #include \"nfp_net_pmd.h\"\n+#include \"nfp_rxtx.h\"\n #include \"nfp_net_logs.h\"\n #include \"nfp_net_ctrl.h\"\n \ndiff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h\nindex 212f9ef162..a3a3ba32d6 100644\n--- a/drivers/net/nfp/nfp_net_pmd.h\n+++ b/drivers/net/nfp/nfp_net_pmd.h\n@@ -23,19 +23,6 @@\n /* Forward declaration */\n struct nfp_net_adapter;\n \n-/*\n- * The maximum number of descriptors is limited by design as\n- * DPDK uses uint16_t variables for these values\n- */\n-#define NFP_NET_MAX_TX_DESC (32 * 1024)\n-#define NFP_NET_MIN_TX_DESC 64\n-\n-#define NFP_NET_MAX_RX_DESC (32 * 1024)\n-#define NFP_NET_MIN_RX_DESC 64\n-\n-/* Descriptor alignment */\n-#define NFP_ALIGN_RING_DESC 128\n-\n #define NFP_TX_MAX_SEG     UINT8_MAX\n #define NFP_TX_MAX_MTU_SEG 8\n \n@@ -150,241 +137,6 @@ static inline void nn_writeq(uint64_t val, volatile void *addr)\n \tnn_writel(val, addr);\n }\n \n-/* TX descriptor format */\n-#define PCIE_DESC_TX_EOP                (1 << 7)\n-#define PCIE_DESC_TX_OFFSET_MASK        (0x7f)\n-\n-/* Flags in the host TX descriptor */\n-#define PCIE_DESC_TX_CSUM               (1 << 7)\n-#define PCIE_DESC_TX_IP4_CSUM           (1 << 6)\n-#define PCIE_DESC_TX_TCP_CSUM           (1 << 5)\n-#define PCIE_DESC_TX_UDP_CSUM           (1 << 4)\n-#define PCIE_DESC_TX_VLAN               (1 << 3)\n-#define PCIE_DESC_TX_LSO                (1 << 2)\n-#define PCIE_DESC_TX_ENCAP_NONE         (0)\n-#define PCIE_DESC_TX_ENCAP_VXLAN        (1 << 1)\n-#define PCIE_DESC_TX_ENCAP_GRE          (1 << 0)\n-\n-struct nfp_net_tx_desc {\n-\tunion {\n-\t\tstruct {\n-\t\t\tuint8_t dma_addr_hi; /* High bits of host buf address */\n-\t\t\t__le16 dma_len;     /* Length to DMA for this desc */\n-\t\t\tuint8_t offset_eop; /* Offset in buf where pkt starts +\n-\t\t\t\t\t     * highest bit is eop flag.\n-\t\t\t\t\t     */\n-\t\t\t__le32 dma_addr_lo; /* Low 32bit of host buf addr */\n-\n-\t\t\t__le16 mss;         /* MSS to be used for LSO */\n-\t\t\tuint8_t lso_hdrlen; /* LSO, where the data starts */\n-\t\t\tuint8_t flags;      /* TX Flags, see @PCIE_DESC_TX_* */\n-\n-\t\t\tunion {\n-\t\t\t\tstruct {\n-\t\t\t\t\t/*\n-\t\t\t\t\t * L3 and L4 header offsets required\n-\t\t\t\t\t * for TSOv2\n-\t\t\t\t\t */\n-\t\t\t\t\tuint8_t l3_offset;\n-\t\t\t\t\tuint8_t l4_offset;\n-\t\t\t\t};\n-\t\t\t\t__le16 vlan; /* VLAN tag to add if indicated */\n-\t\t\t};\n-\t\t\t__le16 data_len;    /* Length of frame + meta data */\n-\t\t} __rte_packed;\n-\t\t__le32 vals[4];\n-\t};\n-};\n-\n-struct nfp_net_txq {\n-\tstruct nfp_net_hw *hw; /* Backpointer to nfp_net structure */\n-\n-\t/*\n-\t * Queue information: @qidx is the queue index from Linux's\n-\t * perspective.  @tx_qcidx is the index of the Queue\n-\t * Controller Peripheral queue relative to the TX queue BAR.\n-\t * @cnt is the size of the queue in number of\n-\t * descriptors. @qcp_q is a pointer to the base of the queue\n-\t * structure on the NFP\n-\t */\n-\tuint8_t *qcp_q;\n-\n-\t/*\n-\t * Read and Write pointers.  @wr_p and @rd_p are host side pointer,\n-\t * they are free running and have little relation to the QCP pointers *\n-\t * @qcp_rd_p is a local copy queue controller peripheral read pointer\n-\t */\n-\n-\tuint32_t wr_p;\n-\tuint32_t rd_p;\n-\n-\tuint32_t tx_count;\n-\n-\tuint32_t tx_free_thresh;\n-\n-\t/*\n-\t * For each descriptor keep a reference to the mbuf and\n-\t * DMA address used until completion is signalled.\n-\t */\n-\tstruct {\n-\t\tstruct rte_mbuf *mbuf;\n-\t} *txbufs;\n-\n-\t/*\n-\t * Information about the host side queue location. @txds is\n-\t * the virtual address for the queue, @dma is the DMA address\n-\t * of the queue and @size is the size in bytes for the queue\n-\t * (needed for free)\n-\t */\n-\tstruct nfp_net_tx_desc *txds;\n-\n-\t/*\n-\t * At this point 48 bytes have been used for all the fields in the\n-\t * TX critical path. We have room for 8 bytes and still all placed\n-\t * in a cache line. We are not using the threshold values below but\n-\t * if we need to, we can add the most used in the remaining bytes.\n-\t */\n-\tuint32_t tx_rs_thresh; /* not used by now. Future? */\n-\tuint32_t tx_pthresh;   /* not used by now. Future? */\n-\tuint32_t tx_hthresh;   /* not used by now. Future? */\n-\tuint32_t tx_wthresh;   /* not used by now. Future? */\n-\tuint16_t port_id;\n-\tint qidx;\n-\tint tx_qcidx;\n-\t__le64 dma;\n-} __rte_aligned(64);\n-\n-/* RX and freelist descriptor format */\n-#define PCIE_DESC_RX_DD                 (1 << 7)\n-#define PCIE_DESC_RX_META_LEN_MASK      (0x7f)\n-\n-/* Flags in the RX descriptor */\n-#define PCIE_DESC_RX_RSS                (1 << 15)\n-#define PCIE_DESC_RX_I_IP4_CSUM         (1 << 14)\n-#define PCIE_DESC_RX_I_IP4_CSUM_OK      (1 << 13)\n-#define PCIE_DESC_RX_I_TCP_CSUM         (1 << 12)\n-#define PCIE_DESC_RX_I_TCP_CSUM_OK      (1 << 11)\n-#define PCIE_DESC_RX_I_UDP_CSUM         (1 << 10)\n-#define PCIE_DESC_RX_I_UDP_CSUM_OK      (1 <<  9)\n-#define PCIE_DESC_RX_SPARE              (1 <<  8)\n-#define PCIE_DESC_RX_EOP                (1 <<  7)\n-#define PCIE_DESC_RX_IP4_CSUM           (1 <<  6)\n-#define PCIE_DESC_RX_IP4_CSUM_OK        (1 <<  5)\n-#define PCIE_DESC_RX_TCP_CSUM           (1 <<  4)\n-#define PCIE_DESC_RX_TCP_CSUM_OK        (1 <<  3)\n-#define PCIE_DESC_RX_UDP_CSUM           (1 <<  2)\n-#define PCIE_DESC_RX_UDP_CSUM_OK        (1 <<  1)\n-#define PCIE_DESC_RX_VLAN               (1 <<  0)\n-\n-#define PCIE_DESC_RX_L4_CSUM_OK         (PCIE_DESC_RX_TCP_CSUM_OK | \\\n-\t\t\t\t\t PCIE_DESC_RX_UDP_CSUM_OK)\n-struct nfp_net_rx_desc {\n-\tunion {\n-\t\t/* Freelist descriptor */\n-\t\tstruct {\n-\t\t\tuint8_t dma_addr_hi;\n-\t\t\t__le16 spare;\n-\t\t\tuint8_t dd;\n-\n-\t\t\t__le32 dma_addr_lo;\n-\t\t} __rte_packed fld;\n-\n-\t\t/* RX descriptor */\n-\t\tstruct {\n-\t\t\t__le16 data_len;\n-\t\t\tuint8_t reserved;\n-\t\t\tuint8_t meta_len_dd;\n-\n-\t\t\t__le16 flags;\n-\t\t\t__le16 vlan;\n-\t\t} __rte_packed rxd;\n-\n-\t\t__le32 vals[2];\n-\t};\n-};\n-\n-struct nfp_net_rx_buff {\n-\tstruct rte_mbuf *mbuf;\n-};\n-\n-struct nfp_net_rxq {\n-\tstruct nfp_net_hw *hw;\t/* Backpointer to nfp_net structure */\n-\n-\t /*\n-\t  * @qcp_fl and @qcp_rx are pointers to the base addresses of the\n-\t  * freelist and RX queue controller peripheral queue structures on the\n-\t  * NFP\n-\t  */\n-\tuint8_t *qcp_fl;\n-\tuint8_t *qcp_rx;\n-\n-\t/*\n-\t * Read and Write pointers.  @wr_p and @rd_p are host side\n-\t * pointer, they are free running and have little relation to\n-\t * the QCP pointers. @wr_p is where the driver adds new\n-\t * freelist descriptors and @rd_p is where the driver start\n-\t * reading descriptors for newly arrive packets from.\n-\t */\n-\tuint32_t rd_p;\n-\n-\t/*\n-\t * For each buffer placed on the freelist, record the\n-\t * associated SKB\n-\t */\n-\tstruct nfp_net_rx_buff *rxbufs;\n-\n-\t/*\n-\t * Information about the host side queue location.  @rxds is\n-\t * the virtual address for the queue\n-\t */\n-\tstruct nfp_net_rx_desc *rxds;\n-\n-\t/*\n-\t * The mempool is created by the user specifying a mbuf size.\n-\t * We save here the reference of the mempool needed in the RX\n-\t * path and the mbuf size for checking received packets can be\n-\t * safely copied to the mbuf using the NFP_NET_RX_OFFSET\n-\t */\n-\tstruct rte_mempool *mem_pool;\n-\tuint16_t mbuf_size;\n-\n-\t/*\n-\t * Next two fields are used for giving more free descriptors\n-\t * to the NFP\n-\t */\n-\tuint16_t rx_free_thresh;\n-\tuint16_t nb_rx_hold;\n-\n-\t /* the size of the queue in number of descriptors */\n-\tuint16_t rx_count;\n-\n-\t/*\n-\t * Fields above this point fit in a single cache line and are all used\n-\t * in the RX critical path. Fields below this point are just used\n-\t * during queue configuration or not used at all (yet)\n-\t */\n-\n-\t/* referencing dev->data->port_id */\n-\tuint16_t port_id;\n-\n-\tuint8_t  crc_len; /* Not used by now */\n-\tuint8_t  drop_en; /* Not used by now */\n-\n-\t/* DMA address of the queue */\n-\t__le64 dma;\n-\n-\t/*\n-\t * Queue information: @qidx is the queue index from Linux's\n-\t * perspective.  @fl_qcidx is the index of the Queue\n-\t * Controller peripheral queue relative to the RX queue BAR\n-\t * used for the freelist and @rx_qcidx is the Queue Controller\n-\t * Peripheral index for the RX queue.\n-\t */\n-\tint qidx;\n-\tint fl_qcidx;\n-\tint rx_qcidx;\n-} __rte_aligned(64);\n-\n struct nfp_pf_dev {\n \t/* Backpointer to associated pci device */\n \tstruct rte_pci_device *pci_dev;\ndiff --git a/drivers/net/nfp/nfp_rxtx.h b/drivers/net/nfp/nfp_rxtx.h\nnew file mode 100644\nindex 0000000000..41a3a4b4e7\n--- /dev/null\n+++ b/drivers/net/nfp/nfp_rxtx.h\n@@ -0,0 +1,276 @@\n+/* SPDX-License-Identifier: BSD-3-Clause\n+ * Copyright (c) 2014-2021 Netronome Systems, Inc.\n+ * All rights reserved.\n+ */\n+\n+/*\n+ * vim:shiftwidth=8:noexpandtab\n+ *\n+ * @file dpdk/pmd/nfp_rxtx.h\n+ *\n+ * Netronome NFP Rx/Tx specific header file\n+ */\n+\n+#ifndef _NFP_RXTX_H_\n+#define _NFP_RXTX_H_\n+\n+#include <linux/types.h>\n+#include <rte_io.h>\n+\n+/*\n+ * The maximum number of descriptors is limited by design as\n+ * DPDK uses uint16_t variables for these values\n+ */\n+#define NFP_NET_MAX_TX_DESC (32 * 1024)\n+#define NFP_NET_MIN_TX_DESC 64\n+\n+#define NFP_NET_MAX_RX_DESC (32 * 1024)\n+#define NFP_NET_MIN_RX_DESC 64\n+\n+/* Descriptor alignment */\n+#define NFP_ALIGN_RING_DESC 128\n+\n+/* TX descriptor format */\n+#define PCIE_DESC_TX_EOP                (1 << 7)\n+#define PCIE_DESC_TX_OFFSET_MASK        (0x7f)\n+\n+/* Flags in the host TX descriptor */\n+#define PCIE_DESC_TX_CSUM               (1 << 7)\n+#define PCIE_DESC_TX_IP4_CSUM           (1 << 6)\n+#define PCIE_DESC_TX_TCP_CSUM           (1 << 5)\n+#define PCIE_DESC_TX_UDP_CSUM           (1 << 4)\n+#define PCIE_DESC_TX_VLAN               (1 << 3)\n+#define PCIE_DESC_TX_LSO                (1 << 2)\n+#define PCIE_DESC_TX_ENCAP_NONE         (0)\n+#define PCIE_DESC_TX_ENCAP_VXLAN        (1 << 1)\n+#define PCIE_DESC_TX_ENCAP_GRE          (1 << 0)\n+\n+struct nfp_net_tx_desc {\n+\tunion {\n+\t\tstruct {\n+\t\t\tuint8_t dma_addr_hi; /* High bits of host buf address */\n+\t\t\t__le16 dma_len;     /* Length to DMA for this desc */\n+\t\t\tuint8_t offset_eop; /* Offset in buf where pkt starts +\n+\t\t\t\t\t     * highest bit is eop flag.\n+\t\t\t\t\t     */\n+\t\t\t__le32 dma_addr_lo; /* Low 32bit of host buf addr */\n+\n+\t\t\t__le16 mss;         /* MSS to be used for LSO */\n+\t\t\tuint8_t lso_hdrlen; /* LSO, where the data starts */\n+\t\t\tuint8_t flags;      /* TX Flags, see @PCIE_DESC_TX_* */\n+\n+\t\t\tunion {\n+\t\t\t\tstruct {\n+\t\t\t\t\t/*\n+\t\t\t\t\t * L3 and L4 header offsets required\n+\t\t\t\t\t * for TSOv2\n+\t\t\t\t\t */\n+\t\t\t\t\tuint8_t l3_offset;\n+\t\t\t\t\tuint8_t l4_offset;\n+\t\t\t\t};\n+\t\t\t\t__le16 vlan; /* VLAN tag to add if indicated */\n+\t\t\t};\n+\t\t\t__le16 data_len;    /* Length of frame + meta data */\n+\t\t} __rte_packed;\n+\t\t__le32 vals[4];\n+\t};\n+};\n+\n+struct nfp_net_txq {\n+\tstruct nfp_net_hw *hw; /* Backpointer to nfp_net structure */\n+\n+\t/*\n+\t * Queue information: @qidx is the queue index from Linux's\n+\t * perspective.  @tx_qcidx is the index of the Queue\n+\t * Controller Peripheral queue relative to the TX queue BAR.\n+\t * @cnt is the size of the queue in number of\n+\t * descriptors. @qcp_q is a pointer to the base of the queue\n+\t * structure on the NFP\n+\t */\n+\tuint8_t *qcp_q;\n+\n+\t/*\n+\t * Read and Write pointers.  @wr_p and @rd_p are host side pointer,\n+\t * they are free running and have little relation to the QCP pointers *\n+\t * @qcp_rd_p is a local copy queue controller peripheral read pointer\n+\t */\n+\n+\tuint32_t wr_p;\n+\tuint32_t rd_p;\n+\n+\tuint32_t tx_count;\n+\n+\tuint32_t tx_free_thresh;\n+\n+\t/*\n+\t * For each descriptor keep a reference to the mbuf and\n+\t * DMA address used until completion is signalled.\n+\t */\n+\tstruct {\n+\t\tstruct rte_mbuf *mbuf;\n+\t} *txbufs;\n+\n+\t/*\n+\t * Information about the host side queue location. @txds is\n+\t * the virtual address for the queue, @dma is the DMA address\n+\t * of the queue and @size is the size in bytes for the queue\n+\t * (needed for free)\n+\t */\n+\tstruct nfp_net_tx_desc *txds;\n+\n+\t/*\n+\t * At this point 48 bytes have been used for all the fields in the\n+\t * TX critical path. We have room for 8 bytes and still all placed\n+\t * in a cache line. We are not using the threshold values below but\n+\t * if we need to, we can add the most used in the remaining bytes.\n+\t */\n+\tuint32_t tx_rs_thresh; /* not used by now. Future? */\n+\tuint32_t tx_pthresh;   /* not used by now. Future? */\n+\tuint32_t tx_hthresh;   /* not used by now. Future? */\n+\tuint32_t tx_wthresh;   /* not used by now. Future? */\n+\tuint16_t port_id;\n+\tint qidx;\n+\tint tx_qcidx;\n+\t__le64 dma;\n+} __rte_aligned(64);\n+\n+/* RX and freelist descriptor format */\n+#define PCIE_DESC_RX_DD                 (1 << 7)\n+#define PCIE_DESC_RX_META_LEN_MASK      (0x7f)\n+\n+/* Flags in the RX descriptor */\n+#define PCIE_DESC_RX_RSS                (1 << 15)\n+#define PCIE_DESC_RX_I_IP4_CSUM         (1 << 14)\n+#define PCIE_DESC_RX_I_IP4_CSUM_OK      (1 << 13)\n+#define PCIE_DESC_RX_I_TCP_CSUM         (1 << 12)\n+#define PCIE_DESC_RX_I_TCP_CSUM_OK      (1 << 11)\n+#define PCIE_DESC_RX_I_UDP_CSUM         (1 << 10)\n+#define PCIE_DESC_RX_I_UDP_CSUM_OK      (1 <<  9)\n+#define PCIE_DESC_RX_SPARE              (1 <<  8)\n+#define PCIE_DESC_RX_EOP                (1 <<  7)\n+#define PCIE_DESC_RX_IP4_CSUM           (1 <<  6)\n+#define PCIE_DESC_RX_IP4_CSUM_OK        (1 <<  5)\n+#define PCIE_DESC_RX_TCP_CSUM           (1 <<  4)\n+#define PCIE_DESC_RX_TCP_CSUM_OK        (1 <<  3)\n+#define PCIE_DESC_RX_UDP_CSUM           (1 <<  2)\n+#define PCIE_DESC_RX_UDP_CSUM_OK        (1 <<  1)\n+#define PCIE_DESC_RX_VLAN               (1 <<  0)\n+\n+#define PCIE_DESC_RX_L4_CSUM_OK         (PCIE_DESC_RX_TCP_CSUM_OK | \\\n+\t\t\t\t\t PCIE_DESC_RX_UDP_CSUM_OK)\n+\n+struct nfp_net_rx_desc {\n+\tunion {\n+\t\t/* Freelist descriptor */\n+\t\tstruct {\n+\t\t\tuint8_t dma_addr_hi;\n+\t\t\t__le16 spare;\n+\t\t\tuint8_t dd;\n+\n+\t\t\t__le32 dma_addr_lo;\n+\t\t} __rte_packed fld;\n+\n+\t\t/* RX descriptor */\n+\t\tstruct {\n+\t\t\t__le16 data_len;\n+\t\t\tuint8_t reserved;\n+\t\t\tuint8_t meta_len_dd;\n+\n+\t\t\t__le16 flags;\n+\t\t\t__le16 vlan;\n+\t\t} __rte_packed rxd;\n+\n+\t\t__le32 vals[2];\n+\t};\n+};\n+\n+struct nfp_net_rx_buff {\n+\tstruct rte_mbuf *mbuf;\n+};\n+\n+struct nfp_net_rxq {\n+\tstruct nfp_net_hw *hw;\t/* Backpointer to nfp_net structure */\n+\n+\t /*\n+\t  * @qcp_fl and @qcp_rx are pointers to the base addresses of the\n+\t  * freelist and RX queue controller peripheral queue structures on the\n+\t  * NFP\n+\t  */\n+\tuint8_t *qcp_fl;\n+\tuint8_t *qcp_rx;\n+\n+\t/*\n+\t * Read and Write pointers.  @wr_p and @rd_p are host side\n+\t * pointer, they are free running and have little relation to\n+\t * the QCP pointers. @wr_p is where the driver adds new\n+\t * freelist descriptors and @rd_p is where the driver start\n+\t * reading descriptors for newly arrive packets from.\n+\t */\n+\tuint32_t rd_p;\n+\n+\t/*\n+\t * For each buffer placed on the freelist, record the\n+\t * associated SKB\n+\t */\n+\tstruct nfp_net_rx_buff *rxbufs;\n+\n+\t/*\n+\t * Information about the host side queue location.  @rxds is\n+\t * the virtual address for the queue\n+\t */\n+\tstruct nfp_net_rx_desc *rxds;\n+\n+\t/*\n+\t * The mempool is created by the user specifying a mbuf size.\n+\t * We save here the reference of the mempool needed in the RX\n+\t * path and the mbuf size for checking received packets can be\n+\t * safely copied to the mbuf using the NFP_NET_RX_OFFSET\n+\t */\n+\tstruct rte_mempool *mem_pool;\n+\tuint16_t mbuf_size;\n+\n+\t/*\n+\t * Next two fields are used for giving more free descriptors\n+\t * to the NFP\n+\t */\n+\tuint16_t rx_free_thresh;\n+\tuint16_t nb_rx_hold;\n+\n+\t /* the size of the queue in number of descriptors */\n+\tuint16_t rx_count;\n+\n+\t/*\n+\t * Fields above this point fit in a single cache line and are all used\n+\t * in the RX critical path. Fields below this point are just used\n+\t * during queue configuration or not used at all (yet)\n+\t */\n+\n+\t/* referencing dev->data->port_id */\n+\tuint16_t port_id;\n+\n+\tuint8_t  crc_len; /* Not used by now */\n+\tuint8_t  drop_en; /* Not used by now */\n+\n+\t/* DMA address of the queue */\n+\t__le64 dma;\n+\n+\t/*\n+\t * Queue information: @qidx is the queue index from Linux's\n+\t * perspective.  @fl_qcidx is the index of the Queue\n+\t * Controller peripheral queue relative to the RX queue BAR\n+\t * used for the freelist and @rx_qcidx is the Queue Controller\n+\t * Peripheral index for the RX queue.\n+\t */\n+\tint qidx;\n+\tint fl_qcidx;\n+\tint rx_qcidx;\n+} __rte_aligned(64);\n+\n+#endif /* _NFP_RXTX_H_ */\n+/*\n+ * Local variables:\n+ * c-file-style: \"Linux\"\n+ * indent-tabs-mode: t\n+ * End:\n+ */\n+\n",
    "prefixes": [
        "v3",
        "1/7"
    ]
}