Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7600874rdb; Thu, 4 Jan 2024 01:24:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWfvMBkDHAIfhHYqAsd373Apspl84tRZkcjmQDoH3PINvcjT5COTAnoRhLGXvBAbapiTYK X-Received: by 2002:a05:6358:7e85:b0:174:dbde:1946 with SMTP id o5-20020a0563587e8500b00174dbde1946mr257921rwn.4.1704360244844; Thu, 04 Jan 2024 01:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704360244; cv=none; d=google.com; s=arc-20160816; b=TPyWmi3zAYMLokjfbOkpNEKujWAU5Cw9G4kdj3dsa1uGgquUqxtFcMQDVrQaXZz97Q zoU3d0fY5aKtyiESLvx8LUgHSk9/w32A1lbSlP+Xe1mxExfRdUacDrGd9qYlW3XrsPwo Vym6a1YqJ2pC1B14K+7kZLWBgS6F18u4ct8ilSy6kISQfGv0iL4+pLkUzhhI3aczkV7v uGUZVrLobawv61tMAYt5Gp9VvlUFwgYNxaSwM+fbCLJi4nRpPfCr3Kx4O9i218jSnjba 3NnadPG2K492Z6CDHZjuw38Ii1DWsVru99OjkMZCLhrsdFXYqHl5Sxa6Y+mMa6gj3X/M ie3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=62vj7CMnKPOfSzNN1+UFLf4xprp6CB184OrJCFlEuiw=; fh=nHoDqzRnhTegJbpeF4I9Xu6bOcPOTGzXqkprUPWWyN0=; b=sBAwZO/7TpCxgFrDn62yfO2p2friCO7CD7GERN8X16Wa3Wg7HTmDCB0Q4gJZVNnNob MqEIPwp+hoRyzn1pvU/czrd/UjeP0ufUsT0qll5dvjrmPp8GlVs1v3hoWNOzqzYe2Br1 3hNzpAmbuYp/izJJax00hxvDvRlsY/gn9Va77gJVH0adhANbIUcm+Kp5b3Y99b2we/h3 /UwWjo+/+si7HjCmwWSufHnV6liAYNnbK5Q4subIH3f0m8fbOLhLAWcj7/3mAZ17/s4f a58Cq1pUa/RGpkRhfdfWCc0JV2TPqRUqHuXUsPCTbqekoN2AOIk1i41pPeEQao0BqjtZ 9Frw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hPu7cp9c; spf=pass (google.com: domain of linux-kernel+bounces-16433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id jo16-20020a056a00909000b006d9ab6f62fdsi18711278pfb.235.2024.01.04.01.24.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 01:24:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hPu7cp9c; spf=pass (google.com: domain of linux-kernel+bounces-16433-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16433-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7AD0D2873CC for ; Thu, 4 Jan 2024 09:24:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 802E720333; Thu, 4 Jan 2024 09:23:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="hPu7cp9c" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 A9540208A3; Thu, 4 Jan 2024 09:23:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2ADABC433C8; Thu, 4 Jan 2024 09:23:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704360230; bh=2fYZ6vaziMzDK3ZftjJ0AmNeenr6pb42FNCCdQQvYiU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hPu7cp9cxtIIG1PRxcIJdOhLA6FUGpW7QzSfbPkf0PueMHM+lJzeF3FwQK9trx81U LRkdE9B4uqDF+PPyXUfVdL85no+50qV16hVtknSb6FBRAUH8TDkvFdZ0HwlU8S9/aM tmfK7ar37/9KzWV4+cFvWt7adzUSWRVNl3YNOe7DpdV+7LLEpT1JG3sCML5/GyhLzm H+QrG7G+Rf8tXF27aP5LjSTUA5DW8RpRJvjtUL7dmmZ4XEwGdSCy7afQcI0ksORauL oqz6YFwnK2dd3X8gEKZgrx2WSJRm8BbaicGYSDNhcUf18L86mWeiEekGaDvkwriE8e ZHSp50zPl2kNg== Date: Thu, 4 Jan 2024 09:23:44 +0000 From: Simon Horman To: Chris Lew Cc: Sarannya S , quic_bjorande@quicinc.com, andersson@kernel.org, mathieu.poirier@linaro.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, Manivannan Sadhasivam , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:NETWORKING [GENERAL]" Subject: Re: [PATCH V1] net: qrtr: ns: Ignore ENODEV failures in ns Message-ID: <20240104092344.GE31813@kernel.org> References: <1703153211-3717-1-git-send-email-quic_sarannya@quicinc.com> <20231223135333.GA201037@kernel.org> <3e017f77-87dd-78e1-321d-90c3e57a68d9@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3e017f77-87dd-78e1-321d-90c3e57a68d9@quicinc.com> On Tue, Dec 26, 2023 at 04:20:03PM -0800, Chris Lew wrote: > > > On 12/23/2023 5:56 AM, Simon Horman wrote: > > [Dropped bjorn.andersson@kernel.org, as the correct address seems > > to be andersson@kernel.org, which is already in the CC list. > > kernel.org rejected sending this email without that update.] > > > > On Thu, Dec 21, 2023 at 03:36:50PM +0530, Sarannya S wrote: > > > From: Chris Lew > > > > > > Ignore the ENODEV failures returned by kernel_sendmsg(). These errors > > > indicate that either the local port has been closed or the remote has > > > gone down. Neither of these scenarios are fatal and will eventually be > > > handled through packets that are later queued on the control port. > > > > > > Signed-off-by: Chris Lew > > > Signed-off-by: Sarannya Sasikumar > > > --- > > > net/qrtr/ns.c | 11 +++++++---- > > > 1 file changed, 7 insertions(+), 4 deletions(-) > > > > > > diff --git a/net/qrtr/ns.c b/net/qrtr/ns.c > > > index abb0c70..8234339 100644 > > > --- a/net/qrtr/ns.c > > > +++ b/net/qrtr/ns.c > > > @@ -157,7 +157,7 @@ static int service_announce_del(struct sockaddr_qrtr *dest, > > > msg.msg_namelen = sizeof(*dest); > > > ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); > > > - if (ret < 0) > > > + if (ret < 0 && ret != -ENODEV) > > > pr_err("failed to announce del service\n"); > > > return ret; > > > > Hi, > > > > The caller of service_announce_del() ignores it's return value. > > So the only action on error is the pr_err() call above, and so > > with this patch -ENODEV is indeed ignored. > > > > However, I wonder if it would make things clearer to the reader (me?) > > if the return type of service_announce_del was updated void. Because > > as things stand -ENODEV may be returned, which implies something might > > handle that, even though it doe not. > > > > The above notwithstanding, this change looks good to me. > > > > Reviewed-by: Simon Horman > > > > ... > > Hi Simon, thanks for the review and suggestion. We weren't sure whether we > should change the function prototype on these patches on the chance that > there will be something that listens and handles this in the future. I think > it's a good idea to change it to void and we can change it back if there is > such a usecase in the future. Hi Chris, yes, I think that would be a good approach.