Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/106556/?format=api
http://patches.dpdk.org/api/patches/106556/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20220126155321.6454-1-yidingx.zhou@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": "<20220126155321.6454-1-yidingx.zhou@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20220126155321.6454-1-yidingx.zhou@intel.com", "date": "2022-01-26T15:53:21", "name": "net/ice: add support for setting promisc by DCF", "commit_ref": null, "pull_url": null, "state": "rfc", "archived": true, "hash": "08b33fa1f92474ec2b0d69348fedb74b6e2762d2", "submitter": { "id": 2501, "url": "http://patches.dpdk.org/api/people/2501/?format=api", "name": "Yiding Zhou", "email": "yidingx.zhou@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/20220126155321.6454-1-yidingx.zhou@intel.com/mbox/", "series": [ { "id": 21375, "url": "http://patches.dpdk.org/api/series/21375/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=21375", "date": "2022-01-26T15:53:21", "name": "net/ice: add support for setting promisc by DCF", "version": 1, "mbox": "http://patches.dpdk.org/series/21375/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/106556/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/106556/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 4DF80A04A7;\n\tWed, 26 Jan 2022 08:49:46 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 125AF42702;\n\tWed, 26 Jan 2022 08:49:46 +0100 (CET)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n by mails.dpdk.org (Postfix) with ESMTP id DB6E24069D\n for <dev@dpdk.org>; Wed, 26 Jan 2022 08:49:43 +0100 (CET)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 25 Jan 2022 23:49:42 -0800", "from unknown (HELO localhost.localdomain) ([10.239.251.174])\n by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 25 Jan 2022 23:49:40 -0800" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1643183384; x=1674719384;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=oKfGQxM/Wg4omkHXkk4A0LRDDDJNuvPeYW9TwNVzjOo=;\n b=a0IVmxHEAIYqi1KgmvGLDfLW2iSsSfvi1TevIPt9NzelhIWm3fsXB2l0\n CVREPvyXTmj0zSnpknfIuKSZwWp1GeaWCy4yyUIph4DZISDNhA74hpivp\n VrhvERUwFFEOwA+iu8GeRL/1gSqkfUpY5q8+Fvxtag3raJB0Wo3UNSvPU\n UlQe5EOQtjCkgaItOpmF34vl3I9JA6ugRBibaiSCcuryGhtgMHN9+McLh\n 3xMDYQoEPObL+pima31B4OHbH6zUgCLiAmS55xj3oloOU1rd/q/1xvTlf\n w/F1fq6Nd1MsyUG9kW6Q3WGYDxvpAywXP9UxVWfSTk/my/fBb/lbne6pY A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6200,9189,10238\"; a=\"332853923\"", "E=Sophos;i=\"5.88,317,1635231600\"; d=\"scan'208\";a=\"332853923\"", "E=Sophos;i=\"5.88,317,1635231600\"; d=\"scan'208\";a=\"495279991\"" ], "From": "Yiding Zhou <yidingx.zhou@intel.com>", "To": "qiming.yang@intel.com,\n\tqi.z.zhang@intel.com", "Cc": "junfeng.guo@intel.com,\n\tdev@dpdk.org", "Subject": "[PATCH] net/ice: add support for setting promisc by DCF", "Date": "Wed, 26 Jan 2022 15:53:21 +0000", "Message-Id": "<20220126155321.6454-1-yidingx.zhou@intel.com>", "X-Mailer": "git-send-email 2.25.1", "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": "allow to enable/disable VFs promisc mode over VF0.\nthis feature need to update ice kernel driver (newer than v1.8.0)\n\nSigned-off-by: Yiding Zhou <yidingx.zhou@intel.com>\n---\n drivers/net/ice/ice_dcf_vf_representor.c | 56 +++++++++++++++++-------\n 1 file changed, 39 insertions(+), 17 deletions(-)", "diff": "diff --git a/drivers/net/ice/ice_dcf_vf_representor.c b/drivers/net/ice/ice_dcf_vf_representor.c\nindex b9fcfc80ad..781282f68c 100644\n--- a/drivers/net/ice/ice_dcf_vf_representor.c\n+++ b/drivers/net/ice/ice_dcf_vf_representor.c\n@@ -10,6 +10,20 @@\n #include \"ice_dcf_ethdev.h\"\n #include \"ice_rxtx.h\"\n \n+static __rte_always_inline struct ice_dcf_hw *\n+ice_dcf_vf_repr_hw(struct ice_dcf_vf_repr *repr)\n+{\n+\tstruct ice_dcf_adapter *dcf_adapter =\n+\t\t\trepr->dcf_eth_dev->data->dev_private;\n+\n+\tif (!dcf_adapter) {\n+\t\tPMD_DRV_LOG(ERR, \"DCF for VF representor has been released\\n\");\n+\t\treturn NULL;\n+\t}\n+\n+\treturn &dcf_adapter->real_hw;\n+}\n+\n static uint16_t\n ice_dcf_vf_repr_rx_burst(__rte_unused void *rxq,\n \t\t\t __rte_unused struct rte_mbuf **rx_pkts,\n@@ -78,15 +92,36 @@ ice_dcf_vf_repr_tx_queue_setup(__rte_unused struct rte_eth_dev *dev,\n }\n \n static int\n-ice_dcf_vf_repr_promiscuous_enable(__rte_unused struct rte_eth_dev *ethdev)\n+ice_dcf_vf_repr_promiscuous_enable(struct rte_eth_dev *ethdev)\n {\n-\treturn 0;\n+\tstruct ice_dcf_vf_repr *repr = ethdev->data->dev_private;\n+\tstruct dcf_virtchnl_cmd args;\n+\tstruct virtchnl_promisc_info promisc;\n+\tstruct ice_dcf_hw *hw = ice_dcf_vf_repr_hw(repr);\n+\tmemset(&args, 0, sizeof(args));\n+\targs.v_op = VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE;\n+\tpromisc.flags = 0;\n+\tpromisc.vsi_id = hw->vf_vsi_map[repr->vf_id] & ~VIRTCHNL_DCF_VF_VSI_VALID;\n+\tpromisc.flags |= FLAG_VF_UNICAST_PROMISC;\n+\targs.req_msg = (uint8_t *)&promisc;\n+\targs.req_msglen = sizeof(promisc);\n+\treturn ice_dcf_execute_virtchnl_cmd(hw, &args);\n }\n \n static int\n-ice_dcf_vf_repr_promiscuous_disable(__rte_unused struct rte_eth_dev *ethdev)\n+ice_dcf_vf_repr_promiscuous_disable(struct rte_eth_dev *ethdev)\n {\n-\treturn 0;\n+\tstruct ice_dcf_vf_repr *repr = ethdev->data->dev_private;\n+\tstruct dcf_virtchnl_cmd args;\n+\tstruct virtchnl_promisc_info promisc;\n+\tstruct ice_dcf_hw *hw = ice_dcf_vf_repr_hw(repr);\n+\tmemset(&args, 0, sizeof(args));\n+\targs.v_op = VIRTCHNL_OP_CONFIG_PROMISCUOUS_MODE;\n+\tpromisc.flags = 0;\n+\tpromisc.vsi_id = hw->vf_vsi_map[repr->vf_id] & ~VIRTCHNL_DCF_VF_VSI_VALID;\n+\targs.req_msg = (uint8_t *)&promisc;\n+\targs.req_msglen = sizeof(promisc);\n+\treturn ice_dcf_execute_virtchnl_cmd(hw, &args);\n }\n \n static int\n@@ -108,19 +143,6 @@ ice_dcf_vf_repr_link_update(__rte_unused struct rte_eth_dev *ethdev,\n \treturn 0;\n }\n \n-static __rte_always_inline struct ice_dcf_hw *\n-ice_dcf_vf_repr_hw(struct ice_dcf_vf_repr *repr)\n-{\n-\tstruct ice_dcf_adapter *dcf_adapter =\n-\t\t\trepr->dcf_eth_dev->data->dev_private;\n-\n-\tif (!dcf_adapter) {\n-\t\tPMD_DRV_LOG(ERR, \"DCF for VF representor has been released\\n\");\n-\t\treturn NULL;\n-\t}\n-\n-\treturn &dcf_adapter->real_hw;\n-}\n \n static int\n ice_dcf_vf_repr_dev_info_get(struct rte_eth_dev *dev,\n", "prefixes": [] }{ "id": 106556, "url": "