lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1333946741.395386.1737635412707.JavaMail.zimbra@couthit.local>
Date: Thu, 23 Jan 2025 18:00:12 +0530 (IST)
From: Basharath Hussain Khaja <basharath@...thit.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: basharath <basharath@...thit.com>, danishanwar <danishanwar@...com>, 
	rogerq <rogerq@...nel.org>, andrew+netdev <andrew+netdev@...n.ch>, 
	davem <davem@...emloft.net>, edumazet <edumazet@...gle.com>, 
	kuba <kuba@...nel.org>, pabeni <pabeni@...hat.com>, 
	Rob Herring <robh@...nel.org>, krzk+dt <krzk+dt@...nel.org>, 
	conor+dt <conor+dt@...nel.org>, nm <nm@...com>, 
	ssantosh <ssantosh@...nel.org>, tony <tony@...mide.com>, 
	richardcochran <richardcochran@...il.com>, 
	parvathi <parvathi@...thit.com>, schnelle <schnelle@...ux.ibm.com>, 
	rdunlap <rdunlap@...radead.org>, diogo ivo <diogo.ivo@...mens.com>, 
	m-karicheri2 <m-karicheri2@...com>, horms <horms@...nel.org>, 
	jacob e keller <jacob.e.keller@...el.com>, 
	m-malladi <m-malladi@...com>, 
	javier carrasco cruz <javier.carrasco.cruz@...il.com>, 
	afd <afd@...com>, s-anna <s-anna@...com>, 
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>, 
	netdev <netdev@...r.kernel.org>, 
	devicetree <devicetree@...r.kernel.org>, 
	linux-kernel <linux-kernel@...r.kernel.org>, 
	linux-omap <linux-omap@...r.kernel.org>, 
	pratheesh <pratheesh@...com>, prajith <prajith@...com>, 
	vigneshr <vigneshr@...com>, praneeth <praneeth@...com>, 
	srk <srk@...com>, rogerq <rogerq@...com>, 
	krishna <krishna@...thit.com>, pmohan <pmohan@...thit.com>, 
	mohan <mohan@...thit.com>
Subject: Re: [RFC PATCH 04/10] net: ti: prueth: Adds link detection, RX and
 TX support.


> Le 09/01/2025 à 11:55, Basharath Hussain Khaja a écrit :
>> From: Roger Quadros <rogerq@...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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ