From: Basharath Hussain Khaja <basharath@couthit.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: nm <nm@ti.com>, vigneshr <vigneshr@ti.com>,
tony <tony@atomide.com>, edumazet <edumazet@google.com>,
krishna <krishna@couthit.com>, pmohan <pmohan@couthit.com>,
diogo ivo <diogo.ivo@siemens.com>, Rob Herring <robh@kernel.org>,
javier carrasco cruz <javier.carrasco.cruz@gmail.com>,
praneeth <praneeth@ti.com>, m-karicheri2 <m-karicheri2@ti.com>,
basharath <basharath@couthit.com>, kuba <kuba@kernel.org>,
pabeni <pabeni@redhat.com>,
devicetree <devicetree@vger.kernel.org>,
conor+dt <conor+dt@kernel.org>, schnelle <schnelle@linux.ibm.com>,
mohan <mohan@couthit.com>,
richardcochran <richardcochran@gmail.com>,
prajith <prajith@ti.com>, rogerq <rogerq@kernel.org>,
jacob e keller <jacob.e.keller@intel.com>,
ssantosh <ssantosh@kernel.org>,
linux-omap <linux-omap@vger.kernel.org>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
rogerq <rogerq@ti.com>, srk <srk@ti.com>,
pratheesh <pratheesh@ti.com>, m-malladi <m-malladi@ti.com>,
netdev <netdev@vger.kernel.org>, rdunlap <rdunlap@infradead.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
danishanwar <danishanwar@ti.com>, afd <afd@ti.com>,
andrew+netdev <andrew+netdev@lunn.ch>,
parvathi <parvathi@couthit.com>, horms <horms@kernel.org>,
krzk+dt <krzk+dt@kernel.org>, davem <davem@davemloft.net>
Subject: Re: [RFC PATCH 04/10] net: ti: prueth: Adds link detection, RX and TX support.
Date: Thu, 23 Jan 2025 18:00:12 +0530 (IST) [thread overview]
Message-ID: <1333946741.395386.1737635412707.JavaMail.zimbra@couthit.local> (raw)
In-Reply-To: <6ac6161b-373a-47ce-801d-9e4ff1ef258c@wanadoo.fr>
> Le 09/01/2025 à 11:55, Basharath Hussain Khaja a écrit :
>> From: Roger Quadros <rogerq@ti.com>
>>
>> Changes corresponding to link configuration such as speed and duplexity.
>> IRQ and handler initializations are performed for packet reception.Firmware
>> receives the packet from the wire and stores it into OCMC queue. Next, it
>> notifies the CPU via interrupt. Upon receiving the interrupt CPU will
>> service the IRQ and packet will be processed by pushing the newly allocated
>> SKB to upper layers.
>>
>> When the user application want to transmit a packet, it will invoke
>> sys_send() which will inturn invoke the PRUETH driver, then it will write
>> the packet into OCMC queues. PRU firmware will pick up the packet and
>> transmit it on to the wire.
>
> Hi,
> a few nitpicks.
>
> ...
>
>> +static int icssm_prueth_tx_enqueue(struct prueth_emac *emac,
>> + struct sk_buff *skb,
>> + enum prueth_queue_id queue_id)
>> +{
>> + struct prueth_queue_desc __iomem *queue_desc;
>> + const struct prueth_queue_info *txqueue;
>> + u16 bd_rd_ptr, bd_wr_ptr, update_wr_ptr;
>> + struct net_device *ndev = emac->ndev;
>> + unsigned int buffer_desc_count;
>> + int free_blocks, update_block;
>> + bool buffer_wrapped = false;
>> + int write_block, read_block;
>> + void *src_addr, *dst_addr;
>> + int pkt_block_size;
>> + void __iomem *dram;
>> + int txport, pktlen;
>> + u32 wr_buf_desc;
>> + void *ocmc_ram;
>> +
>> + dram = emac->prueth->mem[emac->dram].va;
>> + if (eth_skb_pad(skb)) {
>> + if (netif_msg_tx_err(emac) && net_ratelimit())
>> + netdev_err(ndev, "packet pad failed");
>
> Missing trailing \n.
>
>> + return -ENOMEM;
>> + }
>> +
>> + /* which port to tx: MII0 or MII1 */
>> + txport = emac->tx_port_queue;
>
> ...
>
>> +static int icssm_emac_request_irqs(struct prueth_emac *emac)
>> +{
>> + struct net_device *ndev = emac->ndev;
>> + int ret = 0;
>
> No need to init.
>
>> +
>> + ret = request_threaded_irq(emac->rx_irq, NULL, icssm_emac_rx_thread,
>> + IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
>> + ndev->name, ndev);
>> + if (ret) {
>> + netdev_err(ndev, "unable to request RX IRQ\n");
>> + return ret;
>> + }
>
> ...
>
>> +static int icssm_emac_ndo_start_xmit(struct sk_buff *skb,
>> + struct net_device *ndev)
>> +{
>> + struct prueth_emac *emac = netdev_priv(ndev);
>> + int ret = 0;
>> + u16 qid;
>> +
>> + if (unlikely(!emac->link)) {
>> + if (netif_msg_tx_err(emac) && net_ratelimit())
>> + netdev_err(ndev, "No link to transmit");
>
> \n
>
>> + goto fail_tx;
>> + }
>> +
>> + qid = icssm_prueth_get_tx_queue_id(emac->prueth, skb);...
We will handle all comments in the next version.
Thanks & Best Regards,
Basharath
WARNING: multiple messages have this Message-ID (diff)
From: Basharath Hussain Khaja <basharath@couthit.com>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: basharath <basharath@couthit.com>,
danishanwar <danishanwar@ti.com>, rogerq <rogerq@kernel.org>,
andrew+netdev <andrew+netdev@lunn.ch>,
davem <davem@davemloft.net>, edumazet <edumazet@google.com>,
kuba <kuba@kernel.org>, pabeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>, krzk+dt <krzk+dt@kernel.org>,
conor+dt <conor+dt@kernel.org>, nm <nm@ti.com>,
ssantosh <ssantosh@kernel.org>, tony <tony@atomide.com>,
richardcochran <richardcochran@gmail.com>,
parvathi <parvathi@couthit.com>,
schnelle <schnelle@linux.ibm.com>,
rdunlap <rdunlap@infradead.org>,
diogo ivo <diogo.ivo@siemens.com>,
m-karicheri2 <m-karicheri2@ti.com>, horms <horms@kernel.org>,
jacob e keller <jacob.e.keller@intel.com>,
m-malladi <m-malladi@ti.com>,
javier carrasco cruz <javier.carrasco.cruz@gmail.com>,
afd <afd@ti.com>, s-anna <s-anna@ti.com>,
linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
netdev <netdev@vger.kernel.org>,
devicetree <devicetree@vger.kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-omap <linux-omap@vger.kernel.org>,
pratheesh <pratheesh@ti.com>, prajith <prajith@ti.com>,
vigneshr <vigneshr@ti.com>, praneeth <praneeth@ti.com>,
srk <srk@ti.com>, rogerq <rogerq@ti.com>,
krishna <krishna@couthit.com>, pmohan <pmohan@couthit.com>,
mohan <mohan@couthit.com>
Subject: Re: [RFC PATCH 04/10] net: ti: prueth: Adds link detection, RX and TX support.
Date: Thu, 23 Jan 2025 18:00:12 +0530 (IST) [thread overview]
Message-ID: <1333946741.395386.1737635412707.JavaMail.zimbra@couthit.local> (raw)
In-Reply-To: <6ac6161b-373a-47ce-801d-9e4ff1ef258c@wanadoo.fr>
> Le 09/01/2025 à 11:55, Basharath Hussain Khaja a écrit :
>> From: Roger Quadros <rogerq@ti.com>
>>
>> Changes corresponding to link configuration such as speed and duplexity.
>> IRQ and handler initializations are performed for packet reception.Firmware
>> receives the packet from the wire and stores it into OCMC queue. Next, it
>> notifies the CPU via interrupt. Upon receiving the interrupt CPU will
>> service the IRQ and packet will be processed by pushing the newly allocated
>> SKB to upper layers.
>>
>> When the user application want to transmit a packet, it will invoke
>> sys_send() which will inturn invoke the PRUETH driver, then it will write
>> the packet into OCMC queues. PRU firmware will pick up the packet and
>> transmit it on to the wire.
>
> Hi,
> a few nitpicks.
>
> ...
>
>> +static int icssm_prueth_tx_enqueue(struct prueth_emac *emac,
>> + struct sk_buff *skb,
>> + enum prueth_queue_id queue_id)
>> +{
>> + struct prueth_queue_desc __iomem *queue_desc;
>> + const struct prueth_queue_info *txqueue;
>> + u16 bd_rd_ptr, bd_wr_ptr, update_wr_ptr;
>> + struct net_device *ndev = emac->ndev;
>> + unsigned int buffer_desc_count;
>> + int free_blocks, update_block;
>> + bool buffer_wrapped = false;
>> + int write_block, read_block;
>> + void *src_addr, *dst_addr;
>> + int pkt_block_size;
>> + void __iomem *dram;
>> + int txport, pktlen;
>> + u32 wr_buf_desc;
>> + void *ocmc_ram;
>> +
>> + dram = emac->prueth->mem[emac->dram].va;
>> + if (eth_skb_pad(skb)) {
>> + if (netif_msg_tx_err(emac) && net_ratelimit())
>> + netdev_err(ndev, "packet pad failed");
>
> Missing trailing \n.
>
>> + return -ENOMEM;
>> + }
>> +
>> + /* which port to tx: MII0 or MII1 */
>> + txport = emac->tx_port_queue;
>
> ...
>
>> +static int icssm_emac_request_irqs(struct prueth_emac *emac)
>> +{
>> + struct net_device *ndev = emac->ndev;
>> + int ret = 0;
>
> No need to init.
>
>> +
>> + ret = request_threaded_irq(emac->rx_irq, NULL, icssm_emac_rx_thread,
>> + IRQF_TRIGGER_HIGH | IRQF_ONESHOT,
>> + ndev->name, ndev);
>> + if (ret) {
>> + netdev_err(ndev, "unable to request RX IRQ\n");
>> + return ret;
>> + }
>
> ...
>
>> +static int icssm_emac_ndo_start_xmit(struct sk_buff *skb,
>> + struct net_device *ndev)
>> +{
>> + struct prueth_emac *emac = netdev_priv(ndev);
>> + int ret = 0;
>> + u16 qid;
>> +
>> + if (unlikely(!emac->link)) {
>> + if (netif_msg_tx_err(emac) && net_ratelimit())
>> + netdev_err(ndev, "No link to transmit");
>
> \n
>
>> + goto fail_tx;
>> + }
>> +
>> + qid = icssm_prueth_get_tx_queue_id(emac->prueth, skb);...
We will handle all comments in the next version.
Thanks & Best Regards,
Basharath
next prev parent reply other threads:[~2025-01-23 12:32 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-09 10:55 [RFC PATCH 00/10] PRU-ICSSM Ethernet Driver Basharath Hussain Khaja
2025-01-09 10:55 ` [RFC PATCH 01/10] dt-bindings: net: ti: Adds device tree binding for DUAL-EMAC mode support on PRU-ICSS2 for AM57xx SOCs Basharath Hussain Khaja
2025-01-09 14:16 ` Andrew Lunn
2025-01-09 14:16 ` Andrew Lunn
2025-01-22 13:21 ` Basharath Hussain Khaja
2025-01-22 13:21 ` Basharath Hussain Khaja
2025-01-09 16:02 ` Andrew Lunn
2025-01-09 16:02 ` Andrew Lunn
2025-01-22 13:26 ` Basharath Hussain Khaja
2025-01-22 13:26 ` Basharath Hussain Khaja
2025-01-22 13:43 ` Andrew Lunn
2025-01-22 13:43 ` Andrew Lunn
2025-01-22 15:03 ` Basharath Hussain Khaja
2025-01-22 15:03 ` Basharath Hussain Khaja
2025-01-10 16:15 ` Rob Herring
2025-01-10 16:15 ` Rob Herring
2025-01-22 13:43 ` Basharath Hussain Khaja
2025-01-22 13:43 ` Basharath Hussain Khaja
2025-01-10 16:16 ` Rob Herring
2025-01-10 16:16 ` Rob Herring
2025-01-22 13:46 ` Basharath Hussain Khaja
2025-01-22 15:28 ` Basharath Hussain Khaja
2025-01-22 15:28 ` Basharath Hussain Khaja
2025-01-09 10:55 ` [RFC PATCH 02/10] net: ti: prueth: Adds ICSSM Ethernet driver Basharath Hussain Khaja
2025-01-09 15:59 ` Andrew Lunn
2025-01-09 15:59 ` Andrew Lunn
2025-01-22 15:33 ` Basharath Hussain Khaja
2025-01-22 15:33 ` Basharath Hussain Khaja
2025-01-09 10:55 ` [RFC PATCH 03/10] net: ti: prueth: Adds PRUETH HW and SW configuration Basharath Hussain Khaja
2025-01-09 16:10 ` Andrew Lunn
2025-01-09 16:10 ` Andrew Lunn
2025-01-22 15:57 ` Basharath Hussain Khaja
2025-01-22 15:57 ` Basharath Hussain Khaja
2025-01-09 10:55 ` [RFC PATCH 04/10] net: ti: prueth: Adds link detection, RX and TX support Basharath Hussain Khaja
2025-01-09 16:24 ` Andrew Lunn
2025-01-09 16:24 ` Andrew Lunn
2025-01-23 7:02 ` Basharath Hussain Khaja
2025-01-23 7:02 ` Basharath Hussain Khaja
2025-01-23 7:16 ` Christophe JAILLET
2025-01-23 12:30 ` Basharath Hussain Khaja [this message]
2025-01-23 12:30 ` Basharath Hussain Khaja
2025-01-09 14:11 ` [RFC PATCH 00/10] PRU-ICSSM Ethernet Driver Andrew Lunn
2025-01-09 14:11 ` Andrew Lunn
2025-01-22 13:17 ` Basharath Hussain Khaja
2025-01-22 13:17 ` Basharath Hussain Khaja
2025-01-10 5:59 ` [RFC PATCH 05/10] net: ti: prueth: Adds ethtool support for ICSSM PRUETH Driver Basharath Hussain Khaja
2025-01-10 5:59 ` [RFC PATCH 06/10] net: ti: prueth: Adds HW timestamping support for PTP using PRU-ICSS IEP module Basharath Hussain Khaja
2025-01-11 16:35 ` Richard Cochran
2025-01-11 16:35 ` Richard Cochran
2025-01-23 7:23 ` Basharath Hussain Khaja
2025-01-23 7:23 ` Basharath Hussain Khaja
2025-01-11 23:38 ` Jason Xing
2025-01-11 23:38 ` Jason Xing
2025-01-23 7:25 ` Basharath Hussain Khaja
2025-01-23 7:25 ` Basharath Hussain Khaja
2025-01-10 5:59 ` [RFC PATCH 07/10] net: ti: prueth: Adds support for network filters for traffic control supported by PRU-ICSS Basharath Hussain Khaja
2025-01-10 7:13 ` [RFC PATCH 08/10] net: ti: prueth: Adds support for RX interrupt coalescing/pacing Basharath Hussain Khaja
2025-01-10 7:13 ` [RFC PATCH 09/10] net: ti: prueth: Adds power management support for PRU-ICSS Basharath Hussain Khaja
2025-01-10 7:13 ` [RFC PATCH 10/10] arm: dts: ti: Adds device tree nodes for PRU Cores, IEP and eCAP modules of PRU-ICSS2 Instance Basharath Hussain Khaja
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=1333946741.395386.1737635412707.JavaMail.zimbra@couthit.local \
--to=basharath@couthit.com \
--cc=afd@ti.com \
--cc=andrew+netdev@lunn.ch \
--cc=christophe.jaillet@wanadoo.fr \
--cc=conor+dt@kernel.org \
--cc=danishanwar@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=diogo.ivo@siemens.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=javier.carrasco.cruz@gmail.com \
--cc=krishna@couthit.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=m-karicheri2@ti.com \
--cc=m-malladi@ti.com \
--cc=mohan@couthit.com \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=pabeni@redhat.com \
--cc=parvathi@couthit.com \
--cc=pmohan@couthit.com \
--cc=prajith@ti.com \
--cc=praneeth@ti.com \
--cc=pratheesh@ti.com \
--cc=rdunlap@infradead.org \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
--cc=rogerq@kernel.org \
--cc=rogerq@ti.com \
--cc=schnelle@linux.ibm.com \
--cc=srk@ti.com \
--cc=ssantosh@kernel.org \
--cc=tony@atomide.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 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.