Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3095364rdb; Tue, 26 Dec 2023 16:20:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IHXdhaABOoVy83d7X6ep44xrItjP+nPeynOwdTyOjrV8IHIp15hajcjnfhy5vtBRjWzk/uz X-Received: by 2002:a17:903:44c:b0:1d4:6a:7d5a with SMTP id iw12-20020a170903044c00b001d4006a7d5amr9470062plb.117.1703636427251; Tue, 26 Dec 2023 16:20:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703636427; cv=none; d=google.com; s=arc-20160816; b=zQdy9E9rbrRtm8QpT0i/bzcholYB7JUiZYsGs5XHEqhraDJpZvzK8dHFHKAPHqV0k9 KYjrUfU5JNGDUf9iRSN7WCgu5G1jh92gA6tOuyURUBjTCDvchQxRsa7Tje85SRigPQY6 zFgVmWzPRHN8bxD4oetNGBGL671VZnnMIzuaYxrkW7FHHsuhWm2p7EpkjyqLF2Q/fF3o LlwFSzkYR73KFEFc7WACfOL3lXH+WwHjXbpy6A/KS+MlSaD1XIjCOf7DK3jTt3LHU4KE VXN1Qat64imIBVKx7gdHNS0RS3ctsGrM1NdmT1RQylbtPAd/X68h3XdBllYxVwOVX71r 7J1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=C0F31algdVe500mgfgdoCt4pGhDTR1ZynXl8Vor97Co=; fh=k8/Q/ebeR+upv8k5WSzWVuMr/B+yS2jjhcQOO9YZhWc=; b=zabN3pJkqkvJuIXlbkkaXytOJSLzVM/5vnV2lnxDTaXF4fueDKPbgDsQSlAK0FFxC6 ODkWm3ht2uKYG0q2P+LRA/zypubA9mW1tudwDYNHLrGbeUwX+WNkoSfkcS6pD5EpVZZe k2u6TeoGoF9HlCTXRVb3E8tvTryZKSZFNV+7cuzRR5MSItSh6pGtSLa06subKabRKHRj VfIIsfqNnzoIrtpGOIUSKrGzn7UoTIgaNEwilaBdSxFTc3q70Zdq6m3aAFVCxD2b//uQ CwFoRP+0ljj1CmYqvk0o9eSsI480yefJdQ9ixiudNiezJYk7iEX4/r58AgMtpf5nvkvl mEuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=N341jRBp; spf=pass (google.com: domain of linux-kernel+bounces-11731-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11731-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id mh3-20020a17090b4ac300b0028c26bfafedsi6880706pjb.164.2023.12.26.16.20.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Dec 2023 16:20:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-11731-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=@quicinc.com header.s=qcppdkim1 header.b=N341jRBp; spf=pass (google.com: domain of linux-kernel+bounces-11731-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-11731-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E25A62833B4 for ; Wed, 27 Dec 2023 00:20:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E6AE1FC8; Wed, 27 Dec 2023 00:20:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="N341jRBp" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (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 BD915622; Wed, 27 Dec 2023 00:20:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BQNuTAw017245; Wed, 27 Dec 2023 00:20:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= qcppdkim1; bh=C0F31algdVe500mgfgdoCt4pGhDTR1ZynXl8Vor97Co=; b=N3 41jRBpZw1Gukq/QZ0mh2PL5OOwrHNWSZjDU9nqRMiGSdQvqW8Rcc8V9u+SFSNqbu jTZVpSCpilzkfkI48HDyTfopX0dWYYPdgnX6AmvSNpklzY/rnjowOk61e25+bdCZ iXGLf7cMiW9zHOWmH0O2q1TWHydWnW12OokIrMLjP0uJvt9dqCGDZ8rwhUrwIT4H FaWDB8PzYBbWUUJswFmNi9fVYSkScGuE+cxpoTla2PYxST4gz6zJrI8lF4eANfYG wE+TRPEZOzDMF2C9CFc3h/ohAuKCcK2YHSgihnEDxVsZZs2ZvIfykwPRmyctq8dr VYaVehy8SvKCUvzIrfQg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v7c9jk1rc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Dec 2023 00:20:06 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BR0K5WI032355 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 27 Dec 2023 00:20:05 GMT Received: from [10.110.65.236] (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Tue, 26 Dec 2023 16:20:04 -0800 Message-ID: <3e017f77-87dd-78e1-321d-90c3e57a68d9@quicinc.com> Date: Tue, 26 Dec 2023 16:20:03 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH V1] net: qrtr: ns: Ignore ENODEV failures in ns To: Simon Horman , Sarannya S CC: , , , , , , Manivannan Sadhasivam , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:NETWORKING [GENERAL]" References: <1703153211-3717-1-git-send-email-quic_sarannya@quicinc.com> <20231223135333.GA201037@kernel.org> Content-Language: en-US From: Chris Lew In-Reply-To: <20231223135333.GA201037@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: hzpCbIT1obMCBG01wK-6u7g99AjD_AAU X-Proofpoint-ORIG-GUID: hzpCbIT1obMCBG01wK-6u7g99AjD_AAU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 bulkscore=0 spamscore=0 adultscore=0 phishscore=0 suspectscore=0 mlxscore=0 mlxlogscore=960 lowpriorityscore=0 clxscore=1011 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312270000 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.