Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/109360/?format=api
https://patches.dpdk.org/api/patches/109360/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/20220407105706.18889-9-kevinx.liu@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": "<20220407105706.18889-9-kevinx.liu@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220407105706.18889-9-kevinx.liu@intel.com", "date": "2022-04-07T10:56:35", "name": "[08/39] net/ice: support dcf VLAN filter and offload configuration", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "e5d5aef0b2ff25d65c219aa20e89c019a8c738dc", "submitter": { "id": 2440, "url": "https://patches.dpdk.org/api/people/2440/?format=api", "name": "Kevin Liu", "email": "kevinx.liu@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/20220407105706.18889-9-kevinx.liu@intel.com/mbox/", "series": [ { "id": 22387, "url": "https://patches.dpdk.org/api/series/22387/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=22387", "date": "2022-04-07T10:56:27", "name": "support full function of DCF", "version": 1, "mbox": "https://patches.dpdk.org/series/22387/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/109360/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/109360/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 A4CAEA0508;\n\tThu, 7 Apr 2022 04:58:56 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 62D4842878;\n\tThu, 7 Apr 2022 04:58:39 +0200 (CEST)", "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 3CE174287C\n for <dev@dpdk.org>; Thu, 7 Apr 2022 04:58:37 +0200 (CEST)", "from orsmga008.jf.intel.com ([10.7.209.65])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 19:58:36 -0700", "from intel-cd-odc-kevin.cd.intel.com ([10.240.178.195])\n by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 06 Apr 2022 19:58:34 -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=1649300317; x=1680836317;\n h=from:to:cc:subject:date:message-id:in-reply-to:\n references:mime-version:content-transfer-encoding;\n bh=llY6IOz8dlyDhNchvrE++z5xtL8Zh+wU7YCAs0cdukc=;\n b=n3iExGlGMZaCuGnKq5gaFzyok4Qg2OetHiomZMPQ0rBYIB5Aqygyp3Nh\n YLV42gnDPUPYkN/2BMxJJTshIQlOHV7CgAE2lkx+T/UzRyB74W8ilPL5e\n ATQl3kPND9P9Of3/CEheibyuot9nc+blEmrXHSBvUOlcNX//oE2fqJjNg\n 4i1QmMQm5O546cqUl2JgSzmljJAnumtEjIryR0XENWC6TAsFBN71E5LMP\n 88cW73y4Lp2n8D9K3ILYPuIJeDC2hQc5Rv9VwJj97T6DL7US0mduKIeyU\n dpy+xb/n+gQ/SDjebr73FWhHgJ6crEMIddWEtukSqRTrjQ9vE5ppJjHc5 g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10309\"; a=\"248738344\"", "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"248738344\"", "E=Sophos;i=\"5.90,241,1643702400\"; d=\"scan'208\";a=\"570850504\"" ], "From": "Kevin Liu <kevinx.liu@intel.com>", "To": "dev@dpdk.org", "Cc": "qiming.yang@intel.com, qi.z.zhang@intel.com, stevex.yang@intel.com,\n Alvin Zhang <alvinx.zhang@intel.com>, Kevin Liu <kevinx.liu@intel.com>", "Subject": "[PATCH 08/39] net/ice: support dcf VLAN filter and offload\n configuration", "Date": "Thu, 7 Apr 2022 10:56:35 +0000", "Message-Id": "<20220407105706.18889-9-kevinx.liu@intel.com>", "X-Mailer": "git-send-email 2.33.1", "In-Reply-To": "<20220407105706.18889-1-kevinx.liu@intel.com>", "References": "<20220407105706.18889-1-kevinx.liu@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": "From: Alvin Zhang <alvinx.zhang@intel.com>\n\nBelow PMD ops are supported in this patch:\n .vlan_filter_set = dcf_dev_vlan_filter_set\n .vlan_offload_set = dcf_dev_vlan_offload_set\n\nSigned-off-by: Alvin Zhang <alvinx.zhang@intel.com>\nSigned-off-by: Kevin Liu <kevinx.liu@intel.com>\n---\n drivers/net/ice/ice_dcf_ethdev.c | 101 +++++++++++++++++++++++++++++++\n 1 file changed, 101 insertions(+)", "diff": "diff --git a/drivers/net/ice/ice_dcf_ethdev.c b/drivers/net/ice/ice_dcf_ethdev.c\nindex 0d944f9fd2..e58cdf47d2 100644\n--- a/drivers/net/ice/ice_dcf_ethdev.c\n+++ b/drivers/net/ice/ice_dcf_ethdev.c\n@@ -1026,6 +1026,105 @@ dcf_dev_set_default_mac_addr(struct rte_eth_dev *dev,\n \treturn 0;\n }\n \n+static int\n+dcf_add_del_vlan(struct ice_dcf_hw *hw, uint16_t vlanid, bool add)\n+{\n+\tstruct virtchnl_vlan_filter_list *vlan_list;\n+\tuint8_t cmd_buffer[sizeof(struct virtchnl_vlan_filter_list) +\n+\t\t\t\t\t\t\tsizeof(uint16_t)];\n+\tstruct dcf_virtchnl_cmd args;\n+\tint err;\n+\n+\tvlan_list = (struct virtchnl_vlan_filter_list *)cmd_buffer;\n+\tvlan_list->vsi_id = hw->vsi_res->vsi_id;\n+\tvlan_list->num_elements = 1;\n+\tvlan_list->vlan_id[0] = vlanid;\n+\n+\tmemset(&args, 0, sizeof(args));\n+\targs.v_op = add ? VIRTCHNL_OP_ADD_VLAN : VIRTCHNL_OP_DEL_VLAN;\n+\targs.req_msg = cmd_buffer;\n+\targs.req_msglen = sizeof(cmd_buffer);\n+\terr = ice_dcf_execute_virtchnl_cmd(hw, &args);\n+\tif (err)\n+\t\tPMD_DRV_LOG(ERR, \"fail to execute command %s\",\n+\t\t\t add ? \"OP_ADD_VLAN\" : \"OP_DEL_VLAN\");\n+\n+\treturn err;\n+}\n+\n+static int\n+dcf_enable_vlan_strip(struct ice_dcf_hw *hw)\n+{\n+\tstruct dcf_virtchnl_cmd args;\n+\tint ret;\n+\n+\tmemset(&args, 0, sizeof(args));\n+\targs.v_op = VIRTCHNL_OP_ENABLE_VLAN_STRIPPING;\n+\tret = ice_dcf_execute_virtchnl_cmd(hw, &args);\n+\tif (ret)\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t \"Failed to execute command of OP_ENABLE_VLAN_STRIPPING\");\n+\n+\treturn ret;\n+}\n+\n+static int\n+dcf_disable_vlan_strip(struct ice_dcf_hw *hw)\n+{\n+\tstruct dcf_virtchnl_cmd args;\n+\tint ret;\n+\n+\tmemset(&args, 0, sizeof(args));\n+\targs.v_op = VIRTCHNL_OP_DISABLE_VLAN_STRIPPING;\n+\tret = ice_dcf_execute_virtchnl_cmd(hw, &args);\n+\tif (ret)\n+\t\tPMD_DRV_LOG(ERR,\n+\t\t\t \"Failed to execute command of OP_DISABLE_VLAN_STRIPPING\");\n+\n+\treturn ret;\n+}\n+\n+static int\n+dcf_dev_vlan_filter_set(struct rte_eth_dev *dev, uint16_t vlan_id, int on)\n+{\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\tstruct ice_dcf_hw *hw = &adapter->real_hw;\n+\tint err;\n+\n+\tif (!(hw->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))\n+\t\treturn -ENOTSUP;\n+\n+\terr = dcf_add_del_vlan(hw, vlan_id, on);\n+\tif (err)\n+\t\treturn -EIO;\n+\treturn 0;\n+}\n+\n+static int\n+dcf_dev_vlan_offload_set(struct rte_eth_dev *dev, int mask)\n+{\n+\tstruct ice_dcf_adapter *adapter = dev->data->dev_private;\n+\tstruct ice_dcf_hw *hw = &adapter->real_hw;\n+\tstruct rte_eth_conf *dev_conf = &dev->data->dev_conf;\n+\tint err;\n+\n+\tif (!(hw->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))\n+\t\treturn -ENOTSUP;\n+\n+\t/* Vlan stripping setting */\n+\tif (mask & RTE_ETH_VLAN_STRIP_MASK) {\n+\t\t/* Enable or disable VLAN stripping */\n+\t\tif (dev_conf->rxmode.offloads & RTE_ETH_RX_OFFLOAD_VLAN_STRIP)\n+\t\t\terr = dcf_enable_vlan_strip(hw);\n+\t\telse\n+\t\t\terr = dcf_disable_vlan_strip(hw);\n+\n+\t\tif (err)\n+\t\t\treturn -EIO;\n+\t}\n+\treturn 0;\n+}\n+\n static int\n ice_dcf_dev_flow_ops_get(struct rte_eth_dev *dev,\n \t\t\t const struct rte_flow_ops **ops)\n@@ -1538,6 +1637,8 @@ static const struct eth_dev_ops ice_dcf_eth_dev_ops = {\n \t.mac_addr_remove = dcf_dev_del_mac_addr,\n \t.set_mc_addr_list = dcf_set_mc_addr_list,\n \t.mac_addr_set = dcf_dev_set_default_mac_addr,\n+\t.vlan_filter_set = dcf_dev_vlan_filter_set,\n+\t.vlan_offload_set = dcf_dev_vlan_offload_set,\n \t.flow_ops_get = ice_dcf_dev_flow_ops_get,\n \t.udp_tunnel_port_add\t = ice_dcf_dev_udp_tunnel_port_add,\n \t.udp_tunnel_port_del\t = ice_dcf_dev_udp_tunnel_port_del,\n", "prefixes": [ "08/39" ] }{ "id": 109360, "url": "