From: Jakub Kicinski <kuba@kernel.org>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
Alexander Lobakin <aleksander.lobakin@intel.com>,
netdev@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
Dan Nowlin <dan.nowlin@intel.com>,
Jie Wang <jie1x.wang@intel.com>,
Junfeng Guo <junfeng.guo@intel.com>,
Qi Zhang <qi.z.zhang@intel.com>, Ting Xu <ting.xu@intel.com>,
Rafal Romanowski <rafal.romanowski@intel.com>
Subject: Re: [PATCH net-next v2 04/14] ice: add virtchnl and VF context support for GTP RSS
Date: Mon, 20 Oct 2025 18:22:35 -0700 [thread overview]
Message-ID: <20251020182235.7db743ee@kernel.org> (raw)
In-Reply-To: <20251016-jk-iwl-next-2025-10-15-v2-4-ff3a390d9fc6@intel.com>
On Thu, 16 Oct 2025 23:08:33 -0700 Jacob Keller wrote:
> void ice_parser_destroy(struct ice_parser *psr)
> {
> + if (!psr)
> + return;
questionable
> + {VIRTCHNL_PROTO_HDR_L2TPV2,
> + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_L2TPV2_SESS_ID),
> + BIT_ULL(ICE_FLOW_FIELD_IDX_L2TPV2_SESS_ID)},
> + {VIRTCHNL_PROTO_HDR_L2TPV2,
> + FIELD_SELECTOR(VIRTCHNL_PROTO_HDR_L2TPV2_LEN_SESS_ID),
> + BIT_ULL(ICE_FLOW_FIELD_IDX_L2TPV2_LEN_SESS_ID)},
consider moving out all the static data and define changes to a
separate commit for ease of review?
> };
>
> +static enum virtchnl_status_code
> +ice_vc_rss_hash_update(struct ice_hw *hw, struct ice_vsi *vsi, u8 hash_type)
> +{
> + enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_SUCCESS;
> + struct ice_vsi_ctx *ctx;
> + int ret;
> +
> + ctx = kzalloc(sizeof(*ctx), GFP_KERNEL);
> + if (!ctx)
> + return VIRTCHNL_STATUS_ERR_NO_MEMORY;
I feel like the VIRTCHNL_* error codes are spreading, we've been over
this.
> +static int
> +ice_hash_remove(struct ice_vf *vf, struct ice_rss_hash_cfg *cfg)
> +{
> + int ret;
> +
> + ret = ice_hash_moveout(vf, cfg);
> + if (ret && (ret != -ENOENT))
spurious brackets
> +/**
> + * ice_add_rss_cfg_pre_ip - Pre-process IP-layer RSS configuration
> + * @vf: VF pointer
> + * @ctx: IP L4 hash context (ESP/UDP-ESP/AH/PFCP and UDP/TCP/SCTP)
> + *
> + * Remove covered/recorded IP RSS configurations prior to adding a new one.
> + *
> + * Return: 0 on success; negative error code on failure.
> + */
> +static int
> +ice_add_rss_cfg_pre_ip(struct ice_vf *vf, struct ice_vf_hash_ip_ctx *ctx)
> +{
> + int i, ret;
> +
> + for (i = 1; i < ICE_HASH_IP_CTX_MAX; i++)
> + if (ice_is_hash_cfg_valid(&ctx->ctx[i])) {
> + ret = ice_hash_remove(vf, &ctx->ctx[i]);
> +
spurious new line
> + if (ret)
> + return ret;
> + }
> +
> + return 0;
> +}
> +static int
> +ice_parse_raw_rss_pattern(struct ice_vf *vf, struct virtchnl_proto_hdrs *proto,
> + struct ice_rss_raw_cfg *raw_cfg)
> +{
> + struct ice_parser_result pkt_parsed;
> + struct ice_hw *hw = &vf->pf->hw;
> + struct ice_parser_profile prof;
> + u16 pkt_len;
> + struct ice_parser *psr;
> + u8 *pkt_buf, *msk_buf;
> + int ret = 0;
> +
> + pkt_len = proto->raw.pkt_len;
> + if (!pkt_len)
> + return -EINVAL;
> + if (pkt_len > VIRTCHNL_MAX_SIZE_RAW_PACKET)
> + pkt_len = VIRTCHNL_MAX_SIZE_RAW_PACKET;
> +
> + pkt_buf = kzalloc(pkt_len, GFP_KERNEL);
> + msk_buf = kzalloc(pkt_len, GFP_KERNEL);
> + if (!pkt_buf || !msk_buf) {
> + ret = -ENOMEM;
> + goto free_alloc;
> + }
> +
> + memcpy(pkt_buf, proto->raw.spec, pkt_len);
> + memcpy(msk_buf, proto->raw.mask, pkt_len);
> +
> + psr = ice_parser_create(hw);
> + if (IS_ERR(psr)) {
> + ret = PTR_ERR(psr);
> + goto parser_destroy;
goto free_alloc, surely, parser creation has failed, there's nothing to destroy
> + }
> +
> + ret = ice_parser_run(psr, pkt_buf, pkt_len, &pkt_parsed);
> + if (ret)
> + goto parser_destroy;
> +
> + ret = ice_parser_profile_init(&pkt_parsed, pkt_buf, msk_buf,
> + pkt_len, ICE_BLK_RSS, &prof);
> + if (ret)
> + goto parser_destroy;
> +
> + memcpy(&raw_cfg->prof, &prof, sizeof(prof));
> +
> +parser_destroy:
> + ice_parser_destroy(psr);
> +free_alloc:
> + kfree(pkt_buf);
> + kfree(msk_buf);
> + return ret;
> +}
next prev parent reply other threads:[~2025-10-21 1:22 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-17 6:08 [PATCH net-next v2 00/14] Intel Wired LAN Driver Updates 2025-10-15 (ice, iavf, ixgbe, i40e, e1000e) Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 01/14] devlink: Add new "max_mac_per_vf" generic device param Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 02/14] i40e: support generic devlink param "max_mac_per_vf" Jacob Keller
2025-10-21 1:25 ` Jakub Kicinski
2025-10-21 20:39 ` Jacob Keller
2025-10-21 23:07 ` Jakub Kicinski
2025-10-22 9:39 ` mohammad heib
2025-10-22 22:11 ` Jacob Keller
2025-10-24 8:07 ` mohammad heib
2025-10-17 6:08 ` [PATCH net-next v2 03/14] ice: add flow parsing for GTP and new protocol field support Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 04/14] ice: add virtchnl and VF context support for GTP RSS Jacob Keller
2025-10-21 1:22 ` Jakub Kicinski [this message]
2025-10-22 9:58 ` Loktionov, Aleksandr
2025-10-17 6:08 ` [PATCH net-next v2 05/14] ice: improve TCAM priority handling for RSS profiles Jacob Keller
2025-10-21 1:16 ` Jakub Kicinski
2025-10-21 20:41 ` Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 06/14] ice: Extend PTYPE bitmap coverage for GTP encapsulated flows Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 07/14] iavf: add RSS support for GTP protocol via ethtool Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 08/14] net: docs: add missing features that can have stats Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 09/14] ice: implement ethtool standard stats Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 10/14] ice: add tracking of good transmit timestamps Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 11/14] ice: implement transmit hardware timestamp statistics Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 12/14] ice: refactor to use helpers Jacob Keller
2025-10-17 6:08 ` [PATCH net-next v2 13/14] ixgbe: preserve RSS indirection table across admin down/up Jacob Keller
2025-10-21 1:32 ` Jakub Kicinski
2025-10-21 3:59 ` Kohei Enju
2025-10-21 23:10 ` Jakub Kicinski
2025-10-22 3:40 ` Kohei Enju
2025-10-23 0:26 ` Jakub Kicinski
2025-10-23 16:26 ` Kohei Enju
2025-10-17 6:08 ` [PATCH net-next v2 14/14] e1000e: Introduce private flag to disable K1 Jacob Keller
2025-10-21 1:33 ` [PATCH net-next v2 00/14] Intel Wired LAN Driver Updates 2025-10-15 (ice, iavf, ixgbe, i40e, e1000e) Jakub Kicinski
2025-10-21 1:40 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251020182235.7db743ee@kernel.org \
--to=kuba@kernel.org \
--cc=aleksander.lobakin@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=corbet@lwn.net \
--cc=dan.nowlin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jie1x.wang@intel.com \
--cc=jiri@resnulli.us \
--cc=junfeng.guo@intel.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=qi.z.zhang@intel.com \
--cc=rafal.romanowski@intel.com \
--cc=ting.xu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.