From: Simon Horman <horms@kernel.org>
To: Roger Quadros <rogerq@kernel.org>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, vladimir.oltean@nxp.com, s-vadapalli@ti.com,
srk@ti.com, vigneshr@ti.com, p-varis@ti.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 net-next 2/4] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode
Date: Sun, 1 Oct 2023 08:55:54 +0200 [thread overview]
Message-ID: <20231001065554.GH92317@kernel.org> (raw)
In-Reply-To: <20230927072741.21221-3-rogerq@kernel.org>
On Wed, Sep 27, 2023 at 10:27:39AM +0300, Roger Quadros wrote:
...
> +static int am65_cpsw_setup_mqprio(struct net_device *ndev, void *type_data)
> +{
> + struct am65_cpsw_port *port = am65_ndev_to_port(ndev);
> + struct am65_cpsw_mqprio *p_mqprio = &port->qos.mqprio;
> + struct tc_mqprio_qopt_offload *mqprio = type_data;
> + struct am65_cpsw_common *common = port->common;
> + struct tc_mqprio_qopt *qopt = &mqprio->qopt;
> + int tc, offset, count, ret, prio;
> + u8 num_tc = qopt->num_tc;
> + u32 tx_prio_map = 0;
> + int i;
> +
> + memcpy(&p_mqprio->mqprio_hw, mqprio, sizeof(*mqprio));
> +
> + ret = pm_runtime_get_sync(common->dev);
> + if (ret < 0) {
> + pm_runtime_put_noidle(common->dev);
> + return ret;
> + }
> +
> + if (!num_tc) {
> + am65_cpsw_reset_tc_mqprio(ndev);
> + goto exit_put;
> + }
> +
> + ret = am65_cpsw_mqprio_verify_shaper(port, mqprio);
> + if (ret)
> + goto exit_put;
> +
> + netdev_set_num_tc(ndev, num_tc);
> +
> + /* Multiple Linux priorities can map to a Traffic Class
> + * A Traffic Class can have multiple contiguous Queues,
> + * Queues get mapped to Channels (thread_id),
> + * if not VLAN tagged, thread_id is used as packet_priority
> + * if VLAN tagged. VLAN priority is used as packet_priorit
Hi,
I don't think it is worth respinning just because of this, but
there seems to be a 'y' missing from the end of the line above.
> + * packet_priority gets mapped to header_priority in p0_rx_pri_map,
> + * header_priority gets mapped to switch_priority in pn_tx_pri_map.
> + * As p0_rx_pri_map is left at defaults (0x76543210), we can
> + * assume that Queue_n gets mapped to header_priority_n. We can then
> + * set the switch priority in pn_tx_pri_map.
> + */
...
next prev parent reply other threads:[~2023-10-01 6:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 7:27 [PATCH v5 net-next 0/4] net: ethernet: am65-cpsw: Add mqprio, frame pre-emption & coalescing Roger Quadros
2023-09-27 7:27 ` [PATCH v5 net-next 1/4] net: ethernet: ti: am65-cpsw: Move code to avoid forward declaration Roger Quadros
2023-09-27 7:27 ` [PATCH v5 net-next 2/4] net: ethernet: ti: am65-cpsw: add mqprio qdisc offload in channel mode Roger Quadros
2023-10-01 6:55 ` Simon Horman [this message]
2023-10-06 12:28 ` Roger Quadros
2023-10-05 9:01 ` Vladimir Oltean
2023-10-06 12:29 ` Roger Quadros
2023-09-27 7:27 ` [PATCH v5 net-next 3/4] net: ethernet: ti: am65-cpsw-qos: Add Frame Preemption MAC Merge support Roger Quadros
2023-10-05 7:57 ` Paolo Abeni
2023-10-06 12:30 ` Roger Quadros
2023-10-05 9:29 ` Vladimir Oltean
2023-10-06 12:32 ` Roger Quadros
2023-09-27 7:27 ` [PATCH v5 net-next 4/4] net: ethernet: ti: am65-cpsw: add sw tx/rx irq coalescing based on hrtimers Roger Quadros
2023-10-01 6:56 ` [PATCH v5 net-next 0/4] net: ethernet: am65-cpsw: Add mqprio, frame pre-emption & coalescing Simon Horman
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=20231001065554.GH92317@kernel.org \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--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=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=srk@ti.com \
--cc=vigneshr@ti.com \
--cc=vladimir.oltean@nxp.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.