get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 86735,
    "url": "https://patches.dpdk.org/api/patches/86735/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210118050341.1460-1-alvinx.zhang@intel.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": "<20210118050341.1460-1-alvinx.zhang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210118050341.1460-1-alvinx.zhang@intel.com",
    "date": "2021-01-18T05:03:41",
    "name": "[v5] net/ixgbe: fix configuration of max frame size",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "790bd2794d9166e1f13073e84ee3e4fe235c8b06",
    "submitter": {
        "id": 1398,
        "url": "https://patches.dpdk.org/api/people/1398/?format=api",
        "name": "Alvin Zhang",
        "email": "alvinx.zhang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "https://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210118050341.1460-1-alvinx.zhang@intel.com/mbox/",
    "series": [
        {
            "id": 14796,
            "url": "https://patches.dpdk.org/api/series/14796/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14796",
            "date": "2021-01-18T05:03:41",
            "name": "[v5] net/ixgbe: fix configuration of max frame size",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/14796/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/86735/comments/",
    "check": "fail",
    "checks": "https://patches.dpdk.org/api/patches/86735/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 1FDC2A0A03;\n\tMon, 18 Jan 2021 06:04:08 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id A3206140D9C;\n\tMon, 18 Jan 2021 06:04:07 +0100 (CET)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 8F282140D26;\n Mon, 18 Jan 2021 06:04:01 +0100 (CET)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Jan 2021 21:03:49 -0800",
            "from shwdenpg235.ccr.corp.intel.com ([10.240.182.60])\n by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 17 Jan 2021 21:03:46 -0800"
        ],
        "IronPort-SDR": [
            "\n W6SJEpHAAS+XYhLp1D2047CIHrmDf4C1uvGTafNl5fjGNKYFzrHJLFkS5lU9/gw8unRkGggsSK\n /oxrpCFvOmhQ==",
            "\n x9qcAX8fqZrNQpTuNzdz2j8wxzhTHLK+uucfLrangzz7pGZrHI5QV3aZXeTdYrAPz4xkwN3YcF\n Lh2XutaXSX9w=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9867\"; a=\"197451152\"",
            "E=Sophos;i=\"5.79,355,1602572400\"; d=\"scan'208\";a=\"197451152\"",
            "E=Sophos;i=\"5.79,355,1602572400\"; d=\"scan'208\";a=\"401927462\""
        ],
        "From": "\"Zhang,Alvin\" <alvinx.zhang@intel.com>",
        "To": "jia.guo@intel.com,\n\tWeiX.Xie@intel.com,\n\thaiyue.wang@intel.com",
        "Cc": "dev@dpdk.org,\n\tAlvin Zhang <alvinx.zhang@intel.com>,\n\tstable@dpdk.org",
        "Date": "Mon, 18 Jan 2021 13:03:41 +0800",
        "Message-Id": "<20210118050341.1460-1-alvinx.zhang@intel.com>",
        "X-Mailer": "git-send-email 2.21.0.windows.1",
        "In-Reply-To": "<20210115100829.31980-1-alvinx.zhang@intel.com>",
        "References": "<20210115100829.31980-1-alvinx.zhang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5] net/ixgbe: fix configuration of max frame size",
        "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": "From: Alvin Zhang <alvinx.zhang@intel.com>\n\nFor some types of NIC, jumbo frame is not supported in IOV mode,\nso if a VF requests to configure the frame size to not bigger\nthan RTE_ETHER_MAX_LEN, the kernel driver returns 0, but the DPDK\nixgbe PMD returens -1, this will cause the VF to fail to start\nwhen the PF driven by DPDK ixgbe PMD.\n\nThis patch keeps ixgbe PMD's handling mode consistent with kernel\ndriver in above situation.\n\nIn addition, the value set by the command IXGBE_VF_SET_LPE\nrepresents the max frame size, not the mtu.\n\nFixes: 1b9ea09c067b (\"ixgbe: support X550\")\nFixes: 95a27b3ba5f5 (\"net/ixgbe: enable jumbo frame for VF\")\nCc: stable@dpdk.org\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\n---\n\nV3: Restore variable name from cur_frame_size to max_frs.\nV4: Update git log and add notes.\nV5: Add check for VF api version.\n---\n drivers/net/ixgbe/ixgbe_pf.c | 43 +++++++++++++++++++++++++++++++++++--------\n 1 file changed, 35 insertions(+), 8 deletions(-)",
    "diff": "diff --git a/drivers/net/ixgbe/ixgbe_pf.c b/drivers/net/ixgbe/ixgbe_pf.c\nindex 833863a..793f970 100644\n--- a/drivers/net/ixgbe/ixgbe_pf.c\n+++ b/drivers/net/ixgbe/ixgbe_pf.c\n@@ -552,20 +552,47 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)\n }\n \n static int\n-ixgbe_set_vf_lpe(struct rte_eth_dev *dev, __rte_unused uint32_t vf, uint32_t *msgbuf)\n+ixgbe_set_vf_lpe(struct rte_eth_dev *dev, uint32_t vf, uint32_t *msgbuf)\n {\n \tstruct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n-\tuint32_t new_mtu = msgbuf[1];\n+\tuint32_t max_frame = msgbuf[1];\n \tuint32_t max_frs;\n \tuint32_t hlreg0;\n-\tint max_frame = new_mtu + RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN;\n \n \t/* X540 and X550 support jumbo frames in IOV mode */\n \tif (hw->mac.type != ixgbe_mac_X540 &&\n \t\thw->mac.type != ixgbe_mac_X550 &&\n \t\thw->mac.type != ixgbe_mac_X550EM_x &&\n-\t\thw->mac.type != ixgbe_mac_X550EM_a)\n-\t\treturn -1;\n+\t\thw->mac.type != ixgbe_mac_X550EM_a) {\n+\t\tstruct ixgbe_vf_info *vfinfo =\n+\t\t\t*IXGBE_DEV_PRIVATE_TO_P_VFDATA(dev->data->dev_private);\n+\n+\t\tswitch (vfinfo[vf].api_version) {\n+\t\tcase ixgbe_mbox_api_11:\n+\t\tcase ixgbe_mbox_api_12:\n+\t\tcase ixgbe_mbox_api_13:\n+\t\t\t /**\n+\t\t\t  * Version 1.1 supports jumbo frames on VFs if PF has\n+\t\t\t  * jumbo frames enabled which means legacy VFs are\n+\t\t\t  * disabled\n+\t\t\t  */\n+\t\t\tif (dev->data->dev_conf.rxmode.max_rx_pkt_len >\n+\t\t\t    RTE_ETHER_MAX_LEN)\n+\t\t\t\tbreak;\n+\t\t\t/* fall through */\n+\t\tdefault:\n+\t\t\t/**\n+\t\t\t * If the PF or VF are running jumbo frames enabled,\n+\t\t\t * return -1 since cannot support jumbo frames on\n+\t\t\t * legacy VFs.\n+\t\t\t */\n+\t\t\tif (max_frame > RTE_ETHER_MAX_LEN ||\n+\t\t\t    dev->data->dev_conf.rxmode.max_rx_pkt_len >\n+\t\t\t    RTE_ETHER_MAX_LEN)\n+\t\t\t\treturn -1;\n+\t\t\tbreak;\n+\t\t}\n+\t}\n \n \tif (max_frame < RTE_ETHER_MIN_LEN ||\n \t\t\tmax_frame > RTE_ETHER_MAX_JUMBO_FRAME_LEN)\n@@ -573,9 +600,9 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)\n \n \tmax_frs = (IXGBE_READ_REG(hw, IXGBE_MAXFRS) &\n \t\t   IXGBE_MHADD_MFS_MASK) >> IXGBE_MHADD_MFS_SHIFT;\n-\tif (max_frs < new_mtu) {\n+\tif (max_frs < max_frame) {\n \t\thlreg0 = IXGBE_READ_REG(hw, IXGBE_HLREG0);\n-\t\tif (new_mtu > RTE_ETHER_MAX_LEN) {\n+\t\tif (max_frame > RTE_ETHER_MAX_LEN) {\n \t\t\tdev->data->dev_conf.rxmode.offloads |=\n \t\t\t\tDEV_RX_OFFLOAD_JUMBO_FRAME;\n \t\t\thlreg0 |= IXGBE_HLREG0_JUMBOEN;\n@@ -586,7 +613,7 @@ int ixgbe_pf_host_configure(struct rte_eth_dev *eth_dev)\n \t\t}\n \t\tIXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0);\n \n-\t\tmax_frs = new_mtu << IXGBE_MHADD_MFS_SHIFT;\n+\t\tmax_frs = max_frame << IXGBE_MHADD_MFS_SHIFT;\n \t\tIXGBE_WRITE_REG(hw, IXGBE_MAXFRS, max_frs);\n \t}\n \n",
    "prefixes": [
        "v5"
    ]
}