All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] can: c_can: cache frames to operate as a true FIFO
@ 2021-05-09 12:43 Dario Binacchi
  2021-05-09 12:43 ` [PATCH 1/3] can: c_can: remove the rxmasked unused variable Dario Binacchi
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Dario Binacchi @ 2021-05-09 12:43 UTC (permalink / raw)
  To: linux-kernel
  Cc: Dario Binacchi, David S. Miller, Gianluca Falavigna,
	Jakub Kicinski, Marc Kleine-Budde, Oliver Hartkopp, Tong Zhang,
	Vincent Mailhol, Wolfgang Grandegger, YueHaibing, Zhang Qilong,
	linux-can, netdev


Performance tests of the c_can driver led to the patch that gives the
series its name. We have also added a patch for ethtool support and a
patch to remove a variable that is no longer used.


Dario Binacchi (3):
  can: c_can: remove the rxmasked unused variable
  can: c_can: add ethtool support
  can: c_can: cache frames to operate as a true FIFO

 drivers/net/can/c_can/Makefile                |  3 +
 drivers/net/can/c_can/c_can.h                 |  6 +-
 drivers/net/can/c_can/c_can_ethtool.c         | 46 +++++++++++++
 .../net/can/c_can/{c_can.c => c_can_main.c}   | 65 +++++++++++++++----
 4 files changed, 107 insertions(+), 13 deletions(-)
 create mode 100644 drivers/net/can/c_can/c_can_ethtool.c
 rename drivers/net/can/c_can/{c_can.c => c_can_main.c} (95%)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH 0/3] can: c_can: cache frames to operate as a true FIFO
@ 2021-06-06 20:17 Dario Binacchi
  2021-06-06 20:17 ` [PATCH 3/3] " Dario Binacchi
  0 siblings, 1 reply; 11+ messages in thread
From: Dario Binacchi @ 2021-06-06 20:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: Gianluca Falavigna, Dario Binacchi, David S. Miller,
	Jakub Kicinski, Marc Kleine-Budde, Oliver Hartkopp, Tong Zhang,
	Vincent Mailhol, Wolfgang Grandegger, YueHaibing, Zhang Qilong,
	linux-can, netdev


Performance tests of the c_can driver led to the patch that gives the
series its name.


Dario Binacchi (3):
  can: c_can: exit c_can_do_tx() early if no frames have been sent
  can: c_can: support tx ring algorithm
  can: c_can: cache frames to operate as a true FIFO

 drivers/net/can/c_can/c_can.c | 100 ++++++++++++++++++++++++++--------
 drivers/net/can/c_can/c_can.h |  25 ++++++++-
 2 files changed, 101 insertions(+), 24 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: [PATCH 3/3] can: c_can: cache frames to operate as a true FIFO
@ 2021-06-07  9:53 kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-06-07  9:53 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 6005 bytes --]

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210606201705.31307-4-dariobin@libero.it>
References: <20210606201705.31307-4-dariobin@libero.it>
TO: Dario Binacchi <dariobin@libero.it>
TO: linux-kernel(a)vger.kernel.org
CC: Gianluca Falavigna <gianluca.falavigna@inwind.it>
CC: Dario Binacchi <dariobin@libero.it>
CC: Jakub Kicinski <kuba@kernel.org>
CC: "Marc Kleine-Budde" <mkl@pengutronix.de>
CC: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Tong Zhang <ztong0001@gmail.com>
CC: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
CC: Wolfgang Grandegger <wg@grandegger.com>
CC: YueHaibing <yuehaibing@huawei.com>

Hi Dario,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkl-can-next/testing]
[also build test WARNING on linux/master net/master linus/master v5.13-rc5]
[cannot apply to net-next/master sparc-next/master next-20210604]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Dario-Binacchi/can-c_can-cache-frames-to-operate-as-a-true-FIFO/20210607-042041
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git testing
:::::: branch date: 14 hours ago
:::::: commit date: 14 hours ago
config: h8300-randconfig-s031-20210607 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # apt-get install sparse
        # sparse version: v0.6.3-341-g8af24329-dirty
        # https://github.com/0day-ci/linux/commit/19123a06211906a51c0647c1a427b6549635172f
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Dario-Binacchi/can-c_can-cache-frames-to-operate-as-a-true-FIFO/20210607-042041
        git checkout 19123a06211906a51c0647c1a427b6549635172f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=h8300 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/net/can/c_can/c_can.c:491:9: sparse: sparse: context imbalance in 'c_can_start_xmit' - different lock contexts for basic block

vim +/c_can_start_xmit +491 drivers/net/can/c_can/c_can.c

5098c41911740f Dario Binacchi    2021-06-06  452  
881ff67ad45041 Bhupesh Sharma    2011-02-13  453  static netdev_tx_t c_can_start_xmit(struct sk_buff *skb,
881ff67ad45041 Bhupesh Sharma    2011-02-13  454  				    struct net_device *dev)
881ff67ad45041 Bhupesh Sharma    2011-02-13  455  {
881ff67ad45041 Bhupesh Sharma    2011-02-13  456  	struct can_frame *frame = (struct can_frame *)skb->data;
35bdafb576c5c0 Thomas Gleixner   2014-04-11  457  	struct c_can_priv *priv = netdev_priv(dev);
5098c41911740f Dario Binacchi    2021-06-06  458  	struct c_can_tx_ring *tx_ring = &priv->tx;
19123a06211906 Dario Binacchi    2021-06-06  459  	u32 idx, obj, cmd = IF_COMM_TX;
881ff67ad45041 Bhupesh Sharma    2011-02-13  460  
881ff67ad45041 Bhupesh Sharma    2011-02-13  461  	if (can_dropped_invalid_skb(dev, skb))
881ff67ad45041 Bhupesh Sharma    2011-02-13  462  		return NETDEV_TX_OK;
35bdafb576c5c0 Thomas Gleixner   2014-04-11  463  
5098c41911740f Dario Binacchi    2021-06-06  464  	if (c_can_tx_busy(priv, tx_ring))
5098c41911740f Dario Binacchi    2021-06-06  465  		return NETDEV_TX_BUSY;
5098c41911740f Dario Binacchi    2021-06-06  466  
5098c41911740f Dario Binacchi    2021-06-06  467  	idx = c_can_get_tx_head(tx_ring);
5098c41911740f Dario Binacchi    2021-06-06  468  	tx_ring->head++;
5098c41911740f Dario Binacchi    2021-06-06  469  	if (c_can_get_tx_free(tx_ring) == 0)
881ff67ad45041 Bhupesh Sharma    2011-02-13  470  		netif_stop_queue(dev);
5098c41911740f Dario Binacchi    2021-06-06  471  
19123a06211906 Dario Binacchi    2021-06-06  472  	spin_lock_bh(&priv->tx_lock);
19123a06211906 Dario Binacchi    2021-06-06  473  	if (idx < c_can_get_tx_tail(tx_ring))
19123a06211906 Dario Binacchi    2021-06-06  474  		cmd &= ~IF_COMM_TXRQST; /* Cache the message */
19123a06211906 Dario Binacchi    2021-06-06  475  	else
19123a06211906 Dario Binacchi    2021-06-06  476  		spin_unlock_bh(&priv->tx_lock);
5098c41911740f Dario Binacchi    2021-06-06  477  
172f6d3a031b5e Marc Kleine-Budde 2021-03-04  478  	/* Store the message in the interface so we can call
35bdafb576c5c0 Thomas Gleixner   2014-04-11  479  	 * can_put_echo_skb(). We must do this before we enable
35bdafb576c5c0 Thomas Gleixner   2014-04-11  480  	 * transmit as we might race against do_tx().
35bdafb576c5c0 Thomas Gleixner   2014-04-11  481  	 */
939415973fdfb2 Thomas Gleixner   2014-04-11  482  	c_can_setup_tx_object(dev, IF_TX, frame, idx);
c7b74967799b1a Oliver Hartkopp   2020-11-20  483  	priv->dlc[idx] = frame->len;
1dcb6e57db8334 Vincent Mailhol   2021-01-11  484  	can_put_echo_skb(skb, dev, idx, 0);
19123a06211906 Dario Binacchi    2021-06-06  485  	obj = idx + priv->msg_obj_tx_first;
19123a06211906 Dario Binacchi    2021-06-06  486  	c_can_object_put(dev, IF_TX, obj, cmd);
35bdafb576c5c0 Thomas Gleixner   2014-04-11  487  
19123a06211906 Dario Binacchi    2021-06-06  488  	if (spin_is_locked(&priv->tx_lock))
19123a06211906 Dario Binacchi    2021-06-06  489  		spin_unlock_bh(&priv->tx_lock);
881ff67ad45041 Bhupesh Sharma    2011-02-13  490  
881ff67ad45041 Bhupesh Sharma    2011-02-13 @491  	return NETDEV_TX_OK;
881ff67ad45041 Bhupesh Sharma    2011-02-13  492  }
881ff67ad45041 Bhupesh Sharma    2011-02-13  493  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35002 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-06-07  9:53 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-09 12:43 [PATCH 0/3] can: c_can: cache frames to operate as a true FIFO Dario Binacchi
2021-05-09 12:43 ` [PATCH 1/3] can: c_can: remove the rxmasked unused variable Dario Binacchi
2021-05-10 13:29   ` Marc Kleine-Budde
2021-05-09 12:43 ` [PATCH 2/3] can: c_can: add ethtool support Dario Binacchi
2021-05-10 13:28   ` Marc Kleine-Budde
2021-05-09 12:43 ` [PATCH 3/3] can: c_can: cache frames to operate as a true FIFO Dario Binacchi
2021-05-10 12:25   ` Marc Kleine-Budde
2021-05-10 12:36     ` Marc Kleine-Budde
2021-05-13 11:23       ` Dario Binacchi
2021-06-06 20:17 [PATCH 0/3] " Dario Binacchi
2021-06-06 20:17 ` [PATCH 3/3] " Dario Binacchi
2021-06-07  9:53 kernel test robot

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.