Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp40288rdb; Thu, 21 Dec 2023 02:06:13 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQuaDzMYIFPjx1EbKLtcFcmDJRnNMPUyrsnfHpS6qtWB8lvBvIUQ98SoAmrqSYf8gKoZtk X-Received: by 2002:a50:a456:0:b0:553:2e17:91ed with SMTP id v22-20020a50a456000000b005532e1791edmr4252820edb.79.1703153173792; Thu, 21 Dec 2023 02:06:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703153173; cv=none; d=google.com; s=arc-20160816; b=gXYVWpCG/v7vNOuJkjL3VlXBFzwmwkKz+hb+DjNgpBgDOQq5z1XQvze+TEzQEtZVEi fFnfZgcE/CPTM3aLV78u/43E+F+4pKecM8z1tRQhyLguVg2e5u6E0R1QSC4/bPA+9OIX vCX730RLDt7ATClQoopkeDhbCVxax1f7VK0NJ2Fc8TJOl2U76OoQirnzYK/YKThdCwka bc6LhrTB+EnC0bUM8hmQGhpaybJoHFxCDkPSGCX1SYMd2YvXfzbQcUgHzUh8VE88mnex fSKOuGQ5XHQjWQd+earIV/Z+Xe19Y2teB9WvSrV/d345WQABJ15ROw2xyQc1e4EeObSb d9UA== 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=Hb50Q/xQGLl94RS9bdfXE1Pk0Bvyanpv1BUchJ1xQ4rtQOiy6EBcEbPCZpWMdous2o Tsh5QRR0S9MLMhwm1q0qv+9Ljs1nD18RmZpwZtjtIyKp7M8dQB3zFUdxzGwgxgeCGkoh HUpmJn9/RZU8sLrfZ98+1OQVsWQirEw8qX/X91u5WFBZ9Ut1XLkM2ucwGMQe2WkeztVP +8aN4A2JJZSBYSr1LxF0qOVwG0yODG0/uhGWihSzDyh+MVCkjkQJoRxAb5WL06n2rSEC fPswBrZk6GScSdgIc7M64ZhlEoKb0M/wkeOcHzPsCtiuh3JIktJUW98rD5dYrolLf+lW 9T3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="mI7F/UnV"; spf=pass (google.com: domain of linux-kernel+bounces-8174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8174-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id eg13-20020a056402288d00b005540c79a833si650326edb.121.2023.12.21.02.06.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 02:06:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="mI7F/UnV"; spf=pass (google.com: domain of linux-kernel+bounces-8174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8174-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 643D21F239CA for ; Thu, 21 Dec 2023 10:06:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D846A4F202; Thu, 21 Dec 2023 10:06:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="mI7F/UnV" 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 9EBF04D5A6; Thu, 21 Dec 2023 10:06:00 +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 (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BL63EN3028172; Thu, 21 Dec 2023 10:05:54 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=mI 7F/UnVBAk9r3yMw+NjTPcVp69U+6DhGZxr4OvhXoc3okMkg/HtRGPlCepskrXw/F 9zanMNBT1diPhrrv1/UsbHD9mxN2fNy4rQBvdglNVuj03DHMPS6amZcDJOfHMXuk N21w6vx3Neu3pqy8w40f2p4LbBGXDvhqX5M2dtuh6YqAt8ZQQ66fMLPeATpds6fj DLjqqwtCvypJB48n3MM4RAdBv6CoE8Clv66RoIo9RY0qyhvJezsfi2ztzbW2cZeu HFWBXf7uj1CTsJg9u/tPGnWXRi+NdJVP8XAsJEXDqoE590tDyqaTGZdrjwthZoQy kOwdkKL1jdxH0xpkk9GQ== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3v3v33c83c-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Dec 2023 10:05:53 +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 3BLA5qV1006123 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 21 Dec 2023 10:05:52 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:05:47 -0800 From: Sarannya S To: , , , , CC: , , , , Manivannan Sadhasivam , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , "open list:NETWORKING [GENERAL]" Subject: [PATCH V1 1/1] net: qrtr: ns: Ignore ENODEV failures in ns Date: Thu, 21 Dec 2023 15:35:35 +0530 Message-ID: <1703153136-3607-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: IRYirnL3ks9jCOZ42oyKBpMvPWsk6E75 X-Proofpoint-GUID: IRYirnL3ks9jCOZ42oyKBpMvPWsk6E75 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 spamscore=0 mlxscore=0 malwarescore=0 mlxlogscore=724 clxscore=1011 priorityscore=1501 adultscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312210074 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