From: "Ertman, David M" <david.m.ertman@intel.com>
To: Daniel Machon <daniel.machon@microchip.com>
Cc: "intel-wired-lan@lists.osuosl.org"
<intel-wired-lan@lists.osuosl.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: RE: [PATCH net v2 06/10] ice: Flesh out implementation of support for SRIOV on bonded interface
Date: Thu, 8 Jun 2023 01:08:01 +0000 [thread overview]
Message-ID: <MW5PR11MB581154647D4EDD3F9FFE9D24DD50A@MW5PR11MB5811.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230607084215.km4btmugwew6633t@DEN-LT-70577>
> -----Original Message-----
> From: Daniel Machon <daniel.machon@microchip.com>
> Sent: Wednesday, June 7, 2023 1:42 AM
> To: Ertman, David M <david.m.ertman@intel.com>
> Cc: intel-wired-lan@lists.osuosl.org; netdev@vger.kernel.org
> Subject: Re: [PATCH net v2 06/10] ice: Flesh out implementation of support for
> SRIOV on bonded interface
>
>
> Mostly tiny nits here. But since you are respinning, you might as well
> get that in.
>
> > Add in the function s that will allow a VF created on the primary interface
>
> s/function s/functions/
Change made
>
> > of a bond to "fail-over" to another PF interface in the bond and continue
> > to Tx and Rx.
> >
> > +/**
> > + * ice_lag_qbuf_recfg - generate a buffer of queues for a reconfigure
> command
> > + * @hw: HW struct that contains the queue contexts
> > + * @qbuf: pointer to buffer to populate
> > + * @vsi_num: index of the VSI in PF space
> > + * @numq: number of queues to search for
> > + * @tc: traffic class that contains the queues
> > + *
> > + * function returns the numnber of valid queues in buffer
>
> s/numnber/number/
Change made
>
> > + */
> > +static u16
> > +ice_lag_qbuf_recfg(struct ice_hw *hw, struct ice_aqc_cfg_txqs_buf *qbuf,
> > +
> > /**
> > * ice_lag_move_vf_node_tc - move scheduling nodes for one VF on one TC
> > * @lag: lag info struct
> > @@ -245,6 +353,167 @@ static void
> > ice_lag_move_vf_node_tc(struct ice_lag *lag, u8 oldport, u8 newport,
> > u16 vsi_num, u8 tc)
> > {
> > + struct ice_sched_node *n_prt, *tc_node, *aggnode;
> > + u16 num_nodes[ICE_AQC_TOPO_MAX_LEVEL_NUM] = { 0 };
>
> RXT.
Moved the u16 num_nodes line into first position.
>
> > + u16 numq, valq, buf_size, num_moved, qbuf_size;
> > + struct device *dev = ice_pf_to_dev(lag->pf);
> > + struct ice_aqc_cfg_txqs_buf *qbuf;
> > + struct ice_aqc_move_elem *buf;
> > + struct ice_hw *new_hw = NULL;
> > + struct ice_port_info *pi;
> > + aggnode = ice_sched_get_agg_node(pi, tc_node, ICE_DFLT_AGG_ID);
> > + if (!aggnode) {
> > + dev_warn(dev, "Failure to find aggreagte node in failover tree\n");
>
> s/aggreagte/aggregate/
Change made
>
> > + goto resume_reclaim;
> > + }
> > +
> > + if (!buf) {
> > + dev_err(ice_pf_to_dev(local_lag->pf), "-ENONMEM error setting
> SWID\n");
>
> s/ENONMEM/ENOMEM/
Change made
>
> > + return;
> > + }
> > +
> > + buf->num_elems = cpu_to_le16(1);
> > + buf->res_type = cpu_to_le16(ICE_AQC_RES_TYPE_SWID);
> > + /* if unlinnking need to free the shared resource */
> > + if (!link && local_lag->bond_swid) {
> > + buf->elem[0].e.sw_resp = cpu_to_le16(local_lag->bond_swid);
> > + status = ice_aq_alloc_free_res(&local_lag->pf->hw, 1, buf,
> > + buf_len, ice_aqc_opc_free_res,
> > + NULL);
> > + if (status)
> > + dev_err(ice_pf_to_dev(local_lag->pf), "Error freeing SWID duing
> LAG unlink\n");
>
> s/duing/during/
>
Change made.
> > + local_lag->bond_swid = 0;
> > + }
> > +
> > + if (link) {
> >
> > + kfree(new_rcp);
> > return rid;
> > }
>
> You return 0 on error here. In patch #5, rid is checked against zero and
> -EINVAL is returned. Maybe you could make rid a function argument and
> just return the actual error codes here. That way the error is passed down
> the callstack. Just a suggestion - your call.
Seemed like a reasonable change - passing the actual error could be helpful
In future debugging. Change Made Changes coming in v3.
And thanks for the reviews!
next prev parent reply other threads:[~2023-06-08 1:08 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-05 18:22 [PATCH net v2 00/10] Implement support for SRIOV + LAG Dave Ertman
2023-06-05 18:22 ` [PATCH net v2 01/10] ice: Correctly initialize queue context values Dave Ertman
2023-06-06 9:03 ` Daniel Machon
2023-06-06 16:31 ` Ertman, David M
2023-06-05 18:22 ` [PATCH net v2 02/10] ice: Add driver support for firmware changes for LAG Dave Ertman
2023-06-06 9:16 ` Daniel Machon
2023-06-06 16:59 ` Ertman, David M
2023-06-05 18:22 ` [PATCH net v2 03/10] ice: changes to the interface with the HW and FW for SRIOV_VF+LAG Dave Ertman
2023-06-06 9:36 ` Daniel Machon
2023-06-06 18:11 ` Ertman, David M
2023-06-05 18:22 ` [PATCH net v2 04/10] ice: implement lag netdev event handler Dave Ertman
2023-06-06 9:56 ` Daniel Machon
2023-06-06 18:23 ` Ertman, David M
2023-06-07 7:22 ` Daniel Machon
2023-06-05 18:22 ` [PATCH net v2 05/10] ice: process events created by " Dave Ertman
2023-06-06 10:54 ` Daniel Machon
2023-06-06 18:26 ` Ertman, David M
2023-06-05 18:22 ` [PATCH net v2 06/10] ice: Flesh out implementation of support for SRIOV on bonded interface Dave Ertman
2023-06-07 8:42 ` Daniel Machon
2023-06-08 1:08 ` Ertman, David M [this message]
2023-06-05 18:22 ` [PATCH net v2 07/10] ice: support non-standard teardown of bond interface Dave Ertman
2023-06-07 8:48 ` Daniel Machon
2023-06-05 18:22 ` [PATCH net v2 08/10] ice: enforce interface eligibility and add messaging for SRIOV LAG Dave Ertman
2023-06-07 8:54 ` Daniel Machon
2023-06-05 18:22 ` [PATCH net v2 09/10] ice: enforce no DCB config changing when in bond Dave Ertman
2023-06-07 9:01 ` Daniel Machon
2023-06-05 18:22 ` [PATCH net v2 10/10] ice: update reset path for SRIOV LAG support Dave Ertman
2023-06-07 10:08 ` Daniel Machon
2023-06-08 17:24 ` Ertman, David M
2023-06-05 19:12 ` [PATCH net v2 00/10] Implement support for SRIOV + LAG Ertman, David M
2023-06-05 20:27 ` Jakub Kicinski
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=MW5PR11MB581154647D4EDD3F9FFE9D24DD50A@MW5PR11MB5811.namprd11.prod.outlook.com \
--to=david.m.ertman@intel.com \
--cc=daniel.machon@microchip.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).