mbox series

[RESEND,net-next,v2,00/12] drivers: net: convert tasklets to use new tasklet_setup() API

Message ID 20200914073131.803374-1-allen.lkml@gmail.com
Headers show
Series drivers: net: convert tasklets to use new tasklet_setup() API | expand

Message

Allen Sept. 14, 2020, 7:31 a.m. UTC
From: Allen Pais <apais@linux.microsoft.com>

ommit 12cc923f1ccc ("tasklet: Introduce new initialization API")'
introduced a new tasklet initialization API. This series converts
all the net/* drivers to use the new tasklet_setup() API

This series is based on v5.9-rc5

Allen Pais (12):
  net: mvpp2: Prepare to use the new tasklet API
  net: arcnet: convert tasklets to use new tasklet_setup() API
  net: caif: convert tasklets to use new tasklet_setup() API
  net: ifb: convert tasklets to use new tasklet_setup() API
  net: ppp: convert tasklets to use new tasklet_setup() API
  net: cdc_ncm: convert tasklets to use new tasklet_setup() API
  net: hso: convert tasklets to use new tasklet_setup() API
  net: lan78xx: convert tasklets to use new tasklet_setup() API
  net: pegasus: convert tasklets to use new tasklet_setup() API
  net: r8152: convert tasklets to use new tasklet_setup() API
  net: rtl8150: convert tasklets to use new tasklet_setup() API
  net: usbnet: convert tasklets to use new tasklet_setup() API

 drivers/net/arcnet/arcnet.c                     |  7 +++----
 drivers/net/caif/caif_virtio.c                  |  8 +++-----
 drivers/net/ethernet/marvell/mvpp2/mvpp2.h      |  1 +
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c |  1 +
 drivers/net/ifb.c                               |  7 +++----
 drivers/net/ppp/ppp_async.c                     |  8 ++++----
 drivers/net/ppp/ppp_synctty.c                   |  8 ++++----
 drivers/net/usb/cdc_ncm.c                       |  8 ++++----
 drivers/net/usb/hso.c                           | 10 +++++-----
 drivers/net/usb/lan78xx.c                       |  6 +++---
 drivers/net/usb/pegasus.c                       |  6 +++---
 drivers/net/usb/r8152.c                         |  8 +++-----
 drivers/net/usb/rtl8150.c                       |  6 +++---
 drivers/net/usb/usbnet.c                        |  3 +--
 14 files changed, 41 insertions(+), 46 deletions(-)

Comments

Oliver Neukum Sept. 14, 2020, 8:02 a.m. UTC | #1
Am Montag, den 14.09.2020, 13:01 +0530 schrieb Allen Pais:
> From: Allen Pais <apais@linux.microsoft.com>
> 
> In preparation for unconditionally passing the
> struct tasklet_struct pointer to all tasklet
> callbacks, switch to using the new tasklet_setup()
> and from_tasklet() to pass the tasklet pointer explicitly
> and remove the .data field.

Hi,

how would bisecting be supposed to run smoothly, if this
patch were applied? We'd pass a NULL pointer.

	Regards
		Oliver
David Miller Sept. 14, 2020, 8:24 p.m. UTC | #2
From: Allen Pais <allen.lkml@gmail.com>
Date: Mon, 14 Sep 2020 13:01:19 +0530

> From: Allen Pais <apais@linux.microsoft.com>
> 
> ommit 12cc923f1ccc ("tasklet: Introduce new initialization API")'
> introduced a new tasklet initialization API. This series converts
> all the net/* drivers to use the new tasklet_setup() API
> 
> This series is based on v5.9-rc5

I don't understand how this works, you're not passing the existing
parameter any more so won't that crash until the final parts of the
conversion?

This is like a half-transformation that will break bisection.

I'm not applying this series, sorry.
Allen Pais Sept. 15, 2020, 4:08 a.m. UTC | #3
> 
>> From: Allen Pais <apais@linux.microsoft.com>
>>
>> ommit 12cc923f1ccc ("tasklet: Introduce new initialization API")'
>> introduced a new tasklet initialization API. This series converts
>> all the net/* drivers to use the new tasklet_setup() API
>>
>> This series is based on v5.9-rc5
> 
> I don't understand how this works, you're not passing the existing
> parameter any more so won't that crash until the final parts of the
> conversion?
> 
> This is like a half-transformation that will break bisection.

  I understand, I will re-work on it and send it out.


> 
> I'm not applying this series, sorry.
>
Saeed Mahameed Sept. 15, 2020, 4:41 a.m. UTC | #4
On Tue, 2020-09-15 at 09:42 +0530, Allen Pais wrote:
> > > ommit 12cc923f1ccc ("tasklet: Introduce new initialization API")'

> > > introduced a new tasklet initialization API. This series converts

> > > all the net/* drivers to use the new tasklet_setup() API

      ^^^
this is not all drivers .. 

see below 

> > > This series is based on v5.9-rc5

> > > 

> > > Allen Pais (12):

> > >    net: mvpp2: Prepare to use the new tasklet API

> > >    net: arcnet: convert tasklets to use new tasklet_setup() API

> > >    net: caif: convert tasklets to use new tasklet_setup() API

> > >    net: ifb: convert tasklets to use new tasklet_setup() API

> > >    net: ppp: convert tasklets to use new tasklet_setup() API

> > >    net: cdc_ncm: convert tasklets to use new tasklet_setup() API

> > >    net: hso: convert tasklets to use new tasklet_setup() API

> > >    net: lan78xx: convert tasklets to use new tasklet_setup() API

> > >    net: pegasus: convert tasklets to use new tasklet_setup() API

> > >    net: r8152: convert tasklets to use new tasklet_setup() API

> > >    net: rtl8150: convert tasklets to use new tasklet_setup() API

> > >    net: usbnet: convert tasklets to use new tasklet_setup() API

> > > 

> > > 

> > 

> > You are only converting drivers which are passing the taskelt

> > struct as

> > data ptr, most of other drivers are passing the container of the

> > tasklet as data, why not convert them as well, and let them use

> > container_of to find their data ? it is really straight forward and

> > will help convert most of net driver if not all.

> > 

> 

> from_tasklet uses container_of internally. use of container_of is 

> avoided cause it end being really long.


I understand that, what I meant, you didn't really convert all drivers,
as you claim in the cover letter, all you did is converting __some__
drivers which are passing the tasklet ptr as data ptr. all other
drivers that use tasklet_init differently are not converted, and it
should be relatively easy as i explained above. 

The list of drivers using tasklet_init is longer than what you touched
in your series:

 drivers/net/arcnet/arcnet.c                     |  7 +++----
 drivers/net/caif/caif_virtio.c                  |  8 +++-----
 drivers/net/ethernet/marvell/mvpp2/mvpp2.h      |  1 +
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c |  1 +
 drivers/net/ifb.c                               |  7 +++----
 drivers/net/ppp/ppp_async.c                     |  8 ++++----
 drivers/net/ppp/ppp_synctty.c                   |  8 ++++----
 drivers/net/usb/cdc_ncm.c                       |  8 ++++----
 drivers/net/usb/hso.c                           | 10 +++++-----
 drivers/net/usb/lan78xx.c                       |  6 +++---
 drivers/net/usb/pegasus.c                       |  6 +++---
 drivers/net/usb/r8152.c                         |  8 +++-----
 drivers/net/usb/rtl8150.c                       |  6 +++---
 drivers/net/usb/usbnet.c                        |  3 +--
 14 files changed, 41 insertions(+), 46 deletions(-)

The full file/driver list :

$ git grep -l tasklet_init drivers/net/ 
drivers/net/arcnet/arcnet.c
drivers/net/caif/caif_virtio.c
drivers/net/ethernet/alteon/acenic.c
drivers/net/ethernet/amd/xgbe/xgbe-drv.c
drivers/net/ethernet/amd/xgbe/xgbe-i2c.c
drivers/net/ethernet/amd/xgbe/xgbe-mdio.c
drivers/net/ethernet/broadcom/cnic.c
drivers/net/ethernet/cadence/macb_main.c
drivers/net/ethernet/cavium/liquidio/lio_main.c
drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
drivers/net/ethernet/cavium/thunder/nicvf_main.c
drivers/net/ethernet/chelsio/cxgb/sge.c
drivers/net/ethernet/chelsio/cxgb3/sge.c
drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_mqprio.c
drivers/net/ethernet/chelsio/cxgb4/sge.c
drivers/net/ethernet/dlink/sundance.c
drivers/net/ethernet/huawei/hinic/hinic_hw_eqs.c
drivers/net/ethernet/ibm/ehea/ehea_main.c
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/jme.c
drivers/net/ethernet/marvell/skge.c
drivers/net/ethernet/mellanox/mlx4/eq.c
drivers/net/ethernet/mellanox/mlx5/core/eq.c
drivers/net/ethernet/mellanox/mlx5/core/fpga/conn.c
drivers/net/ethernet/mellanox/mlxsw/pci.c
drivers/net/ethernet/micrel/ks8842.c
drivers/net/ethernet/micrel/ksz884x.c
drivers/net/ethernet/natsemi/ns83820.c
drivers/net/ethernet/netronome/nfp/nfp_net_common.c
drivers/net/ethernet/ni/nixge.c
drivers/net/ethernet/qlogic/qed/qed_int.c
drivers/net/ethernet/silan/sc92031.c
drivers/net/ethernet/smsc/smc91x.c
drivers/net/ifb.c
drivers/net/ppp/ppp_async.c
drivers/net/ppp/ppp_synctty.c
drivers/net/usb/cdc_ncm.c
drivers/net/usb/hso.c
drivers/net/usb/lan78xx.c
drivers/net/usb/pegasus.c
drivers/net/usb/r8152.c
drivers/net/usb/rtl8150.c
drivers/net/wireless/ath/ath11k/pci.c
drivers/net/wireless/mediatek/mt76/mac80211.c
drivers/net/wireless/mediatek/mt76/mt7603/init.c
drivers/net/wireless/mediatek/mt76/mt7615/mmio.c
drivers/net/wireless/mediatek/mt76/mt76x02_dfs.c
drivers/net/wireless/mediatek/mt76/mt76x02_mmio.c
drivers/net/wireless/mediatek/mt76/usb.c
drivers/net/wireless/mediatek/mt7601u/dma.c