lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <707590a7-9b3c-4940-86a0-95f70dbe7c9d@linux.ibm.com>
Date: Mon, 20 Jan 2025 10:31:58 +0100
From: Alexandra Winter <wintera@...ux.ibm.com>
To: dust.li@...ux.alibaba.com, Wenjia Zhang <wenjia@...ux.ibm.com>,
        Jan Karcher <jaka@...ux.ibm.com>, Gerd Bayer <gbayer@...ux.ibm.com>,
        Halil Pasic <pasic@...ux.ibm.com>,
        "D. Wythe" <alibuda@...ux.alibaba.com>,
        Tony Lu <tonylu@...ux.alibaba.com>, Wen Gu <guwen@...ux.alibaba.com>,
        Peter Oberparleiter <oberpar@...ux.ibm.com>,
        David Miller <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
        Andrew Lunn <andrew+netdev@...n.ch>
Cc: Julian Ruess <julianr@...ux.ibm.com>,
        Niklas Schnelle <schnelle@...ux.ibm.com>,
        Thorsten Winkler <twinkler@...ux.ibm.com>, netdev@...r.kernel.org,
        linux-s390@...r.kernel.org, Heiko Carstens <hca@...ux.ibm.com>,
        Vasily Gorbik <gor@...ux.ibm.com>,
        Alexander Gordeev
 <agordeev@...ux.ibm.com>,
        Christian Borntraeger <borntraeger@...ux.ibm.com>,
        Sven Schnelle <svens@...ux.ibm.com>, Simon Horman <horms@...nel.org>
Subject: Re: [RFC net-next 5/7] net/ism: Move ism_loopback to net/ism



On 20.01.25 04:55, Dust Li wrote:
>> +static int ism_lo_move_data(struct ism_dev *ism, u64 dmb_tok,
>> +			    unsigned int idx, bool sf, unsigned int offset,
>> +			    void *data, unsigned int size)
>> +{
>> +	struct ism_lo_dmb_node *rmb_node = NULL, *tmp_node;
>> +	struct ism_lo_dev *ldev;
>> +	u16 s_mask;
>> +	u8 client_id;
>> +	u32 sba_idx;
>> +
>> +	ldev = container_of(ism, struct ism_lo_dev, ism);
>> +
>> +	if (!sf)
>> +		/* since sndbuf is merged with peer DMB, there is
>> +		 * no need to copy data from sndbuf to peer DMB.
>> +		 */
>> +		return 0;
>> +
>> +	read_lock_bh(&ldev->dmb_ht_lock);
>> +	hash_for_each_possible(ldev->dmb_ht, tmp_node, list, dmb_tok) {
>> +		if (tmp_node->token == dmb_tok) {
>> +			rmb_node = tmp_node;
>> +			break;
>> +		}
>> +	}
>> +	if (!rmb_node) {
>> +		read_unlock_bh(&ldev->dmb_ht_lock);
>> +		return -EINVAL;
>> +	}
>> +	// So why copy the data now?? SMC usecase? Data buffer is attached,
>> +	// rw-pointer are not attached?
> I understand the confusion here. I have the same confusion the first time
> I saw this.
> 
> This is actually the tricky part: it assumes the CDC will signal, while
> the data will not. We need to copy the CDC, so the copy here only to the
> CDC.
> 
> I think we should refine the move_data() API to make this clearer.
> 
> Best regards,
> Dust

I agree. Will be refined in next version.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ