get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 126592,
    "url": "http://patches.dpdk.org/api/patches/126592/?format=api",
    "web_url": "http://patches.dpdk.org/project/dpdk/patch/20230427062001.478032-26-qiming.yang@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": "<20230427062001.478032-26-qiming.yang@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20230427062001.478032-26-qiming.yang@intel.com",
    "date": "2023-04-27T06:19:56",
    "name": "[25/30] net/ice/base: add PPPoE hardware offload",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "505af8e9026b93f9ca894793bdb1c9febf5828aa",
    "submitter": {
        "id": 522,
        "url": "http://patches.dpdk.org/api/people/522/?format=api",
        "name": "Qiming Yang",
        "email": "qiming.yang@intel.com"
    },
    "delegate": {
        "id": 1540,
        "url": "http://patches.dpdk.org/api/users/1540/?format=api",
        "username": "qzhan15",
        "first_name": "Qi",
        "last_name": "Zhang",
        "email": "qi.z.zhang@intel.com"
    },
    "mbox": "http://patches.dpdk.org/project/dpdk/patch/20230427062001.478032-26-qiming.yang@intel.com/mbox/",
    "series": [
        {
            "id": 27885,
            "url": "http://patches.dpdk.org/api/series/27885/?format=api",
            "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=27885",
            "date": "2023-04-27T06:19:31",
            "name": "net/ice/base: share code update",
            "version": 1,
            "mbox": "http://patches.dpdk.org/series/27885/mbox/"
        }
    ],
    "comments": "http://patches.dpdk.org/api/patches/126592/comments/",
    "check": "success",
    "checks": "http://patches.dpdk.org/api/patches/126592/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 A014242A08;\n\tThu, 27 Apr 2023 08:40:40 +0200 (CEST)",
            "from mails.dpdk.org (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id DCDD242FFE;\n\tThu, 27 Apr 2023 08:38:31 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 3BCDA42D5A\n for <dev@dpdk.org>; Thu, 27 Apr 2023 08:38:30 +0200 (CEST)",
            "from fmsmga002.fm.intel.com ([10.253.24.26])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Apr 2023 23:38:29 -0700",
            "from dpdk-qiming3.sh.intel.com ([10.67.111.4])\n by fmsmga002.fm.intel.com with ESMTP; 26 Apr 2023 23:38:27 -0700"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1682577510; x=1714113510;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=MogW/kSypzmg5eaVecXc2DuRzVgto8D54Exq9h0wf8A=;\n b=aGFXWyA8PtbhyhrIFRaQyx6uPla5EOEJGqP52jDEIJTPGx0XH5wd2Riz\n x5pwKiYiM5i7eeXoLvMUErSkZsFDHHK7TYnrgtwVofpO08cpKQ2nAhxxF\n Cu3e35H2kG4ljZIfRoE6vm228CKjwS7a06nrQwe/HeTldqYWbWOU+hdip\n zvQqCEJXAU0AZSQEPucMvqFFc5YOTAkS+lIW9XilovOYlpX92IjsIN8du\n iBqQPmm7Zmk9Crm+PsAqJrtyZ749+Lry7oKCd9omHdN3p3XHNCMj4tFkM\n cy9vgU5D0xbu+Fy+2+yQvVA6CanVf7HIT9LyiZKepYOKck0dbeQAE0k2K w==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6600,9927,10692\"; a=\"375324398\"",
            "E=Sophos;i=\"5.99,230,1677571200\"; d=\"scan'208\";a=\"375324398\"",
            "E=McAfee;i=\"6600,9927,10692\"; a=\"805845877\"",
            "E=Sophos;i=\"5.99,230,1677571200\"; d=\"scan'208\";a=\"805845877\""
        ],
        "X-ExtLoop1": "1",
        "From": "Qiming Yang <qiming.yang@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "qi.z.zhang@intel.com, Qiming Yang <qiming.yang@intel.com>,\n Marcin Szycik <marcin.szycik@linux.intel.com>,\n Lukasz Plachno <lukasz.plachno@intel.com>",
        "Subject": "[PATCH 25/30] net/ice/base: add PPPoE hardware offload",
        "Date": "Thu, 27 Apr 2023 06:19:56 +0000",
        "Message-Id": "<20230427062001.478032-26-qiming.yang@intel.com>",
        "X-Mailer": "git-send-email 2.25.1",
        "In-Reply-To": "<20230427062001.478032-1-qiming.yang@intel.com>",
        "References": "<20230427062001.478032-1-qiming.yang@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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"
    },
    "content": "Add support for creating PPPoE filters in switchdev mode. Add support\nfor parsing PPPoE and PPP-specific tc options: pppoe_sid and ppp_proto.\n\nSigned-off-by: Marcin Szycik <marcin.szycik@linux.intel.com>\nSigned-off-by: Lukasz Plachno <lukasz.plachno@intel.com>\nSigned-off-by: Qiming Yang <qiming.yang@intel.com>\n---\n drivers/net/ice/base/ice_switch.c | 82 ++++++++++++++++++++++++-------\n 1 file changed, 65 insertions(+), 17 deletions(-)",
    "diff": "diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c\nindex c78ec448ae..37c192fb87 100644\n--- a/drivers/net/ice/base/ice_switch.c\n+++ b/drivers/net/ice/base/ice_switch.c\n@@ -7390,6 +7390,17 @@ ice_find_free_recp_res_idx(struct ice_hw *hw, const ice_bitmap_t *profiles,\n \treturn (u16)ice_bitmap_hweight(free_idx, ICE_MAX_FV_WORDS);\n }\n \n+static void ice_set_recipe_index(unsigned long idx, u8 *bitmap)\n+{\n+\tu32 byte = idx / BITS_PER_BYTE;\n+\tu32 bit = idx % BITS_PER_BYTE;\n+\n+\tif (byte >= 8)\n+\t\treturn;\n+\n+\tbitmap[byte] |= 1 << bit;\n+}\n+\n /**\n  * ice_add_sw_recipe - function to call AQ calls to create switch recipe\n  * @hw: pointer to hardware structure\n@@ -7517,10 +7528,10 @@ ice_add_sw_recipe(struct ice_hw *hw, struct ice_sw_recipe *rm,\n \t\t}\n \n \t\t/* fill recipe dependencies */\n-\t\tice_zero_bitmap((ice_bitmap_t *)buf[recps].recipe_bitmap,\n-\t\t\t\tICE_MAX_NUM_RECIPES);\n-\t\tice_set_bit(buf[recps].recipe_indx,\n-\t\t\t    (ice_bitmap_t *)buf[recps].recipe_bitmap);\n+\t\tice_memset(buf[recps].recipe_bitmap, 0,\n+\t\t\t   sizeof(buf[recps].recipe_bitmap), ICE_NONDMA_MEM);\n+\t\tice_set_recipe_index(buf[recps].recipe_indx,\n+\t\t\t\t     buf[recps].recipe_bitmap);\n \t\tbuf[recps].content.act_ctrl_fwd_priority = rm->priority;\n \t\trecps++;\n \t}\n@@ -8305,18 +8316,26 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,\n \t\t\t lkups[i].m_u.ethertype.ethtype_id ==\n \t\t\t\tCPU_TO_BE16(0xFFFF))\n \t\t\touter_ipv6 = true;\n+\t\telse if (lkups[i].type == ICE_ETYPE_IL &&\n+\t\t\t lkups[i].h_u.ethertype.ethtype_id ==\n+\t\t\t\tCPU_TO_BE16(ICE_IPV6_ETHER_ID) &&\n+\t\t\t lkups[i].m_u.ethertype.ethtype_id ==\n+\t\t\t\tCPU_TO_BE16(0xFFFF))\n+\t\t\tinner_ipv6 = true;\n+\t\telse if (lkups[i].type == ICE_PPPOE) {\n+\t\t\tpppoe = true;\n+\t\t\tif (lkups[i].h_u.pppoe_hdr.ppp_prot_id ==\n+\t\t\t\tCPU_TO_BE16(ICE_PPP_IPV6_PROTO_ID) &&\n+\t\t\t    lkups[i].m_u.pppoe_hdr.ppp_prot_id ==\n+\t\t\t\tCPU_TO_BE16(0xFFFF))\n+\t\t\t\touter_ipv6 = true;\n+\t\t}\n \t\telse if (lkups[i].type == ICE_IPV4_OFOS &&\n \t\t\t lkups[i].h_u.ipv4_hdr.protocol ==\n \t\t\t\tICE_IPV4_NVGRE_PROTO_ID &&\n \t\t\t lkups[i].m_u.ipv4_hdr.protocol ==\n \t\t\t\t0xFF)\n \t\t\tgre = true;\n-\t\telse if (lkups[i].type == ICE_PPPOE &&\n-\t\t\t lkups[i].h_u.pppoe_hdr.ppp_prot_id ==\n-\t\t\t\tCPU_TO_BE16(ICE_PPP_IPV6_PROTO_ID) &&\n-\t\t\t lkups[i].m_u.pppoe_hdr.ppp_prot_id ==\n-\t\t\t\t0xFFFF)\n-\t\t\touter_ipv6 = true;\n \t\telse if (lkups[i].type == ICE_IPV4_IL &&\n \t\t\t lkups[i].h_u.ipv4_hdr.protocol ==\n \t\t\t\tICE_TCP_PROTO_ID &&\n@@ -8373,6 +8392,34 @@ ice_find_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,\n \t\t}\n \t}\n \n+\tif (tun_type == ICE_SW_IPV4_TCP) {\n+\t\t*pkt = dummy_tcp_packet;\n+\t\t*pkt_len = sizeof(dummy_tcp_packet);\n+\t\t*offsets = dummy_tcp_packet_offsets;\n+\t\treturn;\n+\t}\n+\n+\tif (tun_type == ICE_SW_IPV4_UDP) {\n+\t\t*pkt = dummy_udp_packet;\n+\t\t*pkt_len = sizeof(dummy_udp_packet);\n+\t\t*offsets = dummy_udp_packet_offsets;\n+\t\treturn;\n+\t}\n+\n+\tif (tun_type == ICE_SW_IPV6_TCP) {\n+\t\t*pkt = dummy_tcp_ipv6_packet;\n+\t\t*pkt_len = sizeof(dummy_tcp_ipv6_packet);\n+\t\t*offsets = dummy_tcp_ipv6_packet_offsets;\n+\t\treturn;\n+\t}\n+\n+\tif (tun_type == ICE_SW_IPV6_UDP) {\n+\t\t*pkt = dummy_udp_ipv6_packet;\n+\t\t*pkt_len = sizeof(dummy_udp_ipv6_packet);\n+\t\t*offsets = dummy_udp_ipv6_packet_offsets;\n+\t\treturn;\n+\t}\n+\n \tif (tun_type == ICE_SW_TUN_PPPOE_IPV6_QINQ) {\n \t\t*pkt = dummy_qinq_pppoe_ipv6_packet;\n \t\t*pkt_len = sizeof(dummy_qinq_pppoe_ipv6_packet);\n@@ -8811,6 +8858,7 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,\n \t\t\tlen = sizeof(struct ice_ether_hdr);\n \t\t\tbreak;\n \t\tcase ICE_ETYPE_OL:\n+\t\tcase ICE_ETYPE_IL:\n \t\t\tlen = sizeof(struct ice_ethtype_hdr);\n \t\t\tbreak;\n \t\tcase ICE_VLAN_OFOS:\n@@ -8843,9 +8891,6 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,\n \t\t\tlen = sizeof(struct ice_udp_tnl_hdr);\n \t\t\tbreak;\n \n-\t\tcase ICE_PPPOE:\n-\t\t\tlen = sizeof(struct ice_pppoe_hdr);\n-\t\t\tbreak;\n \t\tcase ICE_ESP:\n \t\t\tlen = sizeof(struct ice_esp_hdr);\n \t\t\tbreak;\n@@ -8855,13 +8900,16 @@ ice_fill_adv_dummy_packet(struct ice_adv_lkup_elem *lkups, u16 lkups_cnt,\n \t\tcase ICE_AH:\n \t\t\tlen = sizeof(struct ice_ah_hdr);\n \t\t\tbreak;\n-\t\tcase ICE_L2TPV3:\n-\t\t\tlen = sizeof(struct ice_l2tpv3_sess_hdr);\n-\t\t\tbreak;\n-\t\tcase ICE_GTP:\n \t\tcase ICE_GTP_NO_PAY:\n+\t\tcase ICE_GTP:\n \t\t\tlen = sizeof(struct ice_udp_gtp_hdr);\n \t\t\tbreak;\n+\t\tcase ICE_PPPOE:\n+\t\t\tlen = sizeof(struct ice_pppoe_hdr);\n+\t\t\tbreak;\n+\t\tcase ICE_L2TPV3:\n+\t\t\tlen = sizeof(struct ice_l2tpv3_sess_hdr);\n+\t\t\tbreak;\n \t\tdefault:\n \t\t\treturn ICE_ERR_PARAM;\n \t\t}\n",
    "prefixes": [
        "25/30"
    ]
}