List patch comments

GET /api/patches/74701/comments/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Link: 
<https://patches.dpdk.org/api/patches/74701/comments/?format=api&page=1>; rel="first",
<https://patches.dpdk.org/api/patches/74701/comments/?format=api&page=1>; rel="last"
Vary: Accept
[ { "id": 116581, "web_url": "https://patches.dpdk.org/comment/116581/", "msgid": "<b2780831-b2a5-293a-7860-911bb7fe33e5@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/b2780831-b2a5-293a-7860-911bb7fe33e5@intel.com", "date": "2020-07-24T07:13:09", "subject": "Re: [dpdk-dev] [PATCH] net/ice: fix GTPU down/uplink and extension\n\tconflict", "submitter": { "id": 507, "url": "https://patches.dpdk.org/api/people/507/?format=api", "name": "Guo, Jia", "email": "jia.guo@intel.com" }, "content": "hi, simei\n\nOn 7/24/2020 10:10 AM, Simei Su wrote:\n> When adding a RSS rule with GTPU_DWN/UP, it will search profile\n> table from the top index. If a RSS rule with GTPU_EH already exists,\n> then GTPU_DWN/UP packet will match GTPU_EH profile. This patch solves\n> this issue by removing existed GTPU_EH rule before creating a new\n> GTPU_DWN/UP rule.\n\n\nSuggest interpret the relation ship bettween GTPU_EH_UPLINK/DWNLINK with \nGTPU_EH to help knowledge the reason.\n\n\n> Fixes: 2e2810fc1868 (\"net/ice: fix GTPU RSS\")\n>\n> Signed-off-by: Simei Su <simei.su@intel.com>\n> ---\n> drivers/net/ice/ice_ethdev.c | 47 +++++++++++++++\n> drivers/net/ice/ice_ethdev.h | 15 +++++\n> drivers/net/ice/ice_hash.c | 139 +++++++++++++++++++++++++++++++++++++++++++\n> 3 files changed, 201 insertions(+)\n>\n> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\n> index a4a0390..8839146 100644\n> --- a/drivers/net/ice/ice_ethdev.c\n> +++ b/drivers/net/ice/ice_ethdev.c\n> @@ -2538,6 +2538,11 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n> \t\tif (ret)\n> \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4 rss flow fail %d\",\n> \t\t\t\t __func__, ret);\n\n\nA blank line need.\n\n\n> +\t\t/* Store hash field and header for gtpu_eh ipv4 */\n> +\t\tpf->gtpu_eh.ipv4.hash_fld = ICE_FLOW_HASH_IPV4;\n> +\t\tpf->gtpu_eh.ipv4.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH |\n> +\t\t\t\t\t ICE_FLOW_SEG_HDR_IPV4 |\n> +\t\t\t\t\t ICE_FLOW_SEG_HDR_IPV_OTHER;\n> \n> \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4,\n> \t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n> @@ -2564,6 +2569,11 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n> \t\tif (ret)\n> \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6 rss flow fail %d\",\n> \t\t\t\t __func__, ret);\n> +\t\t/* Store hash field and header for gtpu_eh ipv6 */\n> +\t\tpf->gtpu_eh.ipv6.hash_fld = ICE_FLOW_HASH_IPV6;\n> +\t\tpf->gtpu_eh.ipv6.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH |\n> +\t\t\t\t\t ICE_FLOW_SEG_HDR_IPV6 |\n> +\t\t\t\t\t ICE_FLOW_SEG_HDR_IPV_OTHER;\n> \n> \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV6,\n> \t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n> @@ -2586,6 +2596,9 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n> \t\tif (ret)\n> \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4_UDP rss flow fail %d\",\n> \t\t\t\t __func__, ret);\n> +\t\t/* Store hash field and header for gtpu_eh ipv4_udp */\n> +\t\tpf->gtpu_eh.ipv4_udp.hash_fld = ICE_HASH_UDP_IPV4;\n> +\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n> \n> \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV4,\n> \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n> @@ -2606,6 +2619,9 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n> \t\tif (ret)\n> \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6_UDP rss flow fail %d\",\n> \t\t\t\t __func__, ret);\n> +\t\t/* Store hash field and header for gtpu_eh ipv6_udp */\n> +\t\tpf->gtpu_eh.ipv6_udp.hash_fld = ICE_HASH_UDP_IPV6;\n> +\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n> \n> \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV6,\n> \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n> @@ -2626,6 +2642,9 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n> \t\tif (ret)\n> \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4_TCP rss flow fail %d\",\n> \t\t\t\t __func__, ret);\n> +\t\t/* Store hash field and header for gtpu_eh ipv4_tcp */\n> +\t\tpf->gtpu_eh.ipv4_tcp.hash_fld = ICE_HASH_TCP_IPV4;\n> +\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n> \n> \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV4,\n> \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n> @@ -2646,6 +2665,9 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n> \t\tif (ret)\n> \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6_TCP rss flow fail %d\",\n> \t\t\t\t __func__, ret);\n> +\t\t/* Store hash field and header for gtpu_eh ipv6_tcp */\n> +\t\tpf->gtpu_eh.ipv6_tcp.hash_fld = ICE_HASH_TCP_IPV6;\n> +\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n> \n> \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV6,\n> \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n> @@ -2695,6 +2717,28 @@ static int ice_parse_devargs(struct rte_eth_dev *dev)\n> \t}\n> }\n> \n> +static void\n> +ice_rss_ctx_init(struct ice_pf *pf)\n> +{\n> +\tpf->gtpu_eh.ipv4.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv4.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv6.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv6.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv4_udp.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv4_udp.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv6_udp.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv6_udp.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv4_tcp.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv6_tcp.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = 0;\n> +}\n> +\n> static int ice_init_rss(struct ice_pf *pf)\n> {\n> \tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n> @@ -2755,6 +2799,9 @@ static int ice_init_rss(struct ice_pf *pf)\n> \t\t(1 << VSIQF_HASH_CTL_HASH_SCHEME_S);\n> \tICE_WRITE_REG(hw, VSIQF_HASH_CTL(vsi->vsi_id), reg);\n> \n> +\t/* Initialize RSS context for gtpu_eh */\n> +\tice_rss_ctx_init(pf);\n> +\n> \t/* RSS hash configuration */\n> \tice_rss_hash_set(pf, rss_conf->rss_hf);\n> \n> diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h\n> index 87984ef..1baf0b4 100644\n> --- a/drivers/net/ice/ice_ethdev.h\n> +++ b/drivers/net/ice/ice_ethdev.h\n> @@ -358,6 +358,20 @@ struct ice_fdir_info {\n> \tstruct ice_fdir_counter_pool_container counter;\n> };\n> \n> +struct ice_gtpu_eh {\n> +\tuint32_t pkt_hdr;\n> +\tuint64_t hash_fld;\n> +};\n> +\n\n\nThe naming \"ice_gtpu_eh\" is not clear, ice_hash_gtpu_eh_ctx?\n\n\n> +struct ice_hash_gtpu_eh {\n> +\tstruct ice_gtpu_eh ipv4;\n> +\tstruct ice_gtpu_eh ipv6;\n> +\tstruct ice_gtpu_eh ipv4_udp;\n> +\tstruct ice_gtpu_eh ipv6_udp;\n> +\tstruct ice_gtpu_eh ipv4_tcp;\n> +\tstruct ice_gtpu_eh ipv6_tcp;\n> +};\n> +\n\n\nI think you don't need to define struct for each pattern and set/unset \nvalue for all of them, what you considate just 3 item, that are hdr, \nhash filed and the pattern type, so you could just defined as below\n\nstruct ice_hash_gtpu_eh_ctx {\n\n             uint32_t pkt_hdr;\n\n     uint64_t hash_fld;\n\n                uint64_t hdr_hint;    // for example: hdr = \nICE_FLOW_SEG_HDR_IPV4 |  ICE_FLOW_SEG_HDR_UDP\n\n}\n\nand then only check this hdr_hint when set uplink/dwnlink\n\nif(hdr & pf->gtpu_eh_ctx->hdr_hint)\n\n     ice_rem_rss_cfg\n\n> struct ice_pf {\n> \tstruct ice_adapter *adapter; /* The adapter this PF associate to */\n> \tstruct ice_vsi *main_vsi; /* pointer to main VSI structure */\n> @@ -381,6 +395,7 @@ struct ice_pf {\n> \tuint16_t fdir_nb_qps; /* The number of queue pairs of Flow Director */\n> \tuint16_t fdir_qp_offset;\n> \tstruct ice_fdir_info fdir; /* flow director info */\n> +\tstruct ice_hash_gtpu_eh gtpu_eh;\n> \tuint16_t hw_prof_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX];\n> \tuint16_t fdir_fltr_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX];\n> \tstruct ice_hw_port_stats stats_offset;\n> diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c\n> index e535e4b..dd70353 100644\n> --- a/drivers/net/ice/ice_hash.c\n> +++ b/drivers/net/ice/ice_hash.c\n> @@ -1232,6 +1232,117 @@ struct ice_hash_match_type ice_hash_type_list[] = {\n> }\n> \n> static int\n> +ice_add_rss_cfg_pre(struct ice_pf *pf, uint32_t hdr, uint64_t fld)\n> +{\n> +\tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n> +\tstruct ice_vsi *vsi = pf->main_vsi;\n> +\tint ret;\n> +\n> +\t/**\n> +\t * If header field contains GTPU_EH, store gtpu_eh context.\n> +\t * If header field contains GTPU_DWN/UP, remove existed gtpu_eh.\n> +\t */\n> +\tif ((hdr & ICE_FLOW_SEG_HDR_GTPU_EH) &&\n> +\t (hdr & (ICE_FLOW_SEG_HDR_GTPU_DWN |\n> +\t\t ICE_FLOW_SEG_HDR_GTPU_UP)) == 0) {\n\n\nNo need to check !=DWN/UP here, EH/DWN/UP are mutual exclusion, they \nalso handler when  parse pattern.\n\n\n> +\t\tif ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> +\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n\n\nAlignment should match open parenthesis. Below is the same.\n\n\n> +\t\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr = hdr;\n> +\t\t\tpf->gtpu_eh.ipv4_udp.hash_fld = fld;\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> +\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n> +\t\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr = hdr;\n> +\t\t\tpf->gtpu_eh.ipv6_udp.hash_fld = fld;\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> +\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n> +\t\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = hdr;\n> +\t\t\tpf->gtpu_eh.ipv4_tcp.hash_fld = fld;\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> +\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n> +\t\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = hdr;\n> +\t\t\tpf->gtpu_eh.ipv6_tcp.hash_fld = fld;\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> +\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n> +\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n> +\t\t\tpf->gtpu_eh.ipv4.pkt_hdr = hdr;\n> +\t\t\tpf->gtpu_eh.ipv4.hash_fld = fld;\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> +\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n> +\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n> +\t\t\tpf->gtpu_eh.ipv6.pkt_hdr = hdr;\n> +\t\t\tpf->gtpu_eh.ipv6.hash_fld = fld;\n> +\t\t}\n> +\t} else if (hdr & (ICE_FLOW_SEG_HDR_GTPU_DWN |\n> +\t\t ICE_FLOW_SEG_HDR_GTPU_UP)) {\n> +\t\tif ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> +\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n> +\t\t\tif (pf->gtpu_eh.ipv4_udp.hash_fld &&\n> +\t\t\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr) {\n> +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> +\t\t\t\t\tpf->gtpu_eh.ipv4_udp.hash_fld,\n> +\t\t\t\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr);\n> +\t\t\t\tif (ret)\n> +\t\t\t\t\treturn -rte_errno;\n> +\t\t\t}\n\n\nIs it better to use a local variable and then call ice_rem_rss_cfg one \ntime after if-else?\n\n\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> +\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n> +\t\t\tif (pf->gtpu_eh.ipv6_udp.hash_fld &&\n> +\t\t\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr) {\n> +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> +\t\t\t\t\tpf->gtpu_eh.ipv6_udp.hash_fld,\n> +\t\t\t\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr);\n> +\t\t\t\tif (ret)\n> +\t\t\t\t\treturn -rte_errno;\n> +\t\t\t}\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> +\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n> +\t\t\tif (pf->gtpu_eh.ipv4_tcp.hash_fld &&\n> +\t\t\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr) {\n> +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> +\t\t\t\t\tpf->gtpu_eh.ipv4_tcp.hash_fld,\n> +\t\t\t\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr);\n> +\t\t\t\tif (ret)\n> +\t\t\t\t\treturn -rte_errno;\n> +\t\t\t}\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> +\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n> +\t\t\tif (pf->gtpu_eh.ipv6_tcp.hash_fld &&\n> +\t\t\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr) {\n> +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> +\t\t\t\t\tpf->gtpu_eh.ipv6_tcp.hash_fld,\n> +\t\t\t\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr);\n> +\t\t\t\tif (ret)\n> +\t\t\t\t\treturn -rte_errno;\n> +\t\t\t}\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> +\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n> +\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n> +\t\t\tif (pf->gtpu_eh.ipv4.hash_fld &&\n> +\t\t\t\tpf->gtpu_eh.ipv4.pkt_hdr) {\n> +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> +\t\t\t\t\tpf->gtpu_eh.ipv4.hash_fld,\n> +\t\t\t\t\tpf->gtpu_eh.ipv4.pkt_hdr);\n> +\t\t\t\tif (ret)\n> +\t\t\t\t\treturn -rte_errno;\n> +\t\t\t}\n> +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> +\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n> +\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n> +\t\t\tif (pf->gtpu_eh.ipv6.hash_fld &&\n> +\t\t\t\tpf->gtpu_eh.ipv6.pkt_hdr) {\n> +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> +\t\t\t\t\tpf->gtpu_eh.ipv6.hash_fld,\n> +\t\t\t\t\tpf->gtpu_eh.ipv6.pkt_hdr);\n> +\t\t\t\tif (ret)\n> +\t\t\t\t\treturn -rte_errno;\n> +\t\t\t}\n> +\t\t}\n> +\t}\n> +\n> +\treturn 0;\n> +}\n> +\n> +static int\n> ice_hash_create(struct ice_adapter *ad,\n> \t\tstruct rte_flow *flow,\n> \t\tvoid *meta,\n> @@ -1248,6 +1359,10 @@ struct ice_hash_match_type ice_hash_type_list[] = {\n> \tuint64_t hash_field = ((struct rss_meta *)meta)->hash_flds;\n> \tuint8_t hash_function = ((struct rss_meta *)meta)->hash_function;\n> \n> +\tret = ice_add_rss_cfg_pre(pf, headermask, hash_field);\n> +\tif (ret)\n> +\t\treturn -rte_errno;\n> +\n> \tfilter_ptr = rte_zmalloc(\"ice_rss_filter\",\n> \t\t\t\tsizeof(struct ice_hash_flow_cfg), 0);\n> \tif (!filter_ptr) {\n> @@ -1297,6 +1412,28 @@ struct ice_hash_match_type ice_hash_type_list[] = {\n> \treturn -rte_errno;\n> }\n> \n> +static void\n> +ice_rem_rss_cfg_post(struct ice_pf *pf)\n> +{\n> +\tpf->gtpu_eh.ipv4.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv4.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv6.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv6.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv4_udp.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv4_udp.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv6_udp.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv6_udp.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv4_tcp.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = 0;\n> +\n> +\tpf->gtpu_eh.ipv6_tcp.hash_fld = 0;\n> +\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = 0;\n> +}\n> +\n> static int\n> ice_hash_destroy(struct ice_adapter *ad,\n> \t\tstruct rte_flow *flow,\n> @@ -1334,6 +1471,8 @@ struct ice_hash_match_type ice_hash_type_list[] = {\n> \t\t}\n> \t}\n> \n> +\tice_rem_rss_cfg_post(pf);\n> +\n> \trte_free(filter_ptr);\n> \treturn 0;\n>", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 099C6A0518;\n\tFri, 24 Jul 2020 09:13:15 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 0C1F21C010;\n\tFri, 24 Jul 2020 09:13:15 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by dpdk.org (Postfix) with ESMTP id 21FF41BFE7\n for <dev@dpdk.org>; Fri, 24 Jul 2020 09:13:12 +0200 (CEST)", "from orsmga002.jf.intel.com ([10.7.209.21])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Jul 2020 00:13:11 -0700", "from jguo15x-mobl.ccr.corp.intel.com (HELO [10.67.68.150])\n ([10.67.68.150])\n by orsmga002.jf.intel.com with ESMTP; 24 Jul 2020 00:13:10 -0700" ], "IronPort-SDR": [ "\n XWeX6o7wbZ53T+E/F8Pb8r/6FmGHU3LnG55Ax1xZ4GWNNRIn+rpRpPuvyW2LrEE4xkmZBER3vN\n PSitV66HYN0Q==", "\n /SXHfAbnkU1x4bOAGxrTg8iWweCSFVUtaudQmMrdP4CuCqnHaYHWlYWf6gY2BIxp1uVG/pUpWV\n KSJGPbTpBDgg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9691\"; a=\"138167580\"", "E=Sophos;i=\"5.75,389,1589266800\"; d=\"scan'208\";a=\"138167580\"", "E=Sophos;i=\"5.75,389,1589266800\"; d=\"scan'208\";a=\"302581559\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "To": "Simei Su <simei.su@intel.com>, qi.z.zhang@intel.com, beilei.xing@intel.com", "Cc": "dev@dpdk.org", "References": "<1595556601-87800-1-git-send-email-simei.su@intel.com>", "From": "Jeff Guo <jia.guo@intel.com>", "Message-ID": "<b2780831-b2a5-293a-7860-911bb7fe33e5@intel.com>", "Date": "Fri, 24 Jul 2020 15:13:09 +0800", "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101\n Thunderbird/68.10.0", "MIME-Version": "1.0", "In-Reply-To": "<1595556601-87800-1-git-send-email-simei.su@intel.com>", "Content-Type": "text/plain; charset=utf-8; format=flowed", "Content-Transfer-Encoding": "8bit", "Content-Language": "en-US", "Subject": "Re: [dpdk-dev] [PATCH] net/ice: fix GTPU down/uplink and extension\n\tconflict", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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>" }, "addressed": null }, { "id": 116613, "web_url": "https://patches.dpdk.org/comment/116613/", "msgid": "<BL0PR11MB3380633715AAB7125E9E785C9C770@BL0PR11MB3380.namprd11.prod.outlook.com>", "list_archive_url": "https://inbox.dpdk.org/dev/BL0PR11MB3380633715AAB7125E9E785C9C770@BL0PR11MB3380.namprd11.prod.outlook.com", "date": "2020-07-24T14:19:57", "subject": "Re: [dpdk-dev] [PATCH] net/ice: fix GTPU down/uplink and extension\n\tconflict", "submitter": { "id": 1298, "url": "https://patches.dpdk.org/api/people/1298/?format=api", "name": "Simei Su", "email": "simei.su@intel.com" }, "content": "Hi, Guojia\n\n> -----Original Message-----\n> From: Guo, Jia <jia.guo@intel.com>\n> Sent: Friday, July 24, 2020 3:13 PM\n> To: Su, Simei <simei.su@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>; Xing,\n> Beilei <beilei.xing@intel.com>\n> Cc: dev@dpdk.org\n> Subject: Re: [PATCH] net/ice: fix GTPU down/uplink and extension conflict\n> \n> hi, simei\n> \n> On 7/24/2020 10:10 AM, Simei Su wrote:\n> > When adding a RSS rule with GTPU_DWN/UP, it will search profile table\n> > from the top index. If a RSS rule with GTPU_EH already exists, then\n> > GTPU_DWN/UP packet will match GTPU_EH profile. This patch solves this\n> > issue by removing existed GTPU_EH rule before creating a new\n> > GTPU_DWN/UP rule.\n> \n> \n> Suggest interpret the relation ship bettween GTPU_EH_UPLINK/DWNLINK with\n> GTPU_EH to help knowledge the reason.\n\n Ok, I will refine the commit message.\n\n> \n> \n> > Fixes: 2e2810fc1868 (\"net/ice: fix GTPU RSS\")\n> >\n> > Signed-off-by: Simei Su <simei.su@intel.com>\n> > ---\n> > drivers/net/ice/ice_ethdev.c | 47 +++++++++++++++\n> > drivers/net/ice/ice_ethdev.h | 15 +++++\n> > drivers/net/ice/ice_hash.c | 139\n> +++++++++++++++++++++++++++++++++++++++++++\n> > 3 files changed, 201 insertions(+)\n> >\n> > diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c\n> > index a4a0390..8839146 100644\n> > --- a/drivers/net/ice/ice_ethdev.c\n> > +++ b/drivers/net/ice/ice_ethdev.c\n> > @@ -2538,6 +2538,11 @@ static int ice_parse_devargs(struct rte_eth_dev\n> *dev)\n> > \t\tif (ret)\n> > \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4 rss flow fail %d\",\n> > \t\t\t\t __func__, ret);\n> \n> \n> A blank line need.\n\n Ok.\n\n> \n> \n> > +\t\t/* Store hash field and header for gtpu_eh ipv4 */\n> > +\t\tpf->gtpu_eh.ipv4.hash_fld = ICE_FLOW_HASH_IPV4;\n> > +\t\tpf->gtpu_eh.ipv4.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH |\n> > +\t\t\t\t\t ICE_FLOW_SEG_HDR_IPV4 |\n> > +\t\t\t\t\t ICE_FLOW_SEG_HDR_IPV_OTHER;\n> >\n> > \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV4,\n> > \t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n> > @@ -2564,6 +2569,11 @@ static int ice_parse_devargs(struct rte_eth_dev\n> *dev)\n> > \t\tif (ret)\n> > \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6 rss flow fail %d\",\n> > \t\t\t\t __func__, ret);\n> > +\t\t/* Store hash field and header for gtpu_eh ipv6 */\n> > +\t\tpf->gtpu_eh.ipv6.hash_fld = ICE_FLOW_HASH_IPV6;\n> > +\t\tpf->gtpu_eh.ipv6.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH |\n> > +\t\t\t\t\t ICE_FLOW_SEG_HDR_IPV6 |\n> > +\t\t\t\t\t ICE_FLOW_SEG_HDR_IPV_OTHER;\n> >\n> > \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_FLOW_HASH_IPV6,\n> > \t\t\t\tICE_FLOW_SEG_HDR_PPPOE |\n> > @@ -2586,6 +2596,9 @@ static int ice_parse_devargs(struct rte_eth_dev\n> *dev)\n> > \t\tif (ret)\n> > \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4_UDP rss flow fail %d\",\n> > \t\t\t\t __func__, ret);\n> > +\t\t/* Store hash field and header for gtpu_eh ipv4_udp */\n> > +\t\tpf->gtpu_eh.ipv4_udp.hash_fld = ICE_HASH_UDP_IPV4;\n> > +\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n> >\n> > \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV4,\n> > \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n> > @@ -2606,6 +2619,9 @@ static int ice_parse_devargs(struct rte_eth_dev\n> *dev)\n> > \t\tif (ret)\n> > \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6_UDP rss flow fail %d\",\n> > \t\t\t\t __func__, ret);\n> > +\t\t/* Store hash field and header for gtpu_eh ipv6_udp */\n> > +\t\tpf->gtpu_eh.ipv6_udp.hash_fld = ICE_HASH_UDP_IPV6;\n> > +\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n> >\n> > \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_UDP_IPV6,\n> > \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n> > @@ -2626,6 +2642,9 @@ static int ice_parse_devargs(struct rte_eth_dev\n> *dev)\n> > \t\tif (ret)\n> > \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV4_TCP rss flow fail %d\",\n> > \t\t\t\t __func__, ret);\n> > +\t\t/* Store hash field and header for gtpu_eh ipv4_tcp */\n> > +\t\tpf->gtpu_eh.ipv4_tcp.hash_fld = ICE_HASH_TCP_IPV4;\n> > +\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n> >\n> > \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV4,\n> > \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n> > @@ -2646,6 +2665,9 @@ static int ice_parse_devargs(struct rte_eth_dev\n> *dev)\n> > \t\tif (ret)\n> > \t\t\tPMD_DRV_LOG(ERR, \"%s GTPU_EH_IPV6_TCP rss flow fail %d\",\n> > \t\t\t\t __func__, ret);\n> > +\t\t/* Store hash field and header for gtpu_eh ipv6_tcp */\n> > +\t\tpf->gtpu_eh.ipv6_tcp.hash_fld = ICE_HASH_TCP_IPV6;\n> > +\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = ICE_FLOW_SEG_HDR_GTPU_EH;\n> >\n> > \t\tret = ice_add_rss_cfg(hw, vsi->idx, ICE_HASH_TCP_IPV6,\n> > \t\t\t\tICE_FLOW_SEG_HDR_PPPOE, 0);\n> > @@ -2695,6 +2717,28 @@ static int ice_parse_devargs(struct rte_eth_dev\n> *dev)\n> > \t}\n> > }\n> >\n> > +static void\n> > +ice_rss_ctx_init(struct ice_pf *pf)\n> > +{\n> > +\tpf->gtpu_eh.ipv4.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv4.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv6.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv6.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv4_udp.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv4_udp.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv6_udp.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv6_udp.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv4_tcp.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv6_tcp.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = 0;\n> > +}\n> > +\n> > static int ice_init_rss(struct ice_pf *pf)\n> > {\n> > \tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n> > @@ -2755,6 +2799,9 @@ static int ice_init_rss(struct ice_pf *pf)\n> > \t\t(1 << VSIQF_HASH_CTL_HASH_SCHEME_S);\n> > \tICE_WRITE_REG(hw, VSIQF_HASH_CTL(vsi->vsi_id), reg);\n> >\n> > +\t/* Initialize RSS context for gtpu_eh */\n> > +\tice_rss_ctx_init(pf);\n> > +\n> > \t/* RSS hash configuration */\n> > \tice_rss_hash_set(pf, rss_conf->rss_hf);\n> >\n> > diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h\n> > index 87984ef..1baf0b4 100644\n> > --- a/drivers/net/ice/ice_ethdev.h\n> > +++ b/drivers/net/ice/ice_ethdev.h\n> > @@ -358,6 +358,20 @@ struct ice_fdir_info {\n> > \tstruct ice_fdir_counter_pool_container counter;\n> > };\n> >\n> > +struct ice_gtpu_eh {\n> > +\tuint32_t pkt_hdr;\n> > +\tuint64_t hash_fld;\n> > +};\n> > +\n> \n> \n> The naming \"ice_gtpu_eh\" is not clear, ice_hash_gtpu_eh_ctx?\n> \n Ok, I will rename it to make it clear.\n\n> \n> > +struct ice_hash_gtpu_eh {\n> > +\tstruct ice_gtpu_eh ipv4;\n> > +\tstruct ice_gtpu_eh ipv6;\n> > +\tstruct ice_gtpu_eh ipv4_udp;\n> > +\tstruct ice_gtpu_eh ipv6_udp;\n> > +\tstruct ice_gtpu_eh ipv4_tcp;\n> > +\tstruct ice_gtpu_eh ipv6_tcp;\n> > +};\n> > +\n> \n> \n> I think you don't need to define struct for each pattern and set/unset\n> value for all of them, what you considate just 3 item, that are hdr,\n> hash filed and the pattern type, so you could just defined as below\n> \n> struct ice_hash_gtpu_eh_ctx {\n> \n>             uint32_t pkt_hdr;\n> \n>     uint64_t hash_fld;\n> \n>                uint64_t hdr_hint;    // for example: hdr =\n> ICE_FLOW_SEG_HDR_IPV4 |  ICE_FLOW_SEG_HDR_UDP\n> \n> }\n> \n> and then only check this hdr_hint when set uplink/dwnlink\n> \n> if(hdr & pf->gtpu_eh_ctx->hdr_hint)\n> \n>     ice_rem_rss_cfg\n\n Because we should also remember default rule context, so we still need to define structure for each pattern.\n\n> \n> > struct ice_pf {\n> > \tstruct ice_adapter *adapter; /* The adapter this PF associate to */\n> > \tstruct ice_vsi *main_vsi; /* pointer to main VSI structure */\n> > @@ -381,6 +395,7 @@ struct ice_pf {\n> > \tuint16_t fdir_nb_qps; /* The number of queue pairs of Flow Director */\n> > \tuint16_t fdir_qp_offset;\n> > \tstruct ice_fdir_info fdir; /* flow director info */\n> > +\tstruct ice_hash_gtpu_eh gtpu_eh;\n> > \tuint16_t hw_prof_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX];\n> > \tuint16_t fdir_fltr_cnt[ICE_FLTR_PTYPE_MAX][ICE_FD_HW_SEG_MAX];\n> > \tstruct ice_hw_port_stats stats_offset;\n> > diff --git a/drivers/net/ice/ice_hash.c b/drivers/net/ice/ice_hash.c\n> > index e535e4b..dd70353 100644\n> > --- a/drivers/net/ice/ice_hash.c\n> > +++ b/drivers/net/ice/ice_hash.c\n> > @@ -1232,6 +1232,117 @@ struct ice_hash_match_type\n> ice_hash_type_list[] = {\n> > }\n> >\n> > static int\n> > +ice_add_rss_cfg_pre(struct ice_pf *pf, uint32_t hdr, uint64_t fld)\n> > +{\n> > +\tstruct ice_hw *hw = ICE_PF_TO_HW(pf);\n> > +\tstruct ice_vsi *vsi = pf->main_vsi;\n> > +\tint ret;\n> > +\n> > +\t/**\n> > +\t * If header field contains GTPU_EH, store gtpu_eh context.\n> > +\t * If header field contains GTPU_DWN/UP, remove existed gtpu_eh.\n> > +\t */\n> > +\tif ((hdr & ICE_FLOW_SEG_HDR_GTPU_EH) &&\n> > +\t (hdr & (ICE_FLOW_SEG_HDR_GTPU_DWN |\n> > +\t\t ICE_FLOW_SEG_HDR_GTPU_UP)) == 0) {\n> \n> \n> No need to check !=DWN/UP here, EH/DWN/UP are mutual exclusion, they\n> also handler when  parse pattern.\n\n Ok. I thought EH and DWN/UP could co-exist.\n\n> \n> \n> > +\t\tif ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> > +\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n> \n> \n> Alignment should match open parenthesis. Below is the same.\n\n OK.\n\n> \n> \n> > +\t\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr = hdr;\n> > +\t\t\tpf->gtpu_eh.ipv4_udp.hash_fld = fld;\n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> > +\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n> > +\t\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr = hdr;\n> > +\t\t\tpf->gtpu_eh.ipv6_udp.hash_fld = fld;\n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> > +\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n> > +\t\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = hdr;\n> > +\t\t\tpf->gtpu_eh.ipv4_tcp.hash_fld = fld;\n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> > +\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n> > +\t\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = hdr;\n> > +\t\t\tpf->gtpu_eh.ipv6_tcp.hash_fld = fld;\n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> > +\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n> > +\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n> > +\t\t\tpf->gtpu_eh.ipv4.pkt_hdr = hdr;\n> > +\t\t\tpf->gtpu_eh.ipv4.hash_fld = fld;\n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> > +\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n> > +\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n> > +\t\t\tpf->gtpu_eh.ipv6.pkt_hdr = hdr;\n> > +\t\t\tpf->gtpu_eh.ipv6.hash_fld = fld;\n> > +\t\t}\n> > +\t} else if (hdr & (ICE_FLOW_SEG_HDR_GTPU_DWN |\n> > +\t\t ICE_FLOW_SEG_HDR_GTPU_UP)) {\n> > +\t\tif ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> > +\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n> > +\t\t\tif (pf->gtpu_eh.ipv4_udp.hash_fld &&\n> > +\t\t\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr) {\n> > +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv4_udp.hash_fld,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv4_udp.pkt_hdr);\n> > +\t\t\t\tif (ret)\n> > +\t\t\t\t\treturn -rte_errno;\n> > +\t\t\t}\n> \n> \n> Is it better to use a local variable and then call ice_rem_rss_cfg one\n> time after if-else?\n\n Yes, you are right. I will clean code in next version. Thanks.\n\nBr\nSimei\n\n> \n> \n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> > +\t\t\t(hdr & ICE_FLOW_SEG_HDR_UDP)) {\n> > +\t\t\tif (pf->gtpu_eh.ipv6_udp.hash_fld &&\n> > +\t\t\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr) {\n> > +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv6_udp.hash_fld,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv6_udp.pkt_hdr);\n> > +\t\t\t\tif (ret)\n> > +\t\t\t\t\treturn -rte_errno;\n> > +\t\t\t}\n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> > +\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n> > +\t\t\tif (pf->gtpu_eh.ipv4_tcp.hash_fld &&\n> > +\t\t\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr) {\n> > +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv4_tcp.hash_fld,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv4_tcp.pkt_hdr);\n> > +\t\t\t\tif (ret)\n> > +\t\t\t\t\treturn -rte_errno;\n> > +\t\t\t}\n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> > +\t\t\t(hdr & ICE_FLOW_SEG_HDR_TCP)) {\n> > +\t\t\tif (pf->gtpu_eh.ipv6_tcp.hash_fld &&\n> > +\t\t\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr) {\n> > +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv6_tcp.hash_fld,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv6_tcp.pkt_hdr);\n> > +\t\t\t\tif (ret)\n> > +\t\t\t\t\treturn -rte_errno;\n> > +\t\t\t}\n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV4) &&\n> > +\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n> > +\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n> > +\t\t\tif (pf->gtpu_eh.ipv4.hash_fld &&\n> > +\t\t\t\tpf->gtpu_eh.ipv4.pkt_hdr) {\n> > +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv4.hash_fld,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv4.pkt_hdr);\n> > +\t\t\t\tif (ret)\n> > +\t\t\t\t\treturn -rte_errno;\n> > +\t\t\t}\n> > +\t\t} else if ((hdr & ICE_FLOW_SEG_HDR_IPV6) &&\n> > +\t\t\t(hdr & (ICE_FLOW_SEG_HDR_UDP |\n> > +\t\t\t\tICE_FLOW_SEG_HDR_TCP)) == 0) {\n> > +\t\t\tif (pf->gtpu_eh.ipv6.hash_fld &&\n> > +\t\t\t\tpf->gtpu_eh.ipv6.pkt_hdr) {\n> > +\t\t\t\tret = ice_rem_rss_cfg(hw, vsi->idx,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv6.hash_fld,\n> > +\t\t\t\t\tpf->gtpu_eh.ipv6.pkt_hdr);\n> > +\t\t\t\tif (ret)\n> > +\t\t\t\t\treturn -rte_errno;\n> > +\t\t\t}\n> > +\t\t}\n> > +\t}\n> > +\n> > +\treturn 0;\n> > +}\n> > +\n> > +static int\n> > ice_hash_create(struct ice_adapter *ad,\n> > \t\tstruct rte_flow *flow,\n> > \t\tvoid *meta,\n> > @@ -1248,6 +1359,10 @@ struct ice_hash_match_type ice_hash_type_list[]\n> = {\n> > \tuint64_t hash_field = ((struct rss_meta *)meta)->hash_flds;\n> > \tuint8_t hash_function = ((struct rss_meta *)meta)->hash_function;\n> >\n> > +\tret = ice_add_rss_cfg_pre(pf, headermask, hash_field);\n> > +\tif (ret)\n> > +\t\treturn -rte_errno;\n> > +\n> > \tfilter_ptr = rte_zmalloc(\"ice_rss_filter\",\n> > \t\t\t\tsizeof(struct ice_hash_flow_cfg), 0);\n> > \tif (!filter_ptr) {\n> > @@ -1297,6 +1412,28 @@ struct ice_hash_match_type ice_hash_type_list[]\n> = {\n> > \treturn -rte_errno;\n> > }\n> >\n> > +static void\n> > +ice_rem_rss_cfg_post(struct ice_pf *pf)\n> > +{\n> > +\tpf->gtpu_eh.ipv4.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv4.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv6.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv6.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv4_udp.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv4_udp.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv6_udp.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv6_udp.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv4_tcp.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv4_tcp.pkt_hdr = 0;\n> > +\n> > +\tpf->gtpu_eh.ipv6_tcp.hash_fld = 0;\n> > +\tpf->gtpu_eh.ipv6_tcp.pkt_hdr = 0;\n> > +}\n> > +\n> > static int\n> > ice_hash_destroy(struct ice_adapter *ad,\n> > \t\tstruct rte_flow *flow,\n> > @@ -1334,6 +1471,8 @@ struct ice_hash_match_type ice_hash_type_list[]\n> = {\n> > \t\t}\n> > \t}\n> >\n> > +\tice_rem_rss_cfg_post(pf);\n> > +\n> > \trte_free(filter_ptr);\n> > \treturn 0;\n> >", "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 565C4A0526;\n\tFri, 24 Jul 2020 16:20:07 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 05F181C027;\n\tFri, 24 Jul 2020 16:20:06 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by dpdk.org (Postfix) with ESMTP id 8B62F1BFE5\n for <dev@dpdk.org>; Fri, 24 Jul 2020 16:20:03 +0200 (CEST)", "from orsmga005.jf.intel.com ([10.7.209.41])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Jul 2020 07:20:02 -0700", "from orsmsx601.amr.corp.intel.com ([10.22.229.14])\n by orsmga005.jf.intel.com with ESMTP; 24 Jul 2020 07:20:02 -0700", "from orsmsx605.amr.corp.intel.com (10.22.229.18) by\n ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id\n 15.1.1713.5; Fri, 24 Jul 2020 07:20:01 -0700", "from ORSEDG001.ED.cps.intel.com (10.7.248.4) by\n orsmsx605.amr.corp.intel.com (10.22.229.18) with Microsoft SMTP Server\n (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5\n via Frontend Transport; Fri, 24 Jul 2020 07:20:01 -0700", "from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.170)\n by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (TLS)\n id 14.3.439.0; Fri, 24 Jul 2020 07:20:01 -0700", "from BL0PR11MB3380.namprd11.prod.outlook.com (2603:10b6:208:69::12)\n by BL0PR11MB3106.namprd11.prod.outlook.com (2603:10b6:208:7a::11)\n with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3216.24; Fri, 24 Jul\n 2020 14:19:58 +0000", "from BL0PR11MB3380.namprd11.prod.outlook.com\n ([fe80::71fd:6797:4389:da64]) by BL0PR11MB3380.namprd11.prod.outlook.com\n ([fe80::71fd:6797:4389:da64%2]) with mapi id 15.20.3216.024; Fri, 24 Jul 2020\n 14:19:58 +0000" ], "IronPort-SDR": [ "\n uOp3eqI4+i4ZNl83jXOyE5A+93e/VUFjq0m/3SalxZoKfYxZdxmP0ugM/Ucpe5QLgK6V8WyDoI\n 4wusaA8YgEdw==", "\n 7qkkOuM15PksDZoqEzqa/j83Dv7nN+XmnfjtOjB9Qnxl/YSB/uLqrJR70pjGF1Y2jHsnZeANmv\n OhUeWQTdW8yg==" ], "X-IronPort-AV": [ "E=McAfee;i=\"6000,8403,9691\"; a=\"215300251\"", "E=Sophos;i=\"5.75,391,1589266800\"; d=\"scan'208\";a=\"215300251\"", "E=Sophos;i=\"5.75,391,1589266800\"; d=\"scan'208\";a=\"463245457\"" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;\n b=Ga/eDLNhnNHuHUE+2zAgE6Ctn+y0bfUWg7m0Mo+jqyie3u3UA2vnmk7pfPsnfZ2+sXcZ0kPMXqkfZP7T5Lvc0JR6XLxj1v3CYHzMDbdhOzhRd2+XwMmHvSMMSri64M/KqJoEI1oz0RCp9LTA+KjS95lfXE8v9e4xOdgaPFm+bcwX5Duie12eVZusGg8VJJY2o4lMb+darchvYMJtXj38te5nEuacZ1G6zwgKH85j2beGM2Ueb+ccbAap15egcLziJ6/pKO1atBITzpwQ+DRzNlUsW6mt3Q896sjAQ1wj8eLuisute3M6NjIO8xoUUBgKF7tLXkTy53fl+kw2N/DV4g==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector9901;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=hGlwCzzs+K6LPf/4AbbbN1CSb6cPCE0lENhyI4h/VI8=;\n b=HEMLp706DoJ8h3VpYAauWtgJuybHaeY9rw5CR+7zwFMHQbu8vyT70i4Fzz+aMCs3nr7BazRvCUYPpp0z882OstB7UJ3GriUp57QoGmr85L0mGaaeiDk57tSaso1MzIFcHFJc8jI9nLAWKtRRypbyA+eIy8dpte9js9SBDGCXjyC2Bqaj8bqDMxMPx01b/ZDLNB61rpJChNiKZa/qqE0/OfamEKSD4dVjRsAa31WFR5vnGNJuXWPACbzce9JjIQCwBrGUEWWkeG7RCPC4D8B2al9ZLeaHn24R9F9vJRKOslgbEWXGs1QrNPinfWl13xSjIdRDxpCXMiKdFAN0z3aITw==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com;\n dkim=pass header.d=intel.com; arc=none", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com;\n s=selector2-intel-onmicrosoft-com;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=hGlwCzzs+K6LPf/4AbbbN1CSb6cPCE0lENhyI4h/VI8=;\n b=HXO479leCMCJY71a+0Hr2Ss9A+fxEqjXRzRsVC0xqam7QNLBMBigkH14lIRi3085lthQYsgSXRvj/LNCdrs+Cl1qLtFr/CGrgaCF14zMR1/WhHeOln5fTC37DliWwt6EB3Beq5dHj3bVN9xfTeRFt6jpFqY4IhPjCkLUvoM6rl8=", "From": "\"Su, Simei\" <simei.su@intel.com>", "To": "\"Guo, Jia\" <jia.guo@intel.com>, \"Zhang, Qi Z\" <qi.z.zhang@intel.com>,\n \"Xing, Beilei\" <beilei.xing@intel.com>", "CC": "\"dev@dpdk.org\" <dev@dpdk.org>", "Thread-Topic": "[PATCH] net/ice: fix GTPU down/uplink and extension conflict", "Thread-Index": "AQHWYWAHtkMy0a00mkKDT+or5oXbbqkWUQSAgAB0XJA=", "Date": "Fri, 24 Jul 2020 14:19:57 +0000", "Message-ID": "\n <BL0PR11MB3380633715AAB7125E9E785C9C770@BL0PR11MB3380.namprd11.prod.outlook.com>", "References": "<1595556601-87800-1-git-send-email-simei.su@intel.com>\n <b2780831-b2a5-293a-7860-911bb7fe33e5@intel.com>", "In-Reply-To": "<b2780831-b2a5-293a-7860-911bb7fe33e5@intel.com>", "Accept-Language": "en-US", "Content-Language": "en-US", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "dlp-version": "11.2.0.6", "dlp-reaction": "no-action", "dlp-product": "dlpe-windows", "authentication-results": "intel.com; dkim=none (message not signed)\n header.d=none;intel.com; dmarc=none action=none header.from=intel.com;", "x-originating-ip": "[192.198.147.211]", "x-ms-publictraffictype": "Email", "x-ms-office365-filtering-correlation-id": "25a65ea6-86d5-4d57-119d-08d82fdca505", "x-ms-traffictypediagnostic": "BL0PR11MB3106:", "x-ld-processed": "46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr", "x-ms-exchange-transport-forked": "True", "x-microsoft-antispam-prvs": "\n <BL0PR11MB310618640ADC7AE88947682D9C770@BL0PR11MB3106.namprd11.prod.outlook.com>", "x-ms-oob-tlc-oobclassifiers": "OLM:81;", "x-ms-exchange-senderadcheck": "1", "x-microsoft-antispam": "BCL:0;", "x-microsoft-antispam-message-info": "\n prxYmwxUZNZLzboP1JY04G21ETXHd7tgUrYml5rw29blfQfaDDCzfZBu04iGr19EuXw5H30loxJyxiO8P73523o4vxvUo+PYuf97vE93NkTSQIdiPuAPIjxrSoqf3ItFxLPv9jjnBYNj5SzvoHdrhxMG4ChIVZHFV3pCvy02AaVtQ6I8VhCizHYKo9n+iTnxmBjQqugtRCQl7EnPSq3EQ1kGXv/gqiCFvdNsU97kmg1+Kpf7ZYyOcV53X0zVaajK0EDMovFAtCyuZMgH16C8EP0xsPIO+YllfV5UHZCtPldhR9R2nN4BhpX/tYuKRrTJ", "x-forefront-antispam-report": "CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n IPV:NLI; SFV:NSPM; H:BL0PR11MB3380.namprd11.prod.outlook.com; PTR:; CAT:NONE;\n SFTY:;\n SFS:(4636009)(136003)(346002)(396003)(39860400002)(366004)(376002)(26005)(71200400001)(86362001)(478600001)(53546011)(316002)(4326008)(6506007)(186003)(55016002)(83380400001)(9686003)(52536014)(66556008)(66476007)(30864003)(66446008)(8936002)(33656002)(110136005)(2906002)(7696005)(5660300002)(6636002)(8676002)(66946007)(76116006)(64756008);\n DIR:OUT; SFP:1102;", "x-ms-exchange-antispam-messagedata": "\n 0g3pn7zwvl1yxG4C9WTwCtcwLrgtwxkRlartiFf/yBC7f3O0dNvuFQF3r93S8REWkI6PlTSjC5jHAPsc+0EKMVJIfTDV/VBSU9lFRPxiM955tiD4kxo9ln8O5/C4tKUNKxgPBnZtKjQ0hch5GEHZt2KGAUHMzSRQnFRxOBLFLHmAnElbCswrYqujTyrpkLWsCh8ZcI64qxv7p/8PXI//IQZn7VYS7c6kUEMgfObNZR7eQZGD1mgK176jjp3NNXSt+fTwCtTuowPjaAF5RoW7cBqMXkeDsJVHeze2toGkNhtST7hhspuHJghFxkVJyRQGZ5sDMAlSW2c/SKUOUmioSt7+4gdGk37Av+TVhHRJo+goOve/RcI5/9d773AXvbba0+VYMAN1upF0PSE91RDKXTCQPRY35uFlKX7F0O8isYV2GDeCrxNx+mHqjiDNO0Ko3ZPL8nMQWsHNkxeq2j5ZAmCFljUTr83KDNrkujglTVqVEXQRq9xYXYgixMEy2Bww", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "MIME-Version": "1.0", "X-MS-Exchange-CrossTenant-AuthAs": "Internal", "X-MS-Exchange-CrossTenant-AuthSource": "BL0PR11MB3380.namprd11.prod.outlook.com", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 25a65ea6-86d5-4d57-119d-08d82fdca505", "X-MS-Exchange-CrossTenant-originalarrivaltime": "24 Jul 2020 14:19:57.7480 (UTC)", "X-MS-Exchange-CrossTenant-fromentityheader": "Hosted", "X-MS-Exchange-CrossTenant-id": "46c98d88-e344-4ed4-8496-4ed7712e255d", "X-MS-Exchange-CrossTenant-mailboxtype": "HOSTED", "X-MS-Exchange-CrossTenant-userprincipalname": "\n M7Ow8+v4Lg08REIcbFc+f3zv3MQX7mihefnpLWv4WL/e67tpKahfgf/cc562+1xdQ6wo0zEPop+PRjryN/ROLg==", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "BL0PR11MB3106", "X-OriginatorOrg": "intel.com", "Subject": "Re: [dpdk-dev] [PATCH] net/ice: fix GTPU down/uplink and extension\n\tconflict", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "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>" }, "addressed": null } ]