From: netdev-bot+sashiko@kernel.org
To: przemyslaw.kitszel@intel.com
Cc: netdev@vger.kernel.org, kuba@kernel.org, jiri@resnulli.us,
anthony.l.nguyen@intel.com, aleksandr.loktionov@intel.com,
mschmidt@redhat.com, edumazet@kernel.org, horms@kernel.org,
pabeni@redhat.com, davem@davemloft.net, corbet@lwn.net,
skhan@linuxfoundation.org, rdunlap@infradead.org,
andrew+netdev@lunn.ch, saeedm@nvidia.com, tariqt@nvidia.com,
leon@kernel.org, mbloch@nvidia.com, jacob.e.keller@intel.com,
jedrzej.jagielski@intel.com, anzaki@gmail.com,
brett.creeley@amd.com, ohartoov@nvidia.com, poros@redhat.com,
donald.hunter@gmail.com
Subject: Re: [PATCH net-next v7 11/15] ice: introduce handling of virtchnl LARGE VF opcodes
Date: Tue, 24 Nov 2026 21:57:39 +0000 [thread overview]
Message-ID: <179555745942.3135.1778871392388007351@kernel.org> (raw)
In-Reply-To: <20261121230123.316391-12-przemyslaw.kitszel@intel.com>
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.
Low priority / nit picks for your consideration:
- [Low] The kernel-doc for three new handlers in
drivers/net/ethernet/intel/ice/virt/queues.c describes the return…
--
ice: introduce handling of virtchnl LARGE VF opcodes
This commit adds PF handlers for VIRTCHNL_OP_ENABLE_QUEUES_V2,
VIRTCHNL_OP_DISABLE_QUEUES_V2 and VIRTCHNL_OP_MAP_QUEUE_VECTOR, and
allowlists them, along with GET_MAX_RSS_QREGION, behind
VIRTCHNL_VF_LARGE_NUM_QPAIRS. It also widens num_ring_{rx,tx} in struct
ice_q_vector to u16, so a VF can map all 256 of its queues to one vector.
> diff --git a/drivers/net/ethernet/intel/ice/virt/queues.c b/drivers/net/ethernet/intel/ice/virt/queues.c
> index a8a2f5e5b3223..e8635236cb6c1 100644
> --- a/drivers/net/ethernet/intel/ice/virt/queues.c
> +++ b/drivers/net/ethernet/intel/ice/virt/queues.c
[ ... ]
> +/**
> + * ice_vc_ena_qs_v2_msg - message handling for VIRTCHNL_OP_ENABLE_QUEUES_V2
> + * @vf: source of the request
> + * @msg: message to handle
> + * @msglen: length of the @msg
> + *
> + * Return: 0 on success or negative on error.
> + */
> +int ice_vc_ena_qs_v2_msg(struct ice_vf *vf, u8 *msg, u16 msglen)
> +{
> + struct virtchnl_del_ena_dis_queues *ena_qs_msg =
> + (struct virtchnl_del_ena_dis_queues *)msg;
> + enum virtchnl_status_code v_ret = VIRTCHNL_STATUS_ERR_PARAM;
> + struct ice_vsi *vsi;
> +
> + if (!ice_vc_validate_qs_v2_msg(vf, ena_qs_msg, msglen))
> + goto error_param;
[ ... ]
> + v_ret = VIRTCHNL_STATUS_SUCCESS;
> + set_bit(ICE_VF_STATE_QS_ENA, vf->vf_states);
> +
> +error_param:
> + return ice_vc_send_msg_to_vf(vf, VIRTCHNL_OP_ENABLE_QUEUES_V2,
> + v_ret, NULL, 0);
> +}
[Severity: Low]
Is the "Return:" line in this kernel-doc accurate?
When validation fails, v_ret stays VIRTCHNL_STATUS_ERR_PARAM. The code then
jumps to error_param and returns the result of ice_vc_send_msg_to_vf(). That
function returns 0 whenever the mailbox write succeeds:
ice_vc_send_msg_to_vf() {
...
aq_ret = ice_aq_send_msg_to_vf(&pf->hw, vf->vf_id, v_opcode, v_retval,
msg, msglen, NULL);
if (aq_ret && pf->hw.mailboxq.sq_last_status != LIBIE_AQ_RC_ENOSYS) {
...
return -EIO;
}
return 0;
}
So a rejected request still returns 0. A negative value only means the
response could not be sent to the VF.
ice_vc_dis_qs_v2_msg() and ice_vc_map_q_vector_msg() have the same
"Return: 0 on success or negative on error" text. The V1 handler
ice_vc_dis_qs_msg() says:
* Return: exit code of sending the virtchnl response.
Could the new handlers use similar wording? This text is still unchanged at
the end of the series.
[ ... ]
> +/**
> + * ice_vc_validate_qv_maps - validate parameters sent in the qs_msg structure
> + * @vf: VF the message was received from
> + * @qv_maps: contents of the message from the VF
> + * @msglen: length of the @qv_maps
> + *
> + * Used to validate VIRTCHNL_OP_MAP_QUEUE_VECTOR messages. This should always
> + * be called before attempting map interrupts to queues. If all checks succeed,
> + * then return success indicating to the caller that the qv_maps are valid.
> + * Otherwise return false, indicating to the caller that the qv_maps are
> + * invalid.
> + *
> + * Return: true if parameters are valid, false otherwise.
> + */
> +static bool ice_vc_validate_qv_maps(struct ice_vf *vf,
> + struct virtchnl_queue_vector_maps *qv_maps,
> + u16 msglen)
[Severity: Low]
This isn't a bug, but the summary line mentions "the qs_msg structure"
while the function takes struct virtchnl_queue_vector_maps *qv_maps.
The body also says "then return success", but this is a bool function that
returns true or false. Should that say "return true" to match the Return:
line?
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261121230123.316391-1-przemyslaw.kitszel%40intel.com
next prev parent reply other threads:[~2026-11-24 21:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 22:55 [PATCH net-next v7 00/15] devlink, mlx5, iavf, ice: XLVF for iavf Przemek Kitszel
2026-11-21 22:55 ` [PATCH net-next v7 01/15] iavf: keep RSS config across resets Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko
2026-11-21 22:55 ` [PATCH net-next v7 02/15] ice: prepare RSS LUT config for runtime LUT changes Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko
2026-11-21 22:55 ` [PATCH net-next v7 03/15] ice: add VF queue ena/dis helper functions Przemek Kitszel
2026-11-21 22:55 ` [PATCH net-next v7 04/15] ice: add helpers for Global RSS LUT alloc, free, vsi_update Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko
2026-11-21 22:55 ` [PATCH net-next v7 05/15] ice: rename ICE_MAX_RSS_QS_PER_VF to ICE_MAX_QS_PER_VF_VCV1 Przemek Kitszel
2026-11-21 22:55 ` [PATCH net-next v7 06/15] ice: bump to 256qs for VF Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko
2026-11-21 22:55 ` [PATCH net-next v7 07/15] iavf: extend iavf_configure_queues() to support more queues Przemek Kitszel
2026-11-21 22:55 ` [PATCH net-next v7 08/15] iavf: temporary rename of IAVF_MAX_REQ_QUEUES to IAVF_MAX_REQ_QUEUES_VCV1 Przemek Kitszel
2026-11-21 22:55 ` [PATCH net-next v7 09/15] iavf: increase max number of queues to 256 Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko
2026-11-21 22:55 ` [PATCH net-next v7 10/15] iavf: use new opcodes to request more than 16 queues Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko
2026-11-21 22:55 ` [PATCH net-next v7 11/15] ice: introduce handling of virtchnl LARGE VF opcodes Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko [this message]
2026-11-21 22:55 ` [PATCH net-next v7 12/15] devlink: add cmode to resources Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko
2026-11-21 22:55 ` [PATCH net-next v7 13/15] ice: represent RSS LUTs as devlink resources Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko
2026-11-21 22:55 ` [PATCH net-next v7 14/15] devlink: add devlink_alloc_drv() Przemek Kitszel
2026-11-21 22:55 ` [PATCH net-next v7 15/15] ice: support up to 256 VF queues Przemek Kitszel
2026-11-24 21:57 ` netdev-bot+sashiko
2026-11-23 8:53 ` [PATCH net-next v7 00/15] devlink, mlx5, iavf, ice: XLVF for iavf Matthieu Baerts
2026-11-23 15:03 ` Przemek Kitszel
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=179555745942.3135.1778871392388007351@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=anzaki@gmail.com \
--cc=brett.creeley@amd.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jedrzej.jagielski@intel.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=mbloch@nvidia.com \
--cc=mschmidt@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=ohartoov@nvidia.com \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
--cc=rdunlap@infradead.org \
--cc=saeedm@nvidia.com \
--cc=skhan@linuxfoundation.org \
--cc=tariqt@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox