From: Basharath Hussain Khaja <basharath@couthit.com>
To: horms <horms@kernel.org>
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>,
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 v2 PATCH 04/10] net: ti: prueth: Adds link detection, RX and TX support.
Date: Sat, 1 Feb 2025 19:07:14 +0530 (IST) [thread overview]
Message-ID: <1490509701.481776.1738417034035.JavaMail.zimbra@couthit.local> (raw)
In-Reply-To: <20250130164515.GC13457@kernel.org>
> On Fri, Jan 24, 2025 at 06:07:01PM +0530, Basharath Hussain Khaja wrote:
>> 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.
>>
>> Signed-off-by: Roger Quadros <rogerq@ti.com>
>> Signed-off-by: Andrew F. Davis <afd@ti.com>
>> Signed-off-by: Parvathi Pudi <parvathi@couthit.com>
>> Signed-off-by: Basharath Hussain Khaja <basharath@couthit.com>
>> ---
>> drivers/net/ethernet/ti/icssm/icssm_prueth.c | 599 ++++++++++++++++++-
>> drivers/net/ethernet/ti/icssm/icssm_prueth.h | 46 ++
>> 2 files changed, 640 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth.c
>> b/drivers/net/ethernet/ti/icssm/icssm_prueth.c
>
> ...
>
>> +/**
>> + * icssm_emac_ndo_start_xmit - EMAC Transmit function
>> + * @skb: SKB pointer
>> + * @ndev: EMAC network adapter
>> + *
>> + * Called by the system to transmit a packet - we queue the packet in
>> + * EMAC hardware transmit queue
>> + *
>> + * Return: success(NETDEV_TX_OK) or error code (typically out of desc's)
>> + */
>> +static int icssm_emac_ndo_start_xmit(struct sk_buff *skb,
>> + struct net_device *ndev)
>
> I think the return type of this function should be netdev_tx_t
> rather than int to match the signature of ndo_start_xmit
> in struct net_device_ops.
>
> Flagged by W=1 build with clang-19
> (-Wincompatible-function-pointer-types-strict).
>
We will change the return type in the next version.
> ...
>
>> static const struct net_device_ops emac_netdev_ops = {
>> .ndo_open = icssm_emac_ndo_open,
>> .ndo_stop = icssm_emac_ndo_stop,
>> + .ndo_start_xmit = icssm_emac_ndo_start_xmit,
>> };
>>
>> /* get emac_port corresponding to eth_node name */
>
> ...
>
>> diff --git a/drivers/net/ethernet/ti/icssm/icssm_prueth.h
>> b/drivers/net/ethernet/ti/icssm/icssm_prueth.h
>
> ...
>
>> @@ -76,6 +82,32 @@ struct prueth_queue_info {
>> u16 buffer_desc_end;
>> } __packed;
>>
>> +/**
>> + * struct prueth_packet_info - Info about a packet in buffer
>> + * @start_offset: start offset of the frame in the buffer for HSR/PRP
>> + * @shadow: this packet is stored in the collision queue
>> + * @port: port packet is on
>> + * @length: length of packet
>> + * @broadcast: this packet is a broadcast packet
>> + * @error: this packet has an error
>> + * @sv_frame: indicate if the frame is a SV frame for HSR/PRP
>> + * @lookup_success: src mac found in FDB
>> + * @flood: packet is to be flooded
>> + * @timstamp: Specifies if timestamp is appended to the packet
>
> nit: @timestamp
>
We will address this in the next version.
>> + */
>> +struct prueth_packet_info {
>> + bool start_offset;
>> + bool shadow;
>> + unsigned int port;
>> + unsigned int length;
>> + bool broadcast;
>> + bool error;
>> + bool sv_frame;
>> + bool lookup_success;
>> + bool flood;
>> + bool timestamp;
>> +};
>
> ...
Thanks & Best Regards,
Basharath
next prev parent reply other threads:[~2025-02-01 13:37 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 12:23 [RFC v2 PATCH 00/10] PRU-ICSSM Ethernet Driver Basharath Hussain Khaja
2025-01-24 12:23 ` [RFC v2 PATCH 01/10] dt-bindings: net: ti: Adds DUAL-EMAC mode support on PRU-ICSS2 for AM57xx SOCs Basharath Hussain Khaja
2025-01-24 16:39 ` Conor Dooley
2025-01-29 5:16 ` Basharath Hussain Khaja
2025-01-29 17:48 ` Conor Dooley
2025-02-03 12:29 ` Basharath Hussain Khaja
2025-02-04 18:16 ` Conor Dooley
2025-01-24 12:23 ` [RFC v2 PATCH 02/10] net: ti: prueth: Adds ICSSM Ethernet driver Basharath Hussain Khaja
2025-01-30 11:41 ` Simon Horman
2025-02-01 13:25 ` Basharath Hussain Khaja
2025-01-24 12:23 ` [RFC v2 PATCH 03/10] net: ti: prueth: Adds PRUETH HW and SW configuration Basharath Hussain Khaja
2025-01-30 15:47 ` Simon Horman
2025-02-01 13:34 ` Basharath Hussain Khaja
2025-01-24 12:37 ` [RFC v2 PATCH 04/10] net: ti: prueth: Adds link detection, RX and TX support Basharath Hussain Khaja
2025-01-24 23:13 ` Joe Damato
2025-01-29 5:41 ` Basharath Hussain Khaja
2025-01-30 16:45 ` Simon Horman
2025-02-01 13:37 ` Basharath Hussain Khaja [this message]
2025-01-24 13:40 ` Basharath Hussain Khaja
2025-01-24 23:20 ` Joe Damato
2025-01-29 5:43 ` Basharath Hussain Khaja
2025-01-24 13:40 ` [RFC v2 PATCH 05/10] net: ti: prueth: Adds ethtool support for ICSSM PRUETH Driver Basharath Hussain Khaja
2025-01-30 17:23 ` Simon Horman
2025-02-01 13:48 ` Basharath Hussain Khaja
2025-01-24 13:40 ` [RFC v2 PATCH 06/10] net: ti: prueth: Adds HW timestamping support for PTP using PRU-ICSS IEP module Basharath Hussain Khaja
2025-01-31 10:33 ` Simon Horman
2025-02-05 12:24 ` Basharath Hussain Khaja
2025-01-24 13:40 ` [RFC v2 PATCH 07/10] net: ti: prueth: Adds support for network filters for traffic control supported by PRU-ICSS Basharath Hussain Khaja
2025-01-24 14:45 ` [RFC v2 PATCH 08/10] net: ti: prueth: Adds support for RX interrupt coalescing/pacing Basharath Hussain Khaja
2025-01-24 14:45 ` [RFC v2 PATCH 09/10] net: ti: prueth: Adds power management support for PRU-ICSS Basharath Hussain Khaja
2025-01-24 14:45 ` [RFC v2 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=1490509701.481776.1738417034035.JavaMail.zimbra@couthit.local \
--to=basharath@couthit.com \
--cc=afd@ti.com \
--cc=andrew+netdev@lunn.ch \
--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=s-anna@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox