On Fri, Nov 27, 2026 at 2:39 PM Przemek Kitszel <
[email protected]> wrote:
> On 11/26/26 1:31 PM, Jakub Ramaseuski wrote:
> > ...
> > +      * The NACs of E825C, and devices without a serial number,
>
> I would not care about devices w/o DNS - those are strictly "pre-prod",
> and if someone at intel (those should not leave our lab) would have such
> cards, it will be sufficient to just use only one per machine, or to
> program DNS number to some other value.
>
Got it, will drop the DSN part.
> --
> For the 2 NAC mode, it bothers me after working with the code around,
> that it was melted with the "whole device" thing, except its shared
> or not depending on the topic. Would be great to add one more level of
> common abstraction. Of course its not easy given there are multiple
> series in flight that touch the code.
> (this is not an action item for you, just saying that improvement here
> would be much welcomed by me personally)
> > ...
> >       struct ice_netdev_priv *np = netdev_priv(netdev);
> >       struct ice_vsi *vsi = np->vsi;
> >       struct ice_pf *pf = vsi->back;
> > -     struct ice_rss_hash_cfg cfg;
> > +     struct ice_rss_hash_cfg cfg = {};
> rct
Did not notice this, I'll reorder.
> > ...
> > + * Return: the adapter of the PF, if its PFs may share profile IDs of
@blk,
> > + * NULL otherwise.
> > + */
> > +static struct ice_adapter *
> > +ice_shared_profs_adapter(struct ice_hw *hw, enum ice_block blk)
> > +{
> > +     struct ice_pf *pf = hw->back;
> > +
> > +     if (blk != ICE_BLK_RSS || !pf->adapter ||
!pf->adapter->rss_prof_share)
> I guess pf->adapter cannot be null
>
I assume it could be NULL for a PF in recovery mode.
> > +             return NULL;
> > ...
> > +     u16 i;
>
> the default type for variable is "int", and loop counters should be
> declared in the loop header>
> > +
> > +     if (symm)
> > +             return false;> > ...> > +     DEFINE_RAW_FLEX(struct
ice_aqc_alloc_free_res_elem, buf, elem, 1);
> > +     u16 res_type, idx;
> > +     int status;>>in new code please name the variable "err", not
"status"
> we ban guard()() in netdev, scoped_guard() is fine
>
> > +
> > +     sp = share ? ice_find_shared_prof(adapter, es, fvw) : NULL;
> > ...
> > +     /* Firmware hands out unused IDs only, an entry for the ID is a
stale
> > +      * one, left from before a reset that cleared the IDs of all PFs.
> > +      */
>
> should we clear those at reset?
We do; this is for suspend/resume. Will reword or remove the comment.
>
> >  +     sp = ice_find_shared_prof_id(adapter, *prof_id);
> > ...
> >  +     /* without an entry the ID just stays private to the PF */
>
> too many comments - general rule is to avoid (esp. in the AI era),
> it's fine to comment about something that is not inferrable from the
> code, like FW/HW behavior

Hi, thank you for guidance, I'll try to work in this feedback
to the v2 (hopefully) this week. As towards the thrashing rule under
the third patch, I guess I'll follow and resort to sending
it as whole via iwl-next, so once again thank you for your time!

Reply via email to