netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandra Winter <wintera@linux.ibm.com>
To: Paolo Abeni <pabeni@redhat.com>,
	"D. Wythe" <alibuda@linux.alibaba.com>,
	Dust Li <dust.li@linux.alibaba.com>,
	Sidraya Jayagond <sidraya@linux.ibm.com>,
	Wenjia Zhang <wenjia@linux.ibm.com>,
	David Miller <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>
Cc: Julian Ruess <julianr@linux.ibm.com>,
	Aswin Karuvally <aswin@linux.ibm.com>,
	Halil Pasic <pasic@linux.ibm.com>,
	Mahanta Jambigi <mjambigi@linux.ibm.com>,
	Tony Lu <tonylu@linux.alibaba.com>,
	Wen Gu <guwen@linux.alibaba.com>,
	linux-rdma@vger.kernel.org, netdev@vger.kernel.org,
	linux-s390@vger.kernel.org, Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Simon Horman <horms@kernel.org>,
	Eric Biggers <ebiggers@kernel.org>,
	Ard Biesheuvel <ardb@kernel.org>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Harald Freudenberger <freude@linux.ibm.com>,
	Konstantin Shkolnyy <kshk@linux.ibm.com>
Subject: Re: [PATCH net-next v2 13/14] dibs: Move data path to dibs layer
Date: Tue, 16 Sep 2025 11:18:37 +0200	[thread overview]
Message-ID: <8aa79524-91ec-4000-b262-7e61e486fb9e@linux.ibm.com> (raw)
In-Reply-To: <e50be1a2-4e9f-44b4-b524-706be01c97e5@redhat.com>



On 16.09.25 10:19, Paolo Abeni wrote:
> On 9/11/25 9:48 PM, Alexandra Winter wrote:
>> +static void __dibs_lo_unregister_dmb(struct dibs_lo_dev *ldev,
>> +				     struct dibs_lo_dmb_node *dmb_node)
>> +{
>> +	/* remove dmb from hash table */
>> +	write_lock_bh(&ldev->dmb_ht_lock);
>> +	hash_del(&dmb_node->list);
>> +	write_unlock_bh(&ldev->dmb_ht_lock);
>> +
>> +	clear_bit(dmb_node->sba_idx, ldev->sba_idx_mask);
>> +	kvfree(dmb_node->cpu_addr);
>> +	kfree(dmb_node);
> 
> I see the above comes directly from existing code, but it's not clear to
> me where (and if) dmb_node->cpu_addr is vmalloc()ed (as opposed to
> kmalloc()ed).
> 
> Could you consider switching to kfree() (if possible/applicable) and/or
> add a describing comment if not?
> 
> Thanks,
> 
> Paolo
> 


Yes, that makes sense to me, thank you very much.
I'll do

- kvfree(dmb_node->cpu_addr);
+ kfree(dmb_node->cpu_addr);

in v3.

  reply	other threads:[~2025-09-16  9:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11 19:48 [PATCH net-next v2 00/14] dibs - Direct Internal Buffer Sharing Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 01/14] net/smc: Remove error handling of unregister_dmb() Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 02/14] net/smc: Decouple sf and attached send_buf in smc_loopback Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 03/14] dibs: Create drivers/dibs Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 04/14] dibs: Register smc as dibs_client Alexandra Winter
2025-09-16  7:40   ` Paolo Abeni
2025-09-16  8:37     ` Alexandra Winter
2025-09-23  9:09       ` Paolo Abeni
2025-09-11 19:48 ` [PATCH net-next v2 05/14] dibs: Register ism as dibs device Alexandra Winter
2025-09-16  7:48   ` Paolo Abeni
2025-09-11 19:48 ` [PATCH net-next v2 06/14] dibs: Define dibs loopback Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 07/14] dibs: Define dibs_client_ops and dibs_dev_ops Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 08/14] dibs: Move struct device to dibs_dev Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 09/14] dibs: Create class dibs Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 10/14] dibs: Local gid for dibs devices Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 11/14] dibs: Move vlan support to dibs_dev_ops Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 12/14] dibs: Move query_remote_gid() " Alexandra Winter
2025-09-11 19:48 ` [PATCH net-next v2 13/14] dibs: Move data path to dibs layer Alexandra Winter
2025-09-16  8:19   ` Paolo Abeni
2025-09-16  9:18     ` Alexandra Winter [this message]
2025-09-11 19:48 ` [PATCH net-next v2 14/14] dibs: Move event handling " Alexandra Winter

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=8aa79524-91ec-4000-b262-7e61e486fb9e@linux.ibm.com \
    --to=wintera@linux.ibm.com \
    --cc=agordeev@linux.ibm.com \
    --cc=alibuda@linux.alibaba.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ardb@kernel.org \
    --cc=aswin@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=davem@davemloft.net \
    --cc=dust.li@linux.alibaba.com \
    --cc=ebiggers@kernel.org \
    --cc=edumazet@google.com \
    --cc=freude@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=guwen@linux.alibaba.com \
    --cc=hca@linux.ibm.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=horms@kernel.org \
    --cc=julianr@linux.ibm.com \
    --cc=kshk@linux.ibm.com \
    --cc=kuba@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mjambigi@linux.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pasic@linux.ibm.com \
    --cc=sidraya@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=tonylu@linux.alibaba.com \
    --cc=wenjia@linux.ibm.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).