From: Markus Schneider-Pargmann <msp@baylibre.com>
To: Simon Horman <simon.horman@corigine.com>
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Chandrasekar Ramakrishnan <rcsekar@samsung.com>,
Wolfgang Grandegger <wg@grandegger.com>,
Vincent MAILHOL <mailhol.vincent@wanadoo.fr>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-can@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, Julien Panis <jpanis@baylibre.com>
Subject: Re: [PATCH v4 01/12] can: m_can: Write transmit header and data in one transaction
Date: Thu, 22 Jun 2023 10:56:57 +0200 [thread overview]
Message-ID: <20230622085657.agfk5jee3azdwqur@blmsp> (raw)
In-Reply-To: <ZJMG2ovqLXjMjgZg@corigine.com>
Hi Simon,
On Wed, Jun 21, 2023 at 04:19:06PM +0200, Simon Horman wrote:
> On Wed, Jun 21, 2023 at 11:23:39AM +0200, Markus Schneider-Pargmann wrote:
> > Combine header and data before writing to the transmit fifo to reduce
> > the overhead for peripheral chips.
> >
> > Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
> > ---
> > drivers/net/can/m_can/m_can.c | 34 +++++++++++++++++++++-------------
> > 1 file changed, 21 insertions(+), 13 deletions(-)
> >
> > diff --git a/drivers/net/can/m_can/m_can.c b/drivers/net/can/m_can/m_can.c
> > index a5003435802b..5251073987ee 100644
> > --- a/drivers/net/can/m_can/m_can.c
> > +++ b/drivers/net/can/m_can/m_can.c
> > @@ -317,6 +317,12 @@ struct id_and_dlc {
> > u32 dlc;
> > };
> >
> > +struct m_can_fifo_element {
> > + u32 id;
> > + u32 dlc;
> > + u8 data[CANFD_MAX_DLEN];
> > +};
> > +
> > static inline u32 m_can_read(struct m_can_classdev *cdev, enum m_can_reg reg)
> > {
> > return cdev->ops->read_reg(cdev, reg);
> > @@ -1622,6 +1628,8 @@ static int m_can_next_echo_skb_occupied(struct net_device *dev, int putidx)
> > static netdev_tx_t m_can_tx_handler(struct m_can_classdev *cdev)
> > {
> > struct canfd_frame *cf = (struct canfd_frame *)cdev->tx_skb->data;
> > + u8 len_padded = DIV_ROUND_UP(cf->len, 4);
> > + struct m_can_fifo_element fifo_element;
> > struct net_device *dev = cdev->net;
> > struct sk_buff *skb = cdev->tx_skb;
> > struct id_and_dlc fifo_header;
>
> Hi Markus,
>
> GCC 12.3.0 complains that fifo_header is not (no longer) used.
>
> drivers/net/can/m_can/m_can.c:1635:20: warning: unused variable 'fifo_header' [-Wunused-variable]
> struct id_and_dlc fifo_header;
Yes, I moved everything to fifo_element on purpose and then forgot to
remove fifo_header. Removing it now.
Thanks,
Markus
>
> --
> pw-bot: changes-requested
>
next prev parent reply other threads:[~2023-06-22 9:03 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 9:23 [PATCH v4 00/12] can: m_can: Optimizations for m_can/tcan part 2 Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 01/12] can: m_can: Write transmit header and data in one transaction Markus Schneider-Pargmann
2023-06-21 14:19 ` Simon Horman
2023-06-22 8:56 ` Markus Schneider-Pargmann [this message]
2023-06-21 17:49 ` kernel test robot
2023-06-21 9:23 ` [PATCH v4 02/12] can: m_can: Implement receive coalescing Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 03/12] can: m_can: Implement transmit coalescing Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 04/12] can: m_can: Add rx coalescing ethtool support Markus Schneider-Pargmann
2023-06-21 14:22 ` Simon Horman
2023-06-22 9:02 ` Markus Schneider-Pargmann
2023-06-21 18:00 ` kernel test robot
2023-06-21 9:23 ` [PATCH v4 05/12] can: m_can: Add tx " Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 06/12] can: m_can: Use u32 for putidx Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 07/12] can: m_can: Cache tx putidx Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 08/12] can: m_can: Use the workqueue as queue Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 09/12] can: m_can: Introduce a tx_fifo_in_flight counter Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 10/12] can: m_can: Use tx_fifo_in_flight for netif_queue control Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 11/12] can: m_can: Implement BQL Markus Schneider-Pargmann
2023-06-21 9:23 ` [PATCH v4 12/12] can: m_can: Implement transmit submission coalescing Markus Schneider-Pargmann
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=20230622085657.agfk5jee3azdwqur@blmsp \
--to=msp@baylibre.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jpanis@baylibre.com \
--cc=kuba@kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mailhol.vincent@wanadoo.fr \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rcsekar@samsung.com \
--cc=simon.horman@corigine.com \
--cc=wg@grandegger.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