Article View: linux.kernel.netdev
Article #27197Re: [PATCH net v2] net/smc: unmap the sg table when a DMA map coalesces entries
From: Dust Li
Date: Sat, 05 Dec 2026 01:13
Date: Sat, 05 Dec 2026 01:13
17 lines
9165 bytes
9165 bytes
On 2026-12-04 06:56:39, Mahanta Jambigi wrote:
>When a device coalesces the entries of a virtually contiguous buffer,
>ib_dma_map_sg() maps fewer entries than requested. smcr_buf_map_link()
>fails the link with -EAGAIN but only frees the sg table, leaving the DMA
>mapping behind.
>
>Unmap the partial mapping in smc_ib_buf_map_sg() and return 0 or an
>error, so the caller only has to free the table on failure.
>
>Fixes: b8d199451c99 ("net/smc: Allow virtually contiguous sndbufs or RMBs for SMC-R")
>Signed-off-by: Mahanta Jambigi <mjambigi@linux.ibm.com>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Best regards,
Dust
Technical Details
Message-ID:
<axNlSYZz7g_O8eo_@linux.alibaba.com>Path:
mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377775-linux-kernel-netdev=dewy.ruReferences:
<20261204055639.228261-1-mjambigi@linux.ibm.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-us-txt.newsdeef.eu!feed-us-ny.newsdeef.eu!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-377775-linux-kernel-netdev=dewy.ru
From: dust.li@linux.alibaba.com (Dust Li)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2] net/smc: unmap the sg table when a DMA map
coalesces entries
Date: Sat, 5 Dec 2026 09:13:45 +0800
Organization: Usenet Network
Message-ID: <axNlSYZz7g_O8eo_@linux.alibaba.com>
References: <20261204055639.228261-1-mjambigi@linux.ibm.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
logging-data="2922688"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:7ZCea2lhhmxNRR8e4j2YoUj6Re4= sha256:ofFLy4jzYI/hO1ncq6FUDplwl/3HfWWAV9K2pxGCCw0=
sha1:5zInlxrbXs6S3NXI75BBaGPlrbQ= sha256:SLK6X40UxsO7bHLvGyXQveBEIuHfi54pLTUCQz/vxes=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 834D2117D3A; Sat, 5 Dec 2026 04:14:12 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -10.898
X-Spam-Status: No, score=-10.898 tagged_above=-9999 required=6.31
tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
UNPARSEABLE_RELAY=0.001, USER_IN_DEF_DKIM_WL=-7.5]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
header.d=linux.alibaba.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id QiyVaNnOM5BW;
Sat, 5 Dec 2026 04:14:10 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-377775-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
by mail.dewy.ru (Postfix) with ESMTPS id E87AE117C3E; Sat, 5 Dec 2026 04:13:59 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by tor.lore.kernel.org (Postfix) with ESMTP id 9404A296E7; Sat, 5 Dec 2026 01:13:58 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1796433237;
b=D4ADkz7wvxTSZATH7WnYjNvejxYhgIVWAClWRMf0eb4qtf0eYMjD3fA0BaSLpnrMn+T9
Zz+MMbK4shNM+9NG1AIC5/kyxf9x8n3p54FZMmH9auyZbK0LGVMGk36IiTcptQ+Clif+T
E2NHk4c7whzfsIW4Zr2pJvKCWBdpetlLuoAS/1trO4r+t4J22fggNdh2gU7PPlW0TD7e7
1jbx9ezHcYmkQC8xJWTkWITp5hOi0wuiHWKBLfuRTqvKxmG8d0EYItGWIh01OY0yxKb5s
GlwkJJks5aYfJvXS4mRCrC3v9/52S8upL9kc119AhHJfWHo4HXNhoV/enfDN5+u5sTA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796433237;
h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:
X-Alimail-AntiSpam:Received:Date:From:To:Cc:Subject:Message-ID:
Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help:
List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Type:Content-Disposition:In-Reply-To;
bh=n//aIbxuR73bP8ChFElkGb/QWieobXYEpP6ei3PwUWI=;
b=MEw9G1tmPrZ+r0dkR4s5WMK+766hV4Dar+mwDmqOoM6At8+6b8J4k7ZCLXdywLXgbY2s
5hXGJ1BR/LMkEKMNRLyCVutubivpQHKlVvWNI9v38fEprsu452ovaNNjMdNob09L+8zNW
9tnGOCzuoVENiYcbkLpsPFATR16qdEoZ+4e94EvKmsIjE+O3v6ioqSuWXV/NAt4H5NSgF
BUPcetsReQVffb/XkeYGVDYEC/pda+jW9YJUqco8PVdn39V6Us5gHKx0liTdDVbqlnJFO
/ViY+gK6Lf/4A0VYQ9U1LwvZ3+leOCQscgvQwJJXJq7u6EpXWmXV4/MmpJETTl/f3BA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=m8m5bJ4G;
dmarc=pass header.from=linux.alibaba.com;
spf=pass smtp.mailfrom=linux.alibaba.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id AE1B7606A33A;
Sat, 5 Dec 2026 01:13:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=m8m5bJ4G
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=115.124.30.100
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1796433236;
b=tn4E97I9e6GPwy9+XW4V201y0/13lVsvmK3bnuvAuRhzJVdnuVP9aQJlrROr9Fj+BNvy
VWdVAiXwyn7fsmGiKTHP/tZWSr+nmYV46YvmyhswS0NK0vs9yuNUJ1LUJTe5bygbg3qxJ
iCukng1HAMnPZFF9zEB1mycBRczh7zBWXjuHKjtESFc2iDQIj7jp75kA4SdtU4dGzSE09
T7BlyoksEdekchsbxU8wVaaMJPPWGmXUYtao2sIrPypfBVnDtG+y/vtJsHa+PTsq6xfqd
r7/pE+XgpFawqaKVEGs6wZ3hkONmv1koP4FWv3i7LiiBnkJa9ShbSgajT9loOUl2ZYQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1796433236;
h=DMARC-Filter:DKIM-Signature:X-Alimail-AntiSpam:Received:Date:From:To:
Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:
Content-Disposition:In-Reply-To;
bh=n//aIbxuR73bP8ChFElkGb/QWieobXYEpP6ei3PwUWI=;
b=sCJP6kEBD/FecFHsztwicdvQd5be/7edg7nBltFThjuB39dMgyfcR/3axHziaTfASLBN
+fCvORMl+5V+pEvpdfMqqspFnQZSpUceFigLStIcVwFZR/QPuCeY69Yjktj379IWikrE6
xxgY5v440FqJL+e+XgoCmGRd84hzjzlz4tiewasvDM0/sSvTjxQVMAUGc97tfqoBMkpts
j/70S4nhwLi7o0LDNv+s4BPG2ApsndSW9WbK7WRUnWyUOEI3S8BHAnNC3C4/wJTOlOLtv
zdrXyf/ghBBrFEATFKN+okML98Amyb86DXVB9LbUC45u2NG2isI441eRZfLbrBOO5qw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=linux.alibaba.com;
spf=pass smtp.mailfrom=linux.alibaba.com;
dkim=pass header.d=linux.alibaba.com header.i=@linux.alibaba.com header.a=rsa-sha256 header.s=default header.b=m8m5bJ4G;
arc=none smtp.remote-ip=115.124.30.100
X-Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id EB08B606A322;
Sat, 5 Dec 2026 01:13:54 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EB08B606A322
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=linux.alibaba.com; s=default;
t=1796433227; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type;
bh=n//aIbxuR73bP8ChFElkGb/QWieobXYEpP6ei3PwUWI=;
b=m8m5bJ4GXVIPFccZl61iJa9Cmvv1+TssevnR2l76NCaUXxDGF/t2cN7XimypwhXTNbOHMD9iFlTJ5uDB5icFqsGXLDNOrbytxWu8v3np6hR5+nXCJqCzUNdYH0G7K3aawUsllSM0pWsCOP59NNIKJY6eLfXUkQspFo6K/Kcm/5Y=
X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R301e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037026112;MF=dust.li@linux.alibaba.com;NM=1;PH=DS;RN=17;SR=0;TI=SMTPD_---0XGIMcHM_1796433225;
X-Received: from localhost(mailfrom:dust.li@linux.alibaba.com fp:SMTPD_---0XGIMcHM_1796433225 cluster:ay36)
by smtp.aliyun-inc.com;
Sat, 05 Dec 2026 09:13:46 +0800
X-Cc: hidayath@linux.ibm.com, pasic@linux.ibm.com, horms@kernel.org,
tonylu@linux.alibaba.com, guwen@linux.alibaba.com,
netdev@vger.kernel.org, linux-s390@vger.kernel.org,
linux-rdma@vger.kernel.org, stable@vger.kernel.org
X-Reply-To: dust.li@linux.alibaba.com
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <20261204055639.228261-1-mjambigi@linux.ibm.com>