From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Roger Quadros <rogerq@kernel.org>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, s-vadapalli@ti.com, r-gunasekaran@ti.com,
vigneshr@ti.com, srk@ti.com, horms@kernel.org, p-varis@ti.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 net-next 2/7] net: ethernet: am65-cpsw: cleanup TAPRIO handling
Date: Tue, 21 Nov 2023 00:56:48 +0200 [thread overview]
Message-ID: <20231120225648.pgvzd2jejg5jll2t@skbuf> (raw)
In-Reply-To: <20231120140147.78726-3-rogerq@kernel.org> <20231120140147.78726-3-rogerq@kernel.org>
On Mon, Nov 20, 2023 at 04:01:42PM +0200, Roger Quadros wrote:
> -static int am65_cpsw_configure_taprio(struct net_device *ndev,
> - struct am65_cpsw_est *est_new)
> +static void am65_cpsw_cp_taprio(struct tc_taprio_qopt_offload *from,
> + struct tc_taprio_qopt_offload *to)
> +{
> + int i;
> +
> + *to = *from;
> + for (i = 0; i < from->num_entries; i++)
> + to->entries[i] = from->entries[i];
> +}
I think I mentioned this before: have you looked at taprio_offload_get()
and taprio_offload_put()?
> +
> +static int am65_cpsw_taprio_replace(struct net_device *ndev,
> + struct tc_taprio_qopt_offload *taprio)
> {
> struct am65_cpsw_common *common = am65_ndev_to_common(ndev);
> + struct netlink_ext_ack *extack = taprio->mqprio.extack;
> + struct am65_cpsw_port *port = am65_ndev_to_port(ndev);
> struct am65_cpts *cpts = common->cpts;
> int ret = 0, tact = TACT_PROG;
> + struct am65_cpsw_est *est_new;
>
> - am65_cpsw_est_update_state(ndev);
> + if (!netif_running(ndev)) {
> + NL_SET_ERR_MSG_MOD(extack, "interface is down, link speed unknown\n");
The extack message doesn't need a \n.
> + return -ENETDOWN;
> + }
>
> - if (est_new->taprio.cmd == TAPRIO_CMD_DESTROY) {
> - am65_cpsw_stop_est(ndev);
> - return ret;
> + if (common->pf_p0_rx_ptype_rrobin) {
> + NL_SET_ERR_MSG_MOD(extack,
> + "p0-rx-ptype-rrobin flag conflicts with taprio qdisc\n");
Also here.
> + return -EINVAL;
> + }
> +
> + if (port->qos.link_speed == SPEED_UNKNOWN)
> + return -ENOLINK;
> +
> + if (taprio->cycle_time_extension) {
> + NL_SET_ERR_MSG_MOD(extack,
> + "cycle time extension not supported");
Here it's ok.
> + return -EOPNOTSUPP;
> }
next prev parent reply other threads:[~2023-11-20 22:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 14:01 [PATCH v6 net-next 0/7] net: ethernet: am65-cpsw: Add mqprio, frame pre-emption & coalescing Roger Quadros
2023-11-20 14:01 ` [PATCH v6 net-next 1/7] net: ethernet: am65-cpsw: Build am65-cpsw-qos only if required Roger Quadros
2023-11-20 14:01 ` [PATCH v6 net-next 2/7] net: ethernet: am65-cpsw: cleanup TAPRIO handling Roger Quadros
2023-11-20 22:56 ` Vladimir Oltean [this message]
2023-11-21 9:23 ` Roger Quadros
2023-11-21 11:11 ` Roger Quadros
2023-11-20 14:01 ` [PATCH v6 net-next 3/7] net: ethernet: ti: am65-cpsw: Move code to avoid forward declaration Roger Quadros
2023-11-20 14:01 ` [PATCH v6 net-next 4/7] net: ethernet: am65-cpsw: Move register definitions to header file Roger Quadros
2023-11-20 14:01 ` [PATCH v6 net-next 5/7] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode Roger Quadros
2023-11-20 23:03 ` Vladimir Oltean
2023-11-21 9:25 ` Roger Quadros
2023-11-20 14:01 ` [PATCH v6 net-next 6/7] net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support Roger Quadros
2023-11-20 23:26 ` Vladimir Oltean
2023-11-21 11:02 ` Roger Quadros
2023-11-21 11:53 ` Vladimir Oltean
2023-11-30 11:49 ` Roger Quadros
2023-11-30 13:22 ` Vladimir Oltean
2023-11-30 14:23 ` Roger Quadros
2023-11-30 21:19 ` Vladimir Oltean
2023-11-21 11:48 ` Roger Quadros
2023-11-20 14:01 ` [PATCH v6 net-next 7/7] net: ethernet: ti: am65-cpsw: add sw tx/rx irq coalescing based on hrtimers Roger Quadros
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=20231120225648.pgvzd2jejg5jll2t@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=p-varis@ti.com \
--cc=pabeni@redhat.com \
--cc=r-gunasekaran@ti.com \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=srk@ti.com \
--cc=vigneshr@ti.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