Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp127457lqb; Tue, 4 Jun 2024 07:05:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0e/rmmcUS/xS+izDgkQPqlnMbbBD1iWBF6A1aIJU61yEArNiO/Za1dz4r+1e0sYNeBoRU5m//7+GhPNgrWbU5rqjHk1OE7XmRDgw6OA== X-Google-Smtp-Source: AGHT+IFFb7HfLV/R8Ims8TI4qwwd3zeLT8Slrl/q71diRoSwaeHdgwJ9WWXuBJbURldNpchea0mk X-Received: by 2002:a05:6870:3516:b0:24f:e427:f684 with SMTP id 586e51a60fabf-2508bcf8616mr13914852fac.8.1717509917626; Tue, 04 Jun 2024 07:05:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717509917; cv=pass; d=google.com; s=arc-20160816; b=pZSC2HoWKt5edHbaXqvVwwOfGAbq5UW7ItfM4UvIdfkrTBiPVVzX8ELlqSLpoWeyrg Qjgk9m/eTR2zis1FgRB78eu/W1Kn47CBfdx5GyMUFntepgsri8qrt32i6AYKmIVQdmUC PRtIfKRyCbd6i7z6qG6Hz5Qm4bAu+hJPjWidGpA6k+vuL3BSvk7ZCYirhSH09RMig9Dp /B/SqwLdCy50cf0ATTi9SMW4DVSGFD+OwPFxkEqEbH4QcXbo9Pvcbjdcy0tsUbSXe3n+ TKYIne0MF4I613dTwacsH0yHzTMNblKHZVwziHqGdiKg4vGpx5teNRloNiAmxlXh40I6 Y9yw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:autocrypt:references :in-reply-to:date:cc:to:from:subject:message-id:dkim-signature; bh=1S8mGHYMiZ8q0CuVhz5+KV5LmOzGz37Z9f92ilpXG48=; fh=GEYCKhdMtKgIf+5643KHmKI9e0Bwo6ZpSskdzi8WHlw=; b=y1QnANTyCnhjw/pgAm/FLiXF/WhWKnXL4JWoHV/u5dpRD6PxjxTlvW6qnvWkN3btV9 GB2AYiCmcI+8TbWHOXN6w0I+q8d+2fgoCwhjBRQjKVx1LaBgmVv3QwfRCak2D8RFnpd9 CwBbeg/uvJNw0pPs2kSIBmVqeheS4n5OCIG5KNrLD+WuyN69GOzSz7HGoFROl7J02Y/c Av1drD+60gRKBT1IUR796/JnDAaekazUqBtpdUeovBeJAlda8X+6MWMuTh+F1SW2ExpG kZgkY6S4wnH8B0xY/mHmYrCcndkwIIjjhW5GRRcm/sj7neUs0eJhFk3L4qNSvrw0mh9H TDcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hcBR93It; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-200776-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200776-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a1e0cc1a2514c-80adee932e1si1470750241.176.2024.06.04.07.05.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 07:05:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-200776-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hcBR93It; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-200776-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-200776-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 456721C21564 for ; Tue, 4 Jun 2024 14:05:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 22787171C9; Tue, 4 Jun 2024 14:05:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hcBR93It" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A18EF171B0 for ; Tue, 4 Jun 2024 14:05:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717509911; cv=none; b=m6A37gVq87s8g0oWEijvrfsBlZyXQIKW9vCHvb+w5BQFy7DrBiznKH7Nlc1fq7xL7VJMEvHybmNUIK2Ld44BmcQpuS1nRB4ZZocUupF8zX1IP6I0bCWU2g6g2CV+pwUfY4AJkdkjpu3xxHxJWEE1kFlnEJvn8ds8v532TscShG4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717509911; c=relaxed/simple; bh=1S8mGHYMiZ8q0CuVhz5+KV5LmOzGz37Z9f92ilpXG48=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=gGtSTZ0GEsoi9Mneb7CnJagXwUVUVol92+cQGzFEtjOMa4KdR2ypdb30eukYITf1wO23Pt/AgqPuLt51/qiL5+mMJPqQmlkEreW1HgOv1YjTkOOoZzVxc/tSHNSTrv8B0yxtN2of1UpiuXCtPn6k/6qrG92sjpQeLgNewSl3EnA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hcBR93It; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717509908; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=1S8mGHYMiZ8q0CuVhz5+KV5LmOzGz37Z9f92ilpXG48=; b=hcBR93ItmIdTxFJZbOkqkx7a914yOh6Xvmh+TRDYduKL6/j+/4D3/YBL26zrmOo1hKyGWA 93sFOsFmVPmvltEYCYOQxFIOcJz1T6GrOen/fi7oU5qvis05Ly2dbv1sfBXOk1KRbUQahi 8BLuS3Zmy+nRRzYHRIkfIvl23xWCgdo= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-223-IemjEhEQMSawAM_dWsR0mA-1; Tue, 04 Jun 2024 10:05:04 -0400 X-MC-Unique: IemjEhEQMSawAM_dWsR0mA-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2ea91c7c801so5057661fa.2 for ; Tue, 04 Jun 2024 07:05:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717509902; x=1718114702; h=mime-version:user-agent:content-transfer-encoding:autocrypt :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1S8mGHYMiZ8q0CuVhz5+KV5LmOzGz37Z9f92ilpXG48=; b=ex9bVipRDWsucG2dSTSCeVQkR6sMb8am4Hq2AQ3YgiImAaOeQuINeJYC+eA4e9vzC4 cZhiSO9MBpweWS4O8ZVAqpakQi5iBFsQWyXlHnFl1aPh09KPgHmv9A9hSLQ9xA/C6RpY bU1Y7Pr0XZLMz6YzzC9zFBr5rmc9uTl2n+dRIld/Meb5WSZn8bbU6m7GlN8jTKJFpWUC AzDb3StiLfqimvfBpV1tg2F6USht+T1/s8el8tnRuE26noLDeTsQ7QOkDm6lC5v/Mwcj NIAmRBpZATW67eFAMNzYgWeP/kzudPWAtRVCa7LhYD7AXSLtDCLLDSGwi4M4kVloAcGv 6bPw== X-Forwarded-Encrypted: i=1; AJvYcCV4DEuFXWz9Ywf7sq+R+9EBnuSwHfaS2a+NjeEIxdt1ArY6IF+8Nd3Sax+yA8dNGRTd+ny+qE0JbLbZwnAtKuvXqPd9I7Wqiy2xqUyw X-Gm-Message-State: AOJu0YwyAIQUhTulZW++Fy33NpekTrR0c5UUdhh/+h59fVL+Ru+hAmK/ HFBa+dG/4JLX06WtHxfxG/L3NgVJhi65N2uZTQG/gnmgPc4Roz8glbkqBOavcCl/yVm9ph05SQD I6plELsxx6H8reaKboPzfSbDSG/knpEgmWyXQdORUW10opuyivKudZYZWBXVGFQ== X-Received: by 2002:ac2:4313:0:b0:516:c241:a912 with SMTP id 2adb3069b0e04-52b895545a7mr6713766e87.1.1717509902489; Tue, 04 Jun 2024 07:05:02 -0700 (PDT) X-Received: by 2002:ac2:4313:0:b0:516:c241:a912 with SMTP id 2adb3069b0e04-52b895545a7mr6713743e87.1.1717509902044; Tue, 04 Jun 2024 07:05:02 -0700 (PDT) Received: from gerbillo.redhat.com ([2a0d:3344:1b74:3a10::f71]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-35dd04d9c68sm11571443f8f.56.2024.06.04.07.05.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 07:05:01 -0700 (PDT) Message-ID: Subject: Re: [PATCH net] net/smc: avoid overwriting when adjusting sock bufsizes From: Paolo Abeni To: Wen Gu , gbayer@linux.ibm.com, wenjia@linux.ibm.com, jaka@linux.ibm.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org Cc: alibuda@linux.alibaba.com, tonylu@linux.alibaba.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Tue, 04 Jun 2024 16:04:59 +0200 In-Reply-To: <20240531085417.43104-1-guwen@linux.alibaba.com> References: <20240531085417.43104-1-guwen@linux.alibaba.com> Autocrypt: addr=pabeni@redhat.com; prefer-encrypt=mutual; keydata=mQINBGISiDUBEAC5uMdJicjm3ZlWQJG4u2EU1EhWUSx8IZLUTmEE8zmjPJFSYDcjtfGcbzLPb63BvX7FADmTOkO7gwtDgm501XnQaZgBUnCOUT8qv5MkKsFH20h1XJyqjPeGM55YFAXc+a4WD0YyO5M0+KhDeRLoildeRna1ey944VlZ6Inf67zMYw9vfE5XozBtytFIrRyGEWkQwkjaYhr1cGM8ia24QQVQid3P7SPkR78kJmrT32sGk+TdR4YnZzBvVaojX4AroZrrAQVdOLQWR+w4w1mONfJvahNdjq73tKv51nIpu4SAC1Zmnm3x4u9r22mbMDr0uWqDqwhsvkanYmn4umDKc1ZkBnDIbbumd40x9CKgG6ogVlLYeJa9WyfVMOHDF6f0wRjFjxVoPO6p/ZDkuEa67KCpJnXNYipLJ3MYhdKWBZw0xc3LKiKc+nMfQlo76T/qHMDfRMaMhk+L8gWc3ZlRQFG0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akWsqHoKZ5WdpeOcH9iVlUQhRgemQSkhfNaP9LqR1XKujlTuUTpoyT3xwAzkmSxN1nABoutHEO/N87fpIbpbZaIdinF7b9srwUvDOKsywfs5HMiUZhLKoZzCcU/AEFjQsPTATACGsWf3JYPnWxL9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.4 (3.50.4-1.fc39) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Fri, 2024-05-31 at 16:54 +0800, Wen Gu wrote: > When copying smc settings to clcsock, avoid setting clcsock's sk_sndbuf > to sysctl_tcp_wmem[1], since this may overwrite the value set by > tcp_sndbuf_expand() in TCP connection establishment. >=20 > And the other setting sk_{snd|rcv}buf to sysctl value in > smc_adjust_sock_bufsizes() can also be omitted since the initialization > of smc sock and clcsock has set sk_{snd|rcv}buf to smc.sysctl_{w|r}mem > or ipv4_sysctl_tcp_{w|r}mem[1]. >=20 > Fixes: 30c3c4a4497c ("net/smc: Use correct buffer sizes when switching be= tween TCP and SMC") > Link: https://lore.kernel.org/r/5eaf3858-e7fd-4db8-83e8-3d7a3e0e9ae2@linu= x.alibaba.com > Signed-off-by: Wen Gu > --- > FYI, > The detailed motivation and testing can be found in the link above. My understanding is that there is an open question here if this is the expected and desired behavior. @Wenjia, @Jan: could you please have a look? Thanks! Paolo