All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Cc: intel-wired-lan@lists.osuosl.org, Qi Zhang <qi.z.zhang@intel.com>
Subject: Re: [Intel-wired-lan] [bug report] ice: Enable FDIR Configure for AVF
Date: Mon, 1 Sep 2025 14:52:22 +0300	[thread overview]
Message-ID: <aLWI9lTXHdRkF3T3@stanley.mountain> (raw)
In-Reply-To: <412ac86c-583f-4952-9723-d0c8b7fe2566@intel.com>

On Mon, Sep 01, 2025 at 01:15:03PM +0200, Przemek Kitszel wrote:
> On 9/1/25 11:09, Dan Carpenter wrote:
> > Hello Qi Zhang,
> > 
> > Commit 1f7ea1cd6a37 ("ice: Enable FDIR Configure for AVF") from Mar
> > 9, 2021 (linux-next), leads to the following Smatch static checker
> > warning:
> > 
> > 	drivers/net/ethernet/intel/ice/virt/fdir.c:2339 ice_vc_del_fdir_fltr()
> > 	warn: missing error code here? 'kzalloc_noprof()' failed
> > 
> > drivers/net/ethernet/intel/ice/virt/fdir.c
> >      2311 int ice_vc_del_fdir_fltr(struct ice_vf *vf, u8 *msg)
> >      2312 {
> >      2313         struct virtchnl_fdir_del *fltr = (struct virtchnl_fdir_del *)msg;
> >      2314         struct virtchnl_fdir_del *stat = NULL;
> >      2315         struct virtchnl_fdir_fltr_conf *conf;
> >      2316         struct ice_vf_fdir *fdir = &vf->fdir;
> >      2317         enum virtchnl_status_code v_ret;
> >      2318         struct ice_fdir_fltr *input;
> >      2319         enum ice_fltr_ptype flow;
> >      2320         struct device *dev;
> >      2321         struct ice_pf *pf;
> >      2322         int is_tun = 0;
> >      2323         int len = 0;
> >      2324         int ret;
> >      2325
> >      2326         pf = vf->pf;
> >      2327         dev = ice_pf_to_dev(pf);
> >      2328         ret = ice_vc_fdir_param_check(vf, fltr->vsi_id);
> >      2329         if (ret) {
> >      2330                 v_ret = VIRTCHNL_STATUS_ERR_PARAM;
> >      2331                 dev_dbg(dev, "Parameter check for VF %d failed\n", vf->vf_id);
> >      2332                 goto err_exit;
> >      2333         }
> >      2334
> >      2335         stat = kzalloc(sizeof(*stat), GFP_KERNEL);
> >      2336         if (!stat) {
> >      2337                 v_ret = VIRTCHNL_STATUS_ERR_NO_MEMORY;
> > 
> > It's not clear if this is deliberate or not.  Maybe we could add a comment?
> > Here set v_ret.
> 
> thank you for the report,
> ice_vc_del_fdir_fltr() is only called from general virtchnl processing
> handler, which returns void, and only logs errors on info level, there
> is nothing to do about the error anyway
> in this case failure at kzalloc() call is on ice/kernel side, not on VF
> side, so in principle worth mentioning/blaming; but, from return code
> (we don't have much variety of those in VC, but for memory alloc failure
> there is one) VF side is knowing that error had happened exactly here
> in case of FDIR filter DEL operation, so not much value added
> 

Thanks for the explanation!

regards,
dan carpenter


      reply	other threads:[~2025-09-01 11:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-01  9:09 [Intel-wired-lan] [bug report] ice: Enable FDIR Configure for AVF Dan Carpenter
2025-09-01 11:15 ` Przemek Kitszel
2025-09-01 11:52   ` Dan Carpenter [this message]

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=aLWI9lTXHdRkF3T3@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=qi.z.zhang@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.