linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Markus Elfring <Markus.Elfring@web.de>
Cc: Siddharth Vadapalli <s-vadapalli@ti.com>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	kernel-janitors@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	MD Danish Anwar <danishanwar@ti.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Roger Quadros <rogerq@kernel.org>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-doc@vger.kernel.org,
	Misael Lopez Cruz <misael.lopez@ti.com>,
	Sriramakrishnan <srk@ti.com>,
	Vignesh Raghavendra <vigneshr@ti.com>
Subject: Re: [RFC PATCH net-next 12/28] net: ethernet: ti: cpsw-proxy-client: add NAPI RX polling function
Date: Sun, 19 May 2024 15:00:42 +0100	[thread overview]
Message-ID: <ZkoGCpq1XN4t7wHS@casper.infradead.org> (raw)
In-Reply-To: <f9470c3b-5f69-41fa-b0f4-ade18053473a@web.de>


FYI, Markus can be safely ignored.  His opinions are well-established as
being irrelevant.

On Sun, May 19, 2024 at 03:18:52PM +0200, Markus Elfring wrote:
> …
> > +++ b/drivers/net/ethernet/ti/cpsw-proxy-client.c
> …
> > @@ -988,6 +994,189 @@ static int vport_tx_poll(struct napi_struct *napi_tx, int budget)
> …
> > +static int vport_rx_packets(struct virtual_port *vport, u32 rx_chan_idx)
> > +{
> …
> > +	if (unlikely(!netif_running(skb->dev))) {
> > +		dev_kfree_skb_any(skb);
> > +		return -ENODEV;
> > +	}
> 
> I suggest to move such exception handling to the end of this function implementation
> so that it can be better reused also by another if branch.
> https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources
> 
> How do you think about to increase the application of scope-based resource management
> also for such a software component?
> https://elixir.bootlin.com/linux/v6.9.1/source/include/linux/cleanup.h
> 
> Regards,
> Markus
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2024-05-19 14:01 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-18 12:42 [RFC PATCH net-next 00/28] Add CPSW Proxy Client driver Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 01/28] docs: networking: ti: add driver doc for CPSW Proxy Client Siddharth Vadapalli
2024-05-19 15:31   ` Andrew Lunn
2024-05-21 12:12     ` Siddharth Vadapalli
2024-05-21 13:07       ` Andrew Lunn
2024-06-02  4:06     ` Siddharth Vadapalli
2024-06-04 14:20       ` Andrew Lunn
2024-06-06  6:52         ` Siddharth Vadapalli
2024-06-11 22:03           ` Andrew Lunn
2024-06-12  7:12             ` Siddharth Vadapalli
2024-06-12 22:40               ` Andrew Lunn
2024-05-18 12:42 ` [RFC PATCH net-next 02/28] net: ethernet: ti: add RPMsg structures for Ethernet Switch Firmware Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 03/28] net: ethernet: ti: introduce the CPSW Proxy Client Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 04/28] net: ethernet: ti: cpsw-proxy-client: add support for creating requests Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 05/28] net: ethernet: ti: cpsw-proxy-client: enable message exchange with EthFw Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 06/28] net: ethernet: ti: cpsw-proxy-client: add helper to get virtual port info Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 07/28] net: ethernet: ti: cpsw-proxy-client: add helper to attach virtual ports Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 08/28] net: ethernet: ti: cpsw-proxy-client: add helpers to alloc/free resources Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 09/28] net: ethernet: ti: cpsw-proxy-client: add helper to init TX DMA Channels Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 10/28] net: ethernet: ti: cpsw-proxy-client: add helper to init RX " Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 11/28] net: ethernet: ti: cpsw-proxy-client: add NAPI TX polling function Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 12/28] net: ethernet: ti: cpsw-proxy-client: add NAPI RX " Siddharth Vadapalli
2024-05-19 13:18   ` Markus Elfring
2024-05-19 14:00     ` Matthew Wilcox [this message]
2024-05-19 14:30       ` [RFC " Markus Elfring
2024-05-19 15:37       ` [RFC PATCH net-next " Andrew Lunn
2024-05-18 12:42 ` [RFC PATCH net-next 13/28] net: ethernet: ti: cpsw-proxy-client: add helper to create netdevs Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 14/28] net: ethernet: ti: cpsw-proxy-client: add and register dma irq handlers Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 15/28] net: ethernet: ti: cpsw-proxy-client: add helpers to (de)register MAC Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 16/28] net: ethernet: ti: cpsw-proxy-client: implement and register ndo_open Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 17/28] net: ethernet: ti: cpsw-proxy-client: implement and register ndo_stop Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 18/28] net: ethernet: ti: cpsw-proxy-client: implement and register ndo_start_xmit Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 19/28] net: ethernet: ti: cpsw-proxy-client: implement and register ndo_get_stats64 Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 20/28] net: ethernet: ti: cpsw-proxy-client: implement and register ndo_tx_timeout Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 21/28] net: ethernet: ti: cpsw-proxy-client: register ndo_validate/ndo_set_mac_addr Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 22/28] net: ethernet: ti: cpsw-proxy-client: implement .get_link ethtool op Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 23/28] net: ethernet: ti: cpsw-proxy-client: add sw tx/rx irq coalescing Siddharth Vadapalli
2024-05-19 14:12   ` Markus Elfring
2024-05-18 12:42 ` [RFC PATCH net-next 24/28] net: ethernet: ti: cpsw-proxy-client: export coalescing support Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 25/28] net: ethernet: ti: cpsw-proxy-client: add helpers to (de)register IPv4 Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 26/28] net: ethernet: ti: cpsw-proxy-client: add ndo_set_rx_mode member Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 27/28] net: ethernet: ti: cpsw-proxy-client: add helper to detach virtual ports Siddharth Vadapalli
2024-05-18 12:42 ` [RFC PATCH net-next 28/28] net: ethernet: ti: cpsw-proxy-client: enable client driver functionality Siddharth Vadapalli

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=ZkoGCpq1XN4t7wHS@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=Markus.Elfring@web.de \
    --cc=corbet@lwn.net \
    --cc=danishanwar@ti.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=misael.lopez@ti.com \
    --cc=netdev@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).