From mboxrd@z Thu Jan 1 00:00:00 1970 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 69AD63B1EC6 for ; Tue, 28 Jul 2026 10:53:36 +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=1785236023; cv=none; b=mhdNbVDd09RzTO1BgvD7WTGkT648XWPkH7ziIP3ZfkHpsUU96fb3VX1CcchySenDzSzRRbmm/ioAAx5MhAojm0BYjKssAT7beQYCpZw9ukp/m/iGoUx3XwHfOeXHCH/fKAyV0F4I9fsReSyn6mub5vKQi4Gs8zB6GdBL/MBD82Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785236023; c=relaxed/simple; bh=GuqMBdPv/dcGRcpyFr3E9rAhM1G7tEFvC/D9g2VY98k=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=gMCsuAWReFIIs7948JnnFi6oqs7QR9dTAKBQO2Io6cHge1UDLtHQ5iNaS4iM/+CAwu+kQsawc3qeWm1Pr7VyQnX0Gl8o3gNSrFz+Fnwl/TZyj3TxAtkaFujp1Q+xa3fYC7NXKCUmAgUZiR5e2SCUqeYMYoV+nmgQzQX56tG+l0U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=hpYFS9Xt; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=PWFGXvL4; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hpYFS9Xt"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="PWFGXvL4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1785236012; 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; bh=rqNWKW0/xNBqkwbPCbxUHyYvyyfc0iM4zqIDc7x2VYk=; b=hpYFS9Xtv+P0NycpJsKkqWEDbGYYPki+Y1BfThy8KfU/r0IBSEk534K3nK+xQ/2ykZJM2B aiDSKItDU2kUS6Ju7RoYnpUJo1KKM06ZzX/8T9NmEYsdOQGnRbiJqiPyRru3p7dyr8W2z1 UKRdtyfx1RNTK/VMQelt4bI17EDkaLI= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-523-z7qtQyOFNxulXq4mu7EaQA-1; Tue, 28 Jul 2026 06:53:31 -0400 X-MC-Unique: z7qtQyOFNxulXq4mu7EaQA-1 X-Mimecast-MFC-AGG-ID: z7qtQyOFNxulXq4mu7EaQA_1785236010 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-495689bfcc8so28388455e9.1 for ; Tue, 28 Jul 2026 03:53:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1785236010; x=1785840810; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=rqNWKW0/xNBqkwbPCbxUHyYvyyfc0iM4zqIDc7x2VYk=; b=PWFGXvL4tEuQ0ZAIGjh9mJqjRuPZHDrpjHWZB+ivzbHCpsmBrsrzjxdUb+0s4BJ3Hp pk49f15t1gPgRZJ4Yl1Mne6Rl/e9k2LzQoLcd/EFbcdEgWqSkURdMaSZ4NcEO9qybIOv 7S78Fo0RazykWfi1a1tGUolX+alpjoi+t2mdXYLpTVjQ+eEI5CBt8TOeKb6ElYRWcqIL as/FJylwPCI62zl3W2V7Unnnth/81BoC0cYHJI4WZQlqQPJrxgMjJQFbf5p6Livtkjr9 GLv538KU0syN8B4VLE+O+IZAx9a6sT/D5EKH20aygKrmuH7GYTOpii26CZuMinuQ+8Nc 1pdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785236010; x=1785840810; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=rqNWKW0/xNBqkwbPCbxUHyYvyyfc0iM4zqIDc7x2VYk=; b=I+CfFawdG8cgVZ60k+cslHkEiHdsjIzBYVxQlh5W5YfOJiiaNzTLOL79NNhi6ZzH53 NlK7GqQYm+gW+ogKddO//YNF5vZqSLoKfB53S/X+70k5p8MENBlmiJVpiYvqie0Z3euM il/XZdcKsz3U6O8oLM9tKLO07BFR6KyAeKNzJydwtWhXfN9dzyYEpMfpu8uzDRfXnpMy qMHh1wUtKcCZQ6lVCKnlaa6TrL5qYuGvygcYdGeO3jSTSJ0lGqUrTpQQi4VXBFwGYdLr UFcOa/NAla2TDXzbOsenU/EWB7ZhNl2nChF9YktjptVwI1Z9NwNo2KSHBJEt3RbFmTOA U5/A== X-Forwarded-Encrypted: i=1; AHgh+RphejrQZPgTPenwCa8AULncQX79HcH7+JQkIHZTJh7ExFiJLHygRb/JCmboakW737sd9RQ83aSrfFUn4d8=@vger.kernel.org X-Gm-Message-State: AOJu0YyOa5fSwgyvPX4fzRb62RuP/NP8yYP4ifGeCe8as/+IY5iEL0UI Ohv+QMY4l0oR+BgC+APS7FP5tlEsSkiwFQ1AWvd99Vt82I3l9ZdSI9ezFCk1ZlTZ/qMGZfJs2s4 DInVFbaEDLxDp7uU3YoQTiyDQ2M0HykuXdU448TgAz70U9DFujTo2lOnN0lqKD6wB6w== X-Gm-Gg: AR+sD12nc7YQb3SgM39ngygxKPn7z/yZNmR9DXwBViogSGm8oC6Gl3NmwWOpaFXRqvI A0+AXDg/g/lS+MzAOsKCmcLDy0v/MpOueQz3+dmRv2xtmSKT64QXKR5TRKpJ/xw1eyjms0hGlLd 2vw1GlObTkKQ8BRszbhc3JG+O7G0TQSBqSjYazrRwyAxGInN6kWKXl+rtrIJCJ4RZm+sfr3OoqG 0XEzf5G03Ip9a7S6fYqqPNEC7ZUg2Ix3h7jgmRjRw9CsLccNleWRcgJn78GmxmJepN7wREv6xMH YWYkh1nt0XscPHXcyLZLA+6BqfEad/TGsT9xNFh53Z4a8k5g1p3Zvs987FsUyQUwlsOYip76mH+ Dvpd8/I9OuesR3OCWjsGZ1ts8YmEs/EsWj8SAjSfrcI+nB6Si/MLsx4yWMcr8mZSwNG7fy4WaAD iCEQ== X-Received: by 2002:a05:600c:81c8:b0:495:401d:9f4f with SMTP id 5b1f17b1804b1-496c65764e0mr19520415e9.25.1785236009990; Tue, 28 Jul 2026 03:53:29 -0700 (PDT) X-Received: by 2002:a05:600c:81c8:b0:495:401d:9f4f with SMTP id 5b1f17b1804b1-496c65764e0mr19520135e9.25.1785236009517; Tue, 28 Jul 2026 03:53:29 -0700 (PDT) Received: from ?IPV6:2a0d:3344:5521:6b10:58fd:68f:7756:389d? ([2a0d:3344:5521:6b10:58fd:68f:7756:389d]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4957bffc501sm244172845e9.4.2026.07.28.03.53.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 28 Jul 2026 03:53:29 -0700 (PDT) Message-ID: <7108c005-6b8d-4dda-82cc-e665cbe3b6a4@redhat.com> Date: Tue, 28 Jul 2026 12:53:26 +0200 Precedence: bulk X-Mailing-List: linux-hyperv@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v2 0/7] net: mana: harden the HWC and add dynamic queue depth To: Long Li , Konstantin Taranov , Jakub Kicinski , "David S . Miller" , Eric Dumazet , Andrew Lunn , Jason Gunthorpe , Leon Romanovsky , Haiyang Zhang , "K . Y . Srinivasan" , Wei Liu , Dexuan Cui , shradhagupta@linux.microsoft.com, Simon Horman , ernis@linux.microsoft.com, stephen@networkplumber.org Cc: netdev@vger.kernel.org, linux-rdma@vger.kernel.org, linux-hyperv@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260721234339.1476932-1-longli@microsoft.com> From: Paolo Abeni Content-Language: en-US In-Reply-To: <20260721234339.1476932-1-longli@microsoft.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 7/22/26 1:43 AM, Long Li wrote: > This series hardens the MANA Hardware Channel (HWC) control-plane path > and then builds on that to support a dynamic HWC queue depth. > > The HWC is the command channel the driver uses to talk to the device. > Today it is created at a fixed depth of one outstanding request, and > several of its lookup and teardown paths predate the RCU and DMA-lifetime > rules they now need to follow. Raising the queue depth and allowing > concurrent commands makes those latent races reachable, so the fixes come > first and the feature builds on them. > > Patches 1-5 are fixes for pre-existing HWC bugs, each with a Fixes: tag: > > 1: cq_table was a plain pointer array freed with no grace period while > the EQ interrupt handler dereferenced it; put it under RCU. > 2: the HWC RQ and SQ were sized with each other's message size, so a > response could overflow the RQ buffer and the RX slot stride was > computed with the wrong size. > 3: comp_buf was freed before the EQ was destroyed, so a late completion > handler could touch freed memory. > 4: the RX path consumed device-supplied lengths and indices without > validation; validate them before use (this matters for confidential > VMs, where the DMA buffer is shared with the host). > 5: a failed mana_hwc_establish_channel() could leave live MST entries > while the driver freed the queue buffers, and destroy_channel() freed > the TXQ/RXQ before the EQ was quiesced; add a setup_active teardown > gate and destroy the CQ first. Fixes should go via the net tree. Targeting net-next to avoid waiting the merge to post the dependant features is not a valid reason. Also both sashikos agrees pcie_fpr() in patch 5 is not the correct function to be used there. Also please note the expectations WRT LLMs feedback, commit c82ff94592fb. /P