From: Roger Quadros <rogerq@kernel.org>
To: Vladimir Oltean <vladimir.oltean@nxp.com>
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 13:11:00 +0200 [thread overview]
Message-ID: <4f09985e-396b-42e9-b7a0-5f9db58e6131@kernel.org> (raw)
In-Reply-To: <af23bd5d-2daf-487b-858c-9e3ad684864d@kernel.org>
On 21/11/2023 11:23, Roger Quadros wrote:
>
>
> On 21/11/2023 00:56, Vladimir Oltean wrote:
>> 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()?
>
> I'm sorry that I missed this. I'll take a look.
Now I recollect. You mentioned this in a different series review
https://lore.kernel.org/all/20231011102536.r65xyzmh5kap2cf2@skbuf/
Since this patch is more trivial cleanups I will do the
taprio_offload_get/free() change to a separate patch.
>
>>
>>> +
>>> +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.
>
> OK.
>
>>
>>> + 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;
>>> }
>
> Thanks for the detailed review!
>
--
cheers,
-roger
next prev parent reply other threads:[~2023-11-21 11:11 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
2023-11-21 9:23 ` Roger Quadros
2023-11-21 11:11 ` Roger Quadros [this message]
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=4f09985e-396b-42e9-b7a0-5f9db58e6131@kernel.org \
--to=rogerq@kernel.org \
--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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome