Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp41134rdb; Thu, 21 Dec 2023 02:07:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IEpKUrxt8lk8gQCvmWfmq8zq4KdGWIsgIF6rXfENu9x6A/o8wYGkAO+VlLssRdsiE0Nwx52 X-Received: by 2002:a05:6a20:92a0:b0:18c:15ec:3058 with SMTP id q32-20020a056a2092a000b0018c15ec3058mr615487pzg.4.1703153275632; Thu, 21 Dec 2023 02:07:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703153275; cv=none; d=google.com; s=arc-20160816; b=KAAGkqMm7Xh9rL7oRSsz18RVAS5lk8GV/eQ9bQa++FZp0olFzXMifeqRDbTW12FdFP ds4ZqdaKEh6vHz+y7tqFs19/9mTFj4qk2m54tG4lhxD+lO7hpl/mnhWmdN9jN2P0c2rU ugCXvIWlTAx/5Rqeu8z53+a0wwOoaOVEVigGYZ0CBI6Mv/RelJegjqasKcm7CqUo2w+g NNVyrUSAw5ru8j+VUcaL4uar5bEXwu1yGtbldhwpqOepcqzQ4e7LXwd6UChsKElza9CF NWhxPDbvGUmYsZ919zh0rg0+8y2Rm5juuhVBHHgaaexrtzxeAmgKrUsfblO4Rd31/IRR kY0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature; bh=Kq8VbpDqe3FOuWKJfLOXUx2yB0WHYeTuEVaPSqZj6UE=; fh=0noZ+TBBpVT+28O94mYnYxF/sLSaMgvIACqXkyfMn68=; b=rxBop8PNg83E5XANJJY0EDqZrZ+CVyhLvn4lO875B1RzzVJI5yVj0whHgBui9L4N+y d/uO0vpOgNzlKmtNqRfre4MrI0rrB9o4aQvBOXFmE0Gp879clU65NOWOpsR7qgmOtTqM BLHC/E5dF2Liduqaz6H+Tlki758oGHVypVkYDZuIAFcxRXD0sibCi1mA6/U3sVT1aoI1 QYO0Nmbi02UwUz12Iv43QUUaPYTui+16RDbX4AVHv8XAkcZ6kShx7XYU0T1SFH4aCQXn qQgAYglPjSdXvggB9RqajD88VhJOD4Zy7QMDGdFtJKRwOczyMu1fqiOw26JJnW5Cz5Y+ Jguw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ab847a19; spf=pass (google.com: domain of linux-kernel+bounces-8176-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8176-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. [139.178.88.99]) by mx.google.com with ESMTPS id s11-20020a17090aad8b00b0028bd0afa930si1429465pjq.118.2023.12.21.02.07.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 02:07:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8176-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ab847a19; spf=pass (google.com: domain of linux-kernel+bounces-8176-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8176-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 4D9B5288673 for ; Thu, 21 Dec 2023 10:07:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09F0C4F202; Thu, 21 Dec 2023 10:07:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="ab847a19" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.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 F34794F1E9; Thu, 21 Dec 2023 10:07:43 +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 (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BL8j8K3005498; Thu, 21 Dec 2023 10:07:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= qcppdkim1; bh=Kq8VbpDqe3FOuWKJfLOXUx2yB0WHYeTuEVaPSqZj6UE=; b=ab 847a196GpnVo+MWOmSgUW90w6EgfSMqENwDQI93OfpBaQoLhhpG2ffB1ok0ZmApk H+cc1XM/S7LmMfd9LREX3zvdkKbegM9Rh8SZbC1NSM6LNm212Bg8P9keOEBpJiw2 dpO3LgMzHnxPB90spfKL47ZBi7Ses36Tg3FwSTGzlqZ6irJChZDtB/pIvq8p46JQ W48ctEiPEGDkga2wjpZ9wNgyVWJ1ULQIfdvtA6LlTXUbNTLLJ3a0XBTrzWa+HC9H UoKdXS8q9KRJT5j6psuIBvSeVgzvUIe85ZT7Qmu4bb/iuxsfTbRD7Tiz5jwh4Ygo CljzAb9Yw2EPJS7E14OA== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v4j43g8yf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Dec 2023 10:07:37 +0000 (GMT) Received: from nalasex01c.na.qualcomm.com (nalasex01c.na.qualcomm.com [10.47.97.35]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3BLA77HU007957 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Dec 2023 10:07:07 GMT Received: from sarannya-linux.qualcomm.com (10.80.80.8) by nalasex01c.na.qualcomm.com (10.47.97.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Thu, 21 Dec 2023 02:07:02 -0800 From: Sarannya S To: , , , , CC: , , , , Manivannan Sadhasivam , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:NETWORKING [GENERAL]" Subject: [PATCH V1] net: qrtr: ns: Ignore ENODEV failures in ns Date: Thu, 21 Dec 2023 15:36:50 +0530 Message-ID: <1703153211-3717-1-git-send-email-quic_sarannya@quicinc.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01c.na.qualcomm.com (10.47.97.35) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 7TllMe0d82FDSsZvrOqsR1FhIA2xt3Mr X-Proofpoint-GUID: 7TllMe0d82FDSsZvrOqsR1FhIA2xt3Mr 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_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 suspectscore=0 spamscore=0 impostorscore=0 adultscore=0 mlxlogscore=729 mlxscore=0 phishscore=0 priorityscore=1501 clxscore=1015 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312210075 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; @@ -188,7 +188,7 @@ static void lookup_notify(struct sockaddr_qrtr *to, struct qrtr_server *srv, msg.msg_namelen = sizeof(*to); ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); - if (ret < 0) + if (ret < 0 && ret != -ENODEV) pr_err("failed to send lookup notification\n"); } @@ -207,6 +207,9 @@ static int announce_servers(struct sockaddr_qrtr *sq) xa_for_each(&node->servers, index, srv) { ret = service_announce_new(sq, srv); if (ret < 0) { + if (ret == -ENODEV) + continue; + pr_err("failed to announce new service\n"); return ret; } @@ -369,7 +372,7 @@ static int ctrl_cmd_bye(struct sockaddr_qrtr *from) msg.msg_namelen = sizeof(sq); ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); - if (ret < 0) { + if (ret < 0 && ret != -ENODEV) { pr_err("failed to send bye cmd\n"); return ret; } @@ -443,7 +446,7 @@ static int ctrl_cmd_del_client(struct sockaddr_qrtr *from, msg.msg_namelen = sizeof(sq); ret = kernel_sendmsg(qrtr_ns.sock, &msg, &iv, 1, sizeof(pkt)); - if (ret < 0) { + if (ret < 0 && ret != -ENODEV) { pr_err("failed to send del client cmd\n"); return ret; } -- 2.7.4