get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 115680,
    "url": "https://patches.dpdk.org/api/patches/115680/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/1661899911-13086-16-git-send-email-longli@linuxonhyperv.com/",
    "project": {
        "id": 1,
        "url": "https://patches.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": "<1661899911-13086-16-git-send-email-longli@linuxonhyperv.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1661899911-13086-16-git-send-email-longli@linuxonhyperv.com",
    "date": "2022-08-30T22:51:48",
    "name": "[v6,15/18] net/mana: add function to send packets",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "79a24ef3701adb3d9fe5bde946890919b54f01f3",
    "submitter": {
        "id": 1784,
        "url": "https://patches.dpdk.org/api/people/1784/?format=api",
        "name": "Long Li",
        "email": "longli@linuxonhyperv.com"
    },
    "delegate": {
        "id": 319,
        "url": "https://patches.dpdk.org/api/users/319/?format=api",
        "username": "fyigit",
        "first_name": "Ferruh",
        "last_name": "Yigit",
        "email": "ferruh.yigit@amd.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/1661899911-13086-16-git-send-email-longli@linuxonhyperv.com/mbox/",
    "series": [
        {
            "id": 24471,
            "url": "https://patches.dpdk.org/api/series/24471/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=24471",
            "date": "2022-08-30T22:51:33",
            "name": "Introduce Microsoft Azure Network Adatper (MANA) PMD",
            "version": 6,
            "mbox": "https://patches.dpdk.org/series/24471/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/115680/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/115680/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 16977A00C5;\n\tWed, 31 Aug 2022 00:53:27 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 7A80F42BA8;\n\tWed, 31 Aug 2022 00:52:12 +0200 (CEST)",
            "from linux.microsoft.com (linux.microsoft.com [13.77.154.182])\n by mails.dpdk.org (Postfix) with ESMTP id 0C5F042B8A\n for <dev@dpdk.org>; Wed, 31 Aug 2022 00:52:07 +0200 (CEST)",
            "by linux.microsoft.com (Postfix, from userid 1004)\n id BA5F42045E25; Tue, 30 Aug 2022 15:52:06 -0700 (PDT)"
        ],
        "DKIM-Filter": "OpenDKIM Filter v2.11.0 linux.microsoft.com BA5F42045E25",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxonhyperv.com;\n s=default; t=1661899926;\n bh=f4Kci8hvk3pipDeK4rJVz4pVT/G01ORfMO8puOmGhiM=;\n h=From:To:Cc:Subject:Date:In-Reply-To:References:Reply-To:From;\n b=QgemapFhLjtE2qu/HzKgmhIXBEvNQQGQZISPLEYQMIUrLNs60rzETspaz5S68yhSZ\n kiBFHzl6pjFFnLzwnaIx7nLRDPjy00d8XoktamCgwknA/WYwThhrM6UKBe9MItf/Jn\n jttC+Mo//5GIM4CmxlM3RMTdw8Aynvro3atMSW2s=",
        "From": "longli@linuxonhyperv.com",
        "To": "Ferruh Yigit <ferruh.yigit@xilinx.com>",
        "Cc": "dev@dpdk.org, Ajay Sharma <sharmaajay@microsoft.com>,\n Stephen Hemminger <sthemmin@microsoft.com>, Long Li <longli@microsoft.com>",
        "Subject": "[Patch v6 15/18] net/mana: add function to send packets",
        "Date": "Tue, 30 Aug 2022 15:51:48 -0700",
        "Message-Id": "<1661899911-13086-16-git-send-email-longli@linuxonhyperv.com>",
        "X-Mailer": "git-send-email 1.8.3.1",
        "In-Reply-To": "<1661899911-13086-1-git-send-email-longli@linuxonhyperv.com>",
        "References": "<1661899911-13086-1-git-send-email-longli@linuxonhyperv.com>",
        "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>",
        "Reply-To": "longli@microsoft.com",
        "Errors-To": "dev-bounces@dpdk.org"
    },
    "content": "From: Long Li <longli@microsoft.com>\n\nWith all the TX queues created, MANA can send packets over those queues.\n\nSigned-off-by: Long Li <longli@microsoft.com>\n---\nChange log:\nv2:\nRename all camel cases.\n\n doc/guides/nics/features/mana.ini |   1 +\n drivers/net/mana/mana.c           |   1 +\n drivers/net/mana/mana.h           |  65 ++++++++\n drivers/net/mana/mp.c             |   1 +\n drivers/net/mana/tx.c             | 241 ++++++++++++++++++++++++++++++\n 5 files changed, 309 insertions(+)",
    "diff": "diff --git a/doc/guides/nics/features/mana.ini b/doc/guides/nics/features/mana.ini\nindex fdbf22d335..7922816d66 100644\n--- a/doc/guides/nics/features/mana.ini\n+++ b/doc/guides/nics/features/mana.ini\n@@ -4,6 +4,7 @@\n ; Refer to default.ini for the full list of available PMD features.\n ;\n [Features]\n+Free Tx mbuf on demand = Y\n Link status          = P\n Linux                = Y\n L3 checksum offload  = Y\ndiff --git a/drivers/net/mana/mana.c b/drivers/net/mana/mana.c\nindex c349822991..0dcd3f3124 100644\n--- a/drivers/net/mana/mana.c\n+++ b/drivers/net/mana/mana.c\n@@ -950,6 +950,7 @@ static int mana_pci_probe_mac(struct rte_pci_driver *pci_drv __rte_unused,\n \t\t\t\t/* fd is no not used after mapping doorbell */\n \t\t\t\tclose(fd);\n \n+\t\t\t\teth_dev->tx_pkt_burst = mana_tx_burst;\n \t\t\t\teth_dev->rx_pkt_burst = mana_rx_burst;\n \n \t\t\t\trte_spinlock_lock(&mana_shared_data->lock);\ndiff --git a/drivers/net/mana/mana.h b/drivers/net/mana/mana.h\nindex bafc4d6082..b4056bd50b 100644\n--- a/drivers/net/mana/mana.h\n+++ b/drivers/net/mana/mana.h\n@@ -62,6 +62,47 @@ struct mana_shared_data {\n \n #define NOT_USING_CLIENT_DATA_UNIT 0\n \n+enum tx_packet_format_v2 {\n+\tshort_packet_format = 0,\n+\tlong_packet_format = 1\n+};\n+\n+struct transmit_short_oob_v2 {\n+\tenum tx_packet_format_v2 packet_format : 2;\n+\tuint32_t tx_is_outer_ipv4 : 1;\n+\tuint32_t tx_is_outer_ipv6 : 1;\n+\tuint32_t tx_compute_IP_header_checksum : 1;\n+\tuint32_t tx_compute_TCP_checksum : 1;\n+\tuint32_t tx_compute_UDP_checksum : 1;\n+\tuint32_t suppress_tx_CQE_generation : 1;\n+\tuint32_t VCQ_number : 24;\n+\tuint32_t tx_transport_header_offset : 10;\n+\tuint32_t VSQ_frame_num : 14;\n+\tuint32_t short_vport_offset : 8;\n+};\n+\n+struct transmit_long_oob_v2 {\n+\tuint32_t tx_is_encapsulated_packet : 1;\n+\tuint32_t tx_inner_is_ipv6 : 1;\n+\tuint32_t tx_inner_TCP_options_present : 1;\n+\tuint32_t inject_vlan_prior_tag : 1;\n+\tuint32_t reserved1 : 12;\n+\tuint32_t priority_code_point : 3;\n+\tuint32_t drop_eligible_indicator : 1;\n+\tuint32_t vlan_identifier : 12;\n+\tuint32_t tx_inner_frame_offset : 10;\n+\tuint32_t tx_inner_IP_header_relative_offset : 6;\n+\tuint32_t long_vport_offset : 12;\n+\tuint32_t reserved3 : 4;\n+\tuint32_t reserved4 : 32;\n+\tuint32_t reserved5 : 32;\n+};\n+\n+struct transmit_oob_v2 {\n+\tstruct transmit_short_oob_v2 short_oob;\n+\tstruct transmit_long_oob_v2 long_oob;\n+};\n+\n enum gdma_queue_types {\n \tgdma_queue_type_invalid = 0,\n \tgdma_queue_send,\n@@ -183,6 +224,17 @@ enum mana_cqe_type {\n \tCQE_RX_COALESCED_4              = 2,\n \tCQE_RX_OBJECT_FENCE             = 3,\n \tCQE_RX_TRUNCATED                = 4,\n+\n+\tCQE_TX_OKAY                     = 32,\n+\tCQE_TX_SA_DROP                  = 33,\n+\tCQE_TX_MTU_DROP                 = 34,\n+\tCQE_TX_INVALID_OOB              = 35,\n+\tCQE_TX_INVALID_ETH_TYPE         = 36,\n+\tCQE_TX_HDR_PROCESSING_ERROR     = 37,\n+\tCQE_TX_VF_DISABLED              = 38,\n+\tCQE_TX_VPORT_IDX_OUT_OF_RANGE   = 39,\n+\tCQE_TX_VPORT_DISABLED           = 40,\n+\tCQE_TX_VLAN_TAGGING_VIOLATION   = 41,\n };\n \n struct mana_cqe_header {\n@@ -191,6 +243,17 @@ struct mana_cqe_header {\n \tuint32_t vendor_err  : 24;\n }; /* HW DATA */\n \n+struct mana_tx_comp_oob {\n+\tstruct mana_cqe_header cqe_hdr;\n+\n+\tuint32_t tx_data_offset;\n+\n+\tuint32_t tx_sgl_offset       : 5;\n+\tuint32_t tx_wqe_offset       : 27;\n+\n+\tuint32_t reserved[12];\n+}; /* HW DATA */\n+\n /* NDIS HASH Types */\n #define BIT(nr)\t\t(1 << (nr))\n #define NDIS_HASH_IPV4          BIT(0)\n@@ -407,6 +470,8 @@ uint8_t *gdma_get_wqe_pointer(struct mana_gdma_queue *queue);\n \n uint16_t mana_rx_burst(void *dpdk_rxq, struct rte_mbuf **rx_pkts,\n \t\t       uint16_t pkts_n);\n+uint16_t mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts,\n+\t\t       uint16_t pkts_n);\n \n uint16_t mana_rx_burst_removed(void *dpdk_rxq, struct rte_mbuf **pkts,\n \t\t\t       uint16_t pkts_n);\ndiff --git a/drivers/net/mana/mp.c b/drivers/net/mana/mp.c\nindex 36a88c561a..da9c0f36a1 100644\n--- a/drivers/net/mana/mp.c\n+++ b/drivers/net/mana/mp.c\n@@ -138,6 +138,7 @@ static int mana_mp_secondary_handle(const struct rte_mp_msg *mp_msg,\n \tcase MANA_MP_REQ_START_RXTX:\n \t\tDRV_LOG(INFO, \"Port %u starting datapath\", dev->data->port_id);\n \n+\t\tdev->tx_pkt_burst = mana_tx_burst;\n \t\tdev->rx_pkt_burst = mana_rx_burst;\n \n \t\trte_mb();\ndiff --git a/drivers/net/mana/tx.c b/drivers/net/mana/tx.c\nindex fbeea40ef2..0aefab1b6c 100644\n--- a/drivers/net/mana/tx.c\n+++ b/drivers/net/mana/tx.c\n@@ -161,3 +161,244 @@ static inline uint16_t get_vsq_frame_num(uint32_t vsq)\n \tv.gdma_txq_id = vsq;\n \treturn v.vsq_frame;\n }\n+\n+uint16_t mana_tx_burst(void *dpdk_txq, struct rte_mbuf **tx_pkts,\n+\t\t       uint16_t nb_pkts)\n+{\n+\tstruct mana_txq *txq = dpdk_txq;\n+\tstruct mana_priv *priv = txq->priv;\n+\tstruct gdma_comp comp;\n+\tint ret;\n+\tvoid *db_page;\n+\n+\t/* Process send completions from GDMA */\n+\twhile (gdma_poll_completion_queue(&txq->gdma_cq, &comp) == 1) {\n+\t\tstruct mana_txq_desc *desc =\n+\t\t\t&txq->desc_ring[txq->desc_ring_tail];\n+\t\tstruct mana_tx_comp_oob *oob =\n+\t\t\t(struct mana_tx_comp_oob *)&comp.completion_data[0];\n+\n+\t\tif (oob->cqe_hdr.cqe_type != CQE_TX_OKAY) {\n+\t\t\tDRV_LOG(ERR,\n+\t\t\t\t\"mana_tx_comp_oob cqe_type %u vendor_err %u\",\n+\t\t\t\toob->cqe_hdr.cqe_type, oob->cqe_hdr.vendor_err);\n+\t\t\ttxq->stats.errors++;\n+\t\t} else {\n+\t\t\tDRV_LOG(DEBUG, \"mana_tx_comp_oob CQE_TX_OKAY\");\n+\t\t\ttxq->stats.packets++;\n+\t\t}\n+\n+\t\tif (!desc->pkt) {\n+\t\t\tDRV_LOG(ERR, \"mana_txq_desc has a NULL pkt\");\n+\t\t} else {\n+\t\t\ttxq->stats.bytes += desc->pkt->data_len;\n+\t\t\trte_pktmbuf_free(desc->pkt);\n+\t\t}\n+\n+\t\tdesc->pkt = NULL;\n+\t\ttxq->desc_ring_tail = (txq->desc_ring_tail + 1) % txq->num_desc;\n+\t\ttxq->gdma_sq.tail += desc->wqe_size_in_bu;\n+\t}\n+\n+\t/* Post send requests to GDMA */\n+\tuint16_t pkt_idx;\n+\n+\tfor (pkt_idx = 0; pkt_idx < nb_pkts; pkt_idx++) {\n+\t\tstruct rte_mbuf *m_pkt = tx_pkts[pkt_idx];\n+\t\tstruct rte_mbuf *m_seg = m_pkt;\n+\t\tstruct transmit_oob_v2 tx_oob = {0};\n+\t\tstruct one_sgl sgl = {0};\n+\n+\t\t/* Drop the packet if it exceeds max segments */\n+\t\tif (m_pkt->nb_segs > priv->max_send_sge) {\n+\t\t\tDRV_LOG(ERR, \"send packet segments %d exceeding max\",\n+\t\t\t\tm_pkt->nb_segs);\n+\t\t\tcontinue;\n+\t\t}\n+\n+\t\t/* Fill in the oob */\n+\t\ttx_oob.short_oob.packet_format = short_packet_format;\n+\t\ttx_oob.short_oob.tx_is_outer_ipv4 =\n+\t\t\tm_pkt->ol_flags & RTE_MBUF_F_TX_IPV4 ? 1 : 0;\n+\t\ttx_oob.short_oob.tx_is_outer_ipv6 =\n+\t\t\tm_pkt->ol_flags & RTE_MBUF_F_TX_IPV6 ? 1 : 0;\n+\n+\t\ttx_oob.short_oob.tx_compute_IP_header_checksum =\n+\t\t\tm_pkt->ol_flags & RTE_MBUF_F_TX_IP_CKSUM ? 1 : 0;\n+\n+\t\tif ((m_pkt->ol_flags & RTE_MBUF_F_TX_L4_MASK) ==\n+\t\t\t\tRTE_MBUF_F_TX_TCP_CKSUM) {\n+\t\t\tstruct rte_tcp_hdr *tcp_hdr;\n+\n+\t\t\t/* HW needs partial TCP checksum */\n+\n+\t\t\ttcp_hdr = rte_pktmbuf_mtod_offset(m_pkt,\n+\t\t\t\t\t  struct rte_tcp_hdr *,\n+\t\t\t\t\t  m_pkt->l2_len + m_pkt->l3_len);\n+\n+\t\t\tif (m_pkt->ol_flags & RTE_MBUF_F_TX_IPV4) {\n+\t\t\t\tstruct rte_ipv4_hdr *ip_hdr;\n+\n+\t\t\t\tip_hdr = rte_pktmbuf_mtod_offset(m_pkt,\n+\t\t\t\t\t\tstruct rte_ipv4_hdr *,\n+\t\t\t\t\t\tm_pkt->l2_len);\n+\t\t\t\ttcp_hdr->cksum = rte_ipv4_phdr_cksum(ip_hdr,\n+\t\t\t\t\t\t\tm_pkt->ol_flags);\n+\n+\t\t\t} else if (m_pkt->ol_flags & RTE_MBUF_F_TX_IPV6) {\n+\t\t\t\tstruct rte_ipv6_hdr *ip_hdr;\n+\n+\t\t\t\tip_hdr = rte_pktmbuf_mtod_offset(m_pkt,\n+\t\t\t\t\t\tstruct rte_ipv6_hdr *,\n+\t\t\t\t\t\tm_pkt->l2_len);\n+\t\t\t\ttcp_hdr->cksum = rte_ipv6_phdr_cksum(ip_hdr,\n+\t\t\t\t\t\t\tm_pkt->ol_flags);\n+\t\t\t} else {\n+\t\t\t\tDRV_LOG(ERR, \"Invalid input for TCP CKSUM\");\n+\t\t\t}\n+\n+\t\t\ttx_oob.short_oob.tx_compute_TCP_checksum = 1;\n+\t\t\ttx_oob.short_oob.tx_transport_header_offset =\n+\t\t\t\tm_pkt->l2_len + m_pkt->l3_len;\n+\t\t}\n+\n+\t\tif ((m_pkt->ol_flags & RTE_MBUF_F_TX_L4_MASK) ==\n+\t\t\t\tRTE_MBUF_F_TX_UDP_CKSUM) {\n+\t\t\tstruct rte_udp_hdr *udp_hdr;\n+\n+\t\t\t/* HW needs partial UDP checksum */\n+\t\t\tudp_hdr = rte_pktmbuf_mtod_offset(m_pkt,\n+\t\t\t\t\tstruct rte_udp_hdr *,\n+\t\t\t\t\tm_pkt->l2_len + m_pkt->l3_len);\n+\n+\t\t\tif (m_pkt->ol_flags & RTE_MBUF_F_TX_IPV4) {\n+\t\t\t\tstruct rte_ipv4_hdr *ip_hdr;\n+\n+\t\t\t\tip_hdr = rte_pktmbuf_mtod_offset(m_pkt,\n+\t\t\t\t\t\tstruct rte_ipv4_hdr *,\n+\t\t\t\t\t\tm_pkt->l2_len);\n+\n+\t\t\t\tudp_hdr->dgram_cksum =\n+\t\t\t\t\trte_ipv4_phdr_cksum(ip_hdr,\n+\t\t\t\t\t\t\t    m_pkt->ol_flags);\n+\n+\t\t\t} else if (m_pkt->ol_flags & RTE_MBUF_F_TX_IPV6) {\n+\t\t\t\tstruct rte_ipv6_hdr *ip_hdr;\n+\n+\t\t\t\tip_hdr = rte_pktmbuf_mtod_offset(m_pkt,\n+\t\t\t\t\t\tstruct rte_ipv6_hdr *,\n+\t\t\t\t\t\tm_pkt->l2_len);\n+\n+\t\t\t\tudp_hdr->dgram_cksum =\n+\t\t\t\t\trte_ipv6_phdr_cksum(ip_hdr,\n+\t\t\t\t\t\t\t    m_pkt->ol_flags);\n+\n+\t\t\t} else {\n+\t\t\t\tDRV_LOG(ERR, \"Invalid input for UDP CKSUM\");\n+\t\t\t}\n+\n+\t\t\ttx_oob.short_oob.tx_compute_UDP_checksum = 1;\n+\t\t}\n+\n+\t\ttx_oob.short_oob.suppress_tx_CQE_generation = 0;\n+\t\ttx_oob.short_oob.VCQ_number = txq->gdma_cq.id;\n+\n+\t\ttx_oob.short_oob.VSQ_frame_num =\n+\t\t\tget_vsq_frame_num(txq->gdma_sq.id);\n+\t\ttx_oob.short_oob.short_vport_offset = txq->tx_vp_offset;\n+\n+\t\tDRV_LOG(DEBUG, \"tx_oob packet_format %u ipv4 %u ipv6 %u\",\n+\t\t\ttx_oob.short_oob.packet_format,\n+\t\t\ttx_oob.short_oob.tx_is_outer_ipv4,\n+\t\t\ttx_oob.short_oob.tx_is_outer_ipv6);\n+\n+\t\tDRV_LOG(DEBUG, \"tx_oob checksum ip %u tcp %u udp %u offset %u\",\n+\t\t\ttx_oob.short_oob.tx_compute_IP_header_checksum,\n+\t\t\ttx_oob.short_oob.tx_compute_TCP_checksum,\n+\t\t\ttx_oob.short_oob.tx_compute_UDP_checksum,\n+\t\t\ttx_oob.short_oob.tx_transport_header_offset);\n+\n+\t\tDRV_LOG(DEBUG, \"pkt[%d]: buf_addr 0x%p, nb_segs %d, pkt_len %d\",\n+\t\t\tpkt_idx, m_pkt->buf_addr, m_pkt->nb_segs,\n+\t\t\tm_pkt->pkt_len);\n+\n+\t\t/* Create SGL for packet data buffers */\n+\t\tfor (uint16_t seg_idx = 0; seg_idx < m_pkt->nb_segs; seg_idx++) {\n+\t\t\tstruct mana_mr_cache *mr =\n+\t\t\t\tmana_find_pmd_mr(&txq->mr_btree, priv, m_seg);\n+\n+\t\t\tif (!mr) {\n+\t\t\t\tDRV_LOG(ERR, \"failed to get MR, pkt_idx %u\",\n+\t\t\t\t\tpkt_idx);\n+\t\t\t\treturn pkt_idx;\n+\t\t\t}\n+\n+\t\t\tsgl.gdma_sgl[seg_idx].address =\n+\t\t\t\trte_cpu_to_le_64(rte_pktmbuf_mtod(m_seg,\n+\t\t\t\t\t\t\t\t  uint64_t));\n+\t\t\tsgl.gdma_sgl[seg_idx].size = m_seg->data_len;\n+\t\t\tsgl.gdma_sgl[seg_idx].memory_key = mr->lkey;\n+\n+\t\t\tDRV_LOG(DEBUG,\n+\t\t\t\t\"seg idx %u addr 0x%\" PRIx64 \" size %x key %x\",\n+\t\t\t\tseg_idx, sgl.gdma_sgl[seg_idx].address,\n+\t\t\t\tsgl.gdma_sgl[seg_idx].size,\n+\t\t\t\tsgl.gdma_sgl[seg_idx].memory_key);\n+\n+\t\t\tm_seg = m_seg->next;\n+\t\t}\n+\n+\t\tstruct gdma_work_request work_req = {0};\n+\t\tstruct gdma_posted_wqe_info wqe_info = {0};\n+\n+\t\twork_req.gdma_header.struct_size = sizeof(work_req);\n+\t\twqe_info.gdma_header.struct_size = sizeof(wqe_info);\n+\n+\t\twork_req.sgl = sgl.gdma_sgl;\n+\t\twork_req.num_sgl_elements = m_pkt->nb_segs;\n+\t\twork_req.inline_oob_size_in_bytes =\n+\t\t\tsizeof(struct transmit_short_oob_v2);\n+\t\twork_req.inline_oob_data = &tx_oob;\n+\t\twork_req.flags = 0;\n+\t\twork_req.client_data_unit = NOT_USING_CLIENT_DATA_UNIT;\n+\n+\t\tret = gdma_post_work_request(&txq->gdma_sq, &work_req,\n+\t\t\t\t\t     &wqe_info);\n+\t\tif (!ret) {\n+\t\t\tstruct mana_txq_desc *desc =\n+\t\t\t\t&txq->desc_ring[txq->desc_ring_head];\n+\n+\t\t\t/* Update queue for tracking pending requests */\n+\t\t\tdesc->pkt = m_pkt;\n+\t\t\tdesc->wqe_size_in_bu = wqe_info.wqe_size_in_bu;\n+\t\t\ttxq->desc_ring_head =\n+\t\t\t\t(txq->desc_ring_head + 1) % txq->num_desc;\n+\n+\t\t\tDRV_LOG(DEBUG, \"nb_pkts %u pkt[%d] sent\",\n+\t\t\t\tnb_pkts, pkt_idx);\n+\t\t} else {\n+\t\t\tDRV_LOG(INFO, \"pkt[%d] failed to post send ret %d\",\n+\t\t\t\tpkt_idx, ret);\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\t/* Ring hardware door bell */\n+\tdb_page = priv->db_page;\n+\tif (rte_eal_process_type() == RTE_PROC_SECONDARY) {\n+\t\tstruct rte_eth_dev *dev =\n+\t\t\t&rte_eth_devices[priv->dev_data->port_id];\n+\t\tstruct mana_process_priv *process_priv = dev->process_private;\n+\n+\t\tdb_page = process_priv->db_page;\n+\t}\n+\n+\tret = mana_ring_doorbell(db_page, gdma_queue_send,\n+\t\t\t\t txq->gdma_sq.id,\n+\t\t\t\t txq->gdma_sq.head *\n+\t\t\t\t\tGDMA_WQE_ALIGNMENT_UNIT_SIZE);\n+\tif (ret)\n+\t\tDRV_LOG(ERR, \"mana_ring_doorbell failed ret %d\", ret);\n+\n+\treturn pkt_idx;\n+}\n",
    "prefixes": [
        "v6",
        "15/18"
    ]
}