get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 16738,
    "url": "http://patches.dpdk.org/api/patches/16738/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/1477057376-16224-6-git-send-email-tomaszx.kulasek@intel.com/",
    "project": {
        "id": 1,
        "url": "http://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": "<1477057376-16224-6-git-send-email-tomaszx.kulasek@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/1477057376-16224-6-git-send-email-tomaszx.kulasek@intel.com",
    "date": "2016-10-21T13:42:55",
    "name": "[dpdk-dev,v7,5/6] ixgbe: add Tx preparation",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "1f660964a055b95cfa479195b354b63c7332f1fb",
    "submitter": {
        "id": 155,
        "url": "http://patches.dpdk.org/api/people/155/?format=api",
        "name": "Tomasz Kulasek",
        "email": "tomaszx.kulasek@intel.com"
    },
    "delegate": null,
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/1477057376-16224-6-git-send-email-tomaszx.kulasek@intel.com/mbox/",
    "series": [],
    "comments": "http://patches.dpdk.org/api/patches/16738/comments/",
    "check": "pending",
    "checks": "http://patches.dpdk.org/api/patches/16738/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "X-Original-To": "patchwork@dpdk.org",
        "Delivered-To": "patchwork@dpdk.org",
        "Received": [
            "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 806F75592;\n\tFri, 21 Oct 2016 15:43:22 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby dpdk.org (Postfix) with ESMTP id 991DF532D\n\tfor <dev@dpdk.org>; Fri, 21 Oct 2016 15:43:17 +0200 (CEST)",
            "from orsmga001.jf.intel.com ([10.7.209.18])\n\tby fmsmga101.fm.intel.com with ESMTP; 21 Oct 2016 06:43:18 -0700",
            "from unknown (HELO Sent) ([10.103.102.234])\n\tby orsmga001.jf.intel.com with SMTP; 21 Oct 2016 06:43:15 -0700",
            "by Sent (sSMTP sendmail emulation); Fri, 21 Oct 2016 15:43:13 +0200"
        ],
        "X-ExtLoop1": "1",
        "X-IronPort-AV": "E=Sophos; i=\"5.31,376,1473145200\"; d=\"scan'208\";\n\ta=\"1048018252\"",
        "From": "Tomasz Kulasek <tomaszx.kulasek@intel.com>",
        "To": "dev@dpdk.org",
        "Date": "Fri, 21 Oct 2016 15:42:55 +0200",
        "Message-Id": "<1477057376-16224-6-git-send-email-tomaszx.kulasek@intel.com>",
        "X-Mailer": "git-send-email 2.1.4",
        "In-Reply-To": "<1477057376-16224-1-git-send-email-tomaszx.kulasek@intel.com>",
        "References": "<1476457519-6840-1-git-send-email-tomaszx.kulasek@intel.com>\n\t<1477057376-16224-1-git-send-email-tomaszx.kulasek@intel.com>",
        "Subject": "[dpdk-dev] [PATCH v7 5/6] ixgbe: add Tx preparation",
        "X-BeenThere": "dev@dpdk.org",
        "X-Mailman-Version": "2.1.15",
        "Precedence": "list",
        "List-Id": "patches and discussions about DPDK <dev.dpdk.org>",
        "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>",
        "List-Archive": "<http://dpdk.org/ml/archives/dev/>",
        "List-Post": "<mailto:dev@dpdk.org>",
        "List-Help": "<mailto:dev-request@dpdk.org?subject=help>",
        "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>\n---\n drivers/net/ixgbe/ixgbe_ethdev.c |    3 ++\n drivers/net/ixgbe/ixgbe_ethdev.h |    5 +++-\n drivers/net/ixgbe/ixgbe_rxtx.c   |   58 +++++++++++++++++++++++++++++++++++++-\n drivers/net/ixgbe/ixgbe_rxtx.h   |    2 ++\n 4 files changed, 66 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c\nindex 4ca5747..4c6a8e1 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.c\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.c\n@@ -517,6 +517,8 @@ static const struct rte_eth_desc_lim tx_desc_lim = {\n \t.nb_max = IXGBE_MAX_RING_DESC,\n \t.nb_min = IXGBE_MIN_RING_DESC,\n \t.nb_align = IXGBE_TXD_ALIGN,\n+\t.nb_seg_max = IXGBE_TX_MAX_SEG,\n+\t.nb_mtu_seg_max = IXGBE_TX_MAX_SEG,\n };\n \n static const struct eth_dev_ops ixgbe_eth_dev_ops = {\n@@ -1103,6 +1105,7 @@ eth_ixgbe_dev_init(struct rte_eth_dev *eth_dev)\n \teth_dev->dev_ops = &ixgbe_eth_dev_ops;\n \teth_dev->rx_pkt_burst = &ixgbe_recv_pkts;\n \teth_dev->tx_pkt_burst = &ixgbe_xmit_pkts;\n+\teth_dev->tx_pkt_prep = &ixgbe_prep_pkts;\n \n \t/*\n \t * For secondary processes, we don't initialise any further as primary\ndiff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h\nindex 4ff6338..e229cf5 100644\n--- a/drivers/net/ixgbe/ixgbe_ethdev.h\n+++ b/drivers/net/ixgbe/ixgbe_ethdev.h\n@@ -1,7 +1,7 @@\n /*-\n  *   BSD LICENSE\n  *\n- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.\n  *   All rights reserved.\n  *\n  *   Redistribution and use in source and binary forms, with or without\n@@ -396,6 +396,9 @@ uint16_t ixgbe_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n uint16_t ixgbe_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,\n \t\tuint16_t nb_pkts);\n \n+uint16_t ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,\n+\t\tuint16_t nb_pkts);\n+\n int ixgbe_dev_rss_hash_update(struct rte_eth_dev *dev,\n \t\t\t      struct rte_eth_rss_conf *rss_conf);\n \ndiff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c\nindex 2ce8234..031414c 100644\n--- a/drivers/net/ixgbe/ixgbe_rxtx.c\n+++ b/drivers/net/ixgbe/ixgbe_rxtx.c\n@@ -1,7 +1,7 @@\n /*-\n  *   BSD LICENSE\n  *\n- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.\n+ *   Copyright(c) 2010-2016 Intel Corporation. All rights reserved.\n  *   Copyright 2014 6WIND S.A.\n  *   All rights reserved.\n  *\n@@ -70,6 +70,7 @@\n #include <rte_string_fns.h>\n #include <rte_errno.h>\n #include <rte_ip.h>\n+#include <rte_net.h>\n \n #include \"ixgbe_logs.h\"\n #include \"base/ixgbe_api.h\"\n@@ -87,6 +88,9 @@\n \t\tPKT_TX_TCP_SEG |\t\t \\\n \t\tPKT_TX_OUTER_IP_CKSUM)\n \n+#define IXGBE_TX_OFFLOAD_NOTSUP_MASK \\\n+\t\t(PKT_TX_OFFLOAD_MASK ^ IXGBE_TX_OFFLOAD_MASK)\n+\n #if 1\n #define RTE_PMD_USE_PREFETCH\n #endif\n@@ -905,6 +909,56 @@ end_of_tx:\n \n /*********************************************************************\n  *\n+ *  TX prep functions\n+ *\n+ **********************************************************************/\n+uint16_t\n+ixgbe_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)\n+{\n+\tint i, ret;\n+\tuint64_t ol_flags;\n+\tstruct rte_mbuf *m;\n+\tstruct ixgbe_tx_queue *txq = (struct ixgbe_tx_queue *)tx_queue;\n+\n+\tfor (i = 0; i < nb_pkts; i++) {\n+\t\tm = tx_pkts[i];\n+\t\tol_flags = m->ol_flags;\n+\n+\t\t/**\n+\t\t * Check if packet meets requirements for number of segments\n+\t\t *\n+\t\t * NOTE: for ixgbe it's always (40 - WTHRESH) for both TSO and non-TSO\n+\t\t */\n+\n+\t\tif (m->nb_segs > IXGBE_TX_MAX_SEG - txq->wthresh) {\n+\t\t\trte_errno = -EINVAL;\n+\t\t\treturn i;\n+\t\t}\n+\n+\t\tif (ol_flags & IXGBE_TX_OFFLOAD_NOTSUP_MASK) {\n+\t\t\trte_errno = -ENOTSUP;\n+\t\t\treturn i;\n+\t\t}\n+\n+#ifdef RTE_LIBRTE_ETHDEV_DEBUG\n+\t\tret = rte_validate_tx_offload(m);\n+\t\tif (ret != 0) {\n+\t\t\trte_errno = ret;\n+\t\t\treturn i;\n+\t\t}\n+#endif\n+\t\tret = rte_phdr_cksum_fix(m);\n+\t\tif (ret != 0) {\n+\t\t\trte_errno = ret;\n+\t\t\treturn i;\n+\t\t}\n+\t}\n+\n+\treturn i;\n+}\n+\n+/*********************************************************************\n+ *\n  *  RX functions\n  *\n  **********************************************************************/\n@@ -2282,6 +2336,7 @@ ixgbe_set_tx_function(struct rte_eth_dev *dev, struct ixgbe_tx_queue *txq)\n \tif (((txq->txq_flags & IXGBE_SIMPLE_FLAGS) == IXGBE_SIMPLE_FLAGS)\n \t\t\t&& (txq->tx_rs_thresh >= RTE_PMD_IXGBE_TX_MAX_BURST)) {\n \t\tPMD_INIT_LOG(DEBUG, \"Using simple tx code path\");\n+\t\tdev->tx_pkt_prep = NULL;\n #ifdef RTE_IXGBE_INC_VECTOR\n \t\tif (txq->tx_rs_thresh <= RTE_IXGBE_TX_MAX_FREE_BUF_SZ &&\n \t\t\t\t(rte_eal_process_type() != RTE_PROC_PRIMARY ||\n@@ -2302,6 +2357,7 @@ ixgbe_set_tx_function(struct rte_eth_dev *dev, struct ixgbe_tx_queue *txq)\n \t\t\t\t(unsigned long)txq->tx_rs_thresh,\n \t\t\t\t(unsigned long)RTE_PMD_IXGBE_TX_MAX_BURST);\n \t\tdev->tx_pkt_burst = ixgbe_xmit_pkts;\n+\t\tdev->tx_pkt_prep = ixgbe_prep_pkts;\n \t}\n }\n \ndiff --git a/drivers/net/ixgbe/ixgbe_rxtx.h b/drivers/net/ixgbe/ixgbe_rxtx.h\nindex 2608b36..7bbd9b8 100644\n--- a/drivers/net/ixgbe/ixgbe_rxtx.h\n+++ b/drivers/net/ixgbe/ixgbe_rxtx.h\n@@ -80,6 +80,8 @@\n #define RTE_IXGBE_WAIT_100_US               100\n #define RTE_IXGBE_VMTXSW_REGISTER_COUNT     2\n \n+#define IXGBE_TX_MAX_SEG                    40\n+\n #define IXGBE_PACKET_TYPE_MASK_82599        0X7F\n #define IXGBE_PACKET_TYPE_MASK_X550         0X10FF\n #define IXGBE_PACKET_TYPE_MASK_TUNNEL       0XFF\n",
    "prefixes": [
        "dpdk-dev",
        "v7",
        "5/6"
    ]
}