mbox series

[net-next,0/5] Remove uses of kmap_atomic()

Message ID 20221117222557.2196195-1-anirudh.venkataramanan@intel.com (mailing list archive)
Headers show
Series Remove uses of kmap_atomic() | expand

Message

Anirudh Venkataramanan Nov. 17, 2022, 10:25 p.m. UTC
kmap_atomic() is being deprecated. This little series replaces the last
few uses of kmap_atomic() in ethernet drivers with either page_address()
or kmap_local_page().

Anirudh Venkataramanan (5):
  ch_ktls: Use kmap_local_page() instead of kmap_atomic()
  sfc: Use kmap_local_page() instead of kmap_atomic()
  cassini: Remove unnecessary use of kmap_atomic()
  cassini: Use kmap_local_page() instead of kmap_atomic()
  sunvnet: Use kmap_local_page() instead of kmap_atomic()

 .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 10 ++---
 drivers/net/ethernet/sfc/tx.c                 |  4 +-
 drivers/net/ethernet/sun/cassini.c            | 40 ++++++-------------
 drivers/net/ethernet/sun/sunvnet_common.c     |  4 +-
 4 files changed, 22 insertions(+), 36 deletions(-)


base-commit: b4b221bd79a1c698d9653e3ae2c3cb61cdc9aee7

Comments

Leon Romanovsky Nov. 22, 2022, 11:29 a.m. UTC | #1
On Thu, Nov 17, 2022 at 02:25:52PM -0800, Anirudh Venkataramanan wrote:
> kmap_atomic() is being deprecated. This little series replaces the last
> few uses of kmap_atomic() in ethernet drivers with either page_address()
> or kmap_local_page().
> 
> Anirudh Venkataramanan (5):
>   ch_ktls: Use kmap_local_page() instead of kmap_atomic()
>   sfc: Use kmap_local_page() instead of kmap_atomic()
>   cassini: Remove unnecessary use of kmap_atomic()
>   cassini: Use kmap_local_page() instead of kmap_atomic()
>   sunvnet: Use kmap_local_page() instead of kmap_atomic()
> 
>  .../chelsio/inline_crypto/ch_ktls/chcr_ktls.c | 10 ++---
>  drivers/net/ethernet/sfc/tx.c                 |  4 +-


>  drivers/net/ethernet/sun/cassini.c            | 40 ++++++-------------
>  drivers/net/ethernet/sun/sunvnet_common.c     |  4 +-

Dave, Jakub, Paolo
I wonder if these drivers can be simply deleted.

Thanks

>  4 files changed, 22 insertions(+), 36 deletions(-)
> 
> 
> base-commit: b4b221bd79a1c698d9653e3ae2c3cb61cdc9aee7
> -- 
> 2.37.2
>
Jakub Kicinski Nov. 22, 2022, 6:50 p.m. UTC | #2
On Tue, 22 Nov 2022 13:29:03 +0200 Leon Romanovsky wrote:
> >  drivers/net/ethernet/sun/cassini.c            | 40 ++++++-------------
> >  drivers/net/ethernet/sun/sunvnet_common.c     |  4 +-  
> 
> Dave, Jakub, Paolo
> I wonder if these drivers can be simply deleted.

My thought as well. It's just a matter of digging thru the history,
platform code and the web to find potential users and contacting them.
Anirudh Venkataramanan Nov. 22, 2022, 9:06 p.m. UTC | #3
On 11/22/2022 10:50 AM, Jakub Kicinski wrote:
> On Tue, 22 Nov 2022 13:29:03 +0200 Leon Romanovsky wrote:
>>>   drivers/net/ethernet/sun/cassini.c            | 40 ++++++-------------
>>>   drivers/net/ethernet/sun/sunvnet_common.c     |  4 +-
>>
>> Dave, Jakub, Paolo
>> I wonder if these drivers can be simply deleted.
> 
> My thought as well. It's just a matter of digging thru the history,
> platform code and the web to find potential users and contacting them.

I did a little bit of digging on these two files. Here's what I found.

For the cassini driver, I don't see any recent patches that fix an end 
user visible issue. There are clean ups, updates to use newer kernel 
APIs, and some build/memory leak fixes. I checked as far back as 2011. 
There are web references to some issues in kernel v2.6. I didn't see 
anything more recent.

The code in sunvnet_common.c seems to be common code that's used by

[1] "Sun4v LDOM Virtual Switch Driver" (ldmvsw.c, kconfig flag 
CONFIG_LDMVSW)

[2] "Sun LDOM virtual network driver" (sunvnet.c, kconfig flag 
CONFIG_SUNVNET).

These two seem to have had some feature updates around 2017, but 
otherwise the situation is the same as cassini.

Ani
Leon Romanovsky Nov. 23, 2022, 7:34 a.m. UTC | #4
On Tue, Nov 22, 2022 at 01:06:09PM -0800, Anirudh Venkataramanan wrote:
> On 11/22/2022 10:50 AM, Jakub Kicinski wrote:
> > On Tue, 22 Nov 2022 13:29:03 +0200 Leon Romanovsky wrote:
> > > >   drivers/net/ethernet/sun/cassini.c            | 40 ++++++-------------
> > > >   drivers/net/ethernet/sun/sunvnet_common.c     |  4 +-
> > > 
> > > Dave, Jakub, Paolo
> > > I wonder if these drivers can be simply deleted.
> > 
> > My thought as well. It's just a matter of digging thru the history,
> > platform code and the web to find potential users and contacting them.
> 
> I did a little bit of digging on these two files. Here's what I found.
> 
> For the cassini driver, I don't see any recent patches that fix an end user
> visible issue. There are clean ups, updates to use newer kernel APIs, and
> some build/memory leak fixes. I checked as far back as 2011. There are web
> references to some issues in kernel v2.6. I didn't see anything more recent.
> 
> The code in sunvnet_common.c seems to be common code that's used by
> 
> [1] "Sun4v LDOM Virtual Switch Driver" (ldmvsw.c, kconfig flag
> CONFIG_LDMVSW)
> 
> [2] "Sun LDOM virtual network driver" (sunvnet.c, kconfig flag
> CONFIG_SUNVNET).
> 
> These two seem to have had some feature updates around 2017, but otherwise
> the situation is the same as cassini.

If there is a pole to delete them, I vote for deletion. :)

Thanks

> 
> Ani
Anirudh Venkataramanan Nov. 23, 2022, 6:38 p.m. UTC | #5
On 11/22/2022 11:34 PM, Leon Romanovsky wrote:
> On Tue, Nov 22, 2022 at 01:06:09PM -0800, Anirudh Venkataramanan wrote:
>> On 11/22/2022 10:50 AM, Jakub Kicinski wrote:
>>> On Tue, 22 Nov 2022 13:29:03 +0200 Leon Romanovsky wrote:
>>>>>    drivers/net/ethernet/sun/cassini.c            | 40 ++++++-------------
>>>>>    drivers/net/ethernet/sun/sunvnet_common.c     |  4 +-
>>>>
>>>> Dave, Jakub, Paolo
>>>> I wonder if these drivers can be simply deleted.
>>>
>>> My thought as well. It's just a matter of digging thru the history,
>>> platform code and the web to find potential users and contacting them.
>>
>> I did a little bit of digging on these two files. Here's what I found.
>>
>> For the cassini driver, I don't see any recent patches that fix an end user
>> visible issue. There are clean ups, updates to use newer kernel APIs, and
>> some build/memory leak fixes. I checked as far back as 2011. There are web
>> references to some issues in kernel v2.6. I didn't see anything more recent.
>>
>> The code in sunvnet_common.c seems to be common code that's used by
>>
>> [1] "Sun4v LDOM Virtual Switch Driver" (ldmvsw.c, kconfig flag
>> CONFIG_LDMVSW)
>>
>> [2] "Sun LDOM virtual network driver" (sunvnet.c, kconfig flag
>> CONFIG_SUNVNET).
>>
>> These two seem to have had some feature updates around 2017, but otherwise
>> the situation is the same as cassini.
> 
> If there is a pole to delete them, I vote for deletion. :)

Perhaps I should put out a patchset that does this. That would give 
users or anyone who cares another opportunity to chime in. If we hear 
nothing, then we're good.

I am thinking I'll still include the conversions for cassini.c and 
sunvnet_common.c in my v2 series. In case we don't end up deleting these 
drivers for some reason, they'd at least not be using kmap_atomic() anymore.

Ani