Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp869460imm; Wed, 4 Jul 2018 07:22:43 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc7FieLjcT4jrxkuHb9+euODRV3T+i+F1xV2d9Xms/bex4SZRNEn646qxJwGGcWqTOM3eHW X-Received: by 2002:a63:c44a:: with SMTP id m10-v6mr2130809pgg.416.1530714163890; Wed, 04 Jul 2018 07:22:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530714163; cv=none; d=google.com; s=arc-20160816; b=0dCqUgsr+2Z6uMVKZ2MEKjPoNz9K2TkmLN010O0nD5ExvkzcRykSflfQ2WKgcFv1ni 7fh/OtpfdFIsld3abyglaKFvITE5/Sr/xX0I/IzK86kXVXsJws/5rYo7n0nrfp3Q75gq lYKCWgUCDkMjKhE2fVHnAoP04AuCcRAsOXvs9yBuPAB4YIAjePwOs3mIgtrVbEoyvYgq Lhd12AatBxPBthEoBbuqLql1EOLcASkehzNRAvyL/qd8oA1vK/t/I9QHhuGy6Z+0E+EV 9pzrzeEaNNsqILcSUI+uAUQKBzONmr59AdK50t/e1TyrDLAyxv96CthaBa0+yqVT/BWT 3gZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=94mkF0RMpUg6aBubzhyidU0QZlVRjfS7P3lsANvbA6U=; b=yV0jMyGFZ0iBLeybwdAYVRRUHO7sSMhLAJdNZplJZwqaJOHK7VLA9hwZppRKyRq7b6 TGzMcKDwBPbk6USpHuRTiwClg1BwB+rts+riUe9pRj1rStEDNUXPcBhtuEYkjbmHaBsu /etID73pWy1/yTH7DSutbqgAjg88HtQT+GXggKWpq6Yt4w0diYDTcSvv8ykb+xM9z5ku kuJLWFc8qGxagNUYHz8GZHvBUhepXBRg8YBM4jjw/SMN7WGB6pRErqy4EntY2EMs8e1E 8Nvvy4wCz2LS+RVMQ1ZQ6xAsRQcXT2LBFNsFnszn4M0yvd42x3ae3ZSElaSMLzS4WlKA drRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ARhWnksF; dkim=pass header.i=@codeaurora.org header.s=default header.b=EonJhhqp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si3471686pgj.128.2018.07.04.07.22.29; Wed, 04 Jul 2018 07:22:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=ARhWnksF; dkim=pass header.i=@codeaurora.org header.s=default header.b=EonJhhqp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752839AbeGDOUl (ORCPT + 99 others); Wed, 4 Jul 2018 10:20:41 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:59032 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750855AbeGDOUi (ORCPT ); Wed, 4 Jul 2018 10:20:38 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8FA2360B3B; Wed, 4 Jul 2018 14:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530714037; bh=t6soV3278ILYh0Azr+oQu7QbMd5xF3RN4KtNFACJYMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ARhWnksFTTacszNZFeDashR8uSLRDuFAzGcA1r1o7cSqbxN2e4vj00luzZk84dmt1 I8chGmgjfgZCKT2Ef9KHvc9a2K1tFy//mhh+omYdrdAvpCWdPbm2vxCd2do8a4iJ2P m+kocANwfHeoAbkAzneftI1UPC8sxy9qQlmsjI3o= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from aneelaka-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: aneela@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 94FC0607EB; Wed, 4 Jul 2018 14:20:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530714036; bh=t6soV3278ILYh0Azr+oQu7QbMd5xF3RN4KtNFACJYMM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EonJhhqpqHVvcEbJifUFRTxedLtqJChLjLAAuQWHKWTMb6BcOfldnqn8MOSUch9PD W6HtVyso/0m9cMudiO4W4ZHfPNqOvBKXdFyQwPFOLQykgQQANhvyHZbEJMynCqyk6Z WkipZYF4eUyJ+zAk3nEpqyUN/NkfQsxb8kI2wZ0k= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 94FC0607EB Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=aneela@codeaurora.org From: Arun Kumar Neelakantam To: davem@davemloft.net, bjorn.andersson@linaro.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Arun Kumar Neelakantam , Florian Westphal , Hannes Frederic Sowa , Denys Vlasenko , Nicolas Dechesne Subject: [PATCH 2/2] net: qrtr: Reset the node and port ID of broadcast messages Date: Wed, 4 Jul 2018 19:49:33 +0530 Message-Id: <1530713973-26696-3-git-send-email-aneela@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1530713973-26696-1-git-send-email-aneela@codeaurora.org> References: <1530713973-26696-1-git-send-email-aneela@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All the control messages broadcast to remote routers are using QRTR_NODE_BCAST instead of using local router NODE ID which cause the packets to be dropped on remote router due to invalid NODE ID. Signed-off-by: Arun Kumar Neelakantam --- net/qrtr/qrtr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index 7ffc9a3..86e1e37 100644 --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -191,8 +191,13 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb, hdr->type = cpu_to_le32(type); hdr->src_node_id = cpu_to_le32(from->sq_node); hdr->src_port_id = cpu_to_le32(from->sq_port); - hdr->dst_node_id = cpu_to_le32(to->sq_node); - hdr->dst_port_id = cpu_to_le32(to->sq_port); + if (to->sq_port == QRTR_PORT_CTRL) { + hdr->dst_node_id = cpu_to_le32(node->nid); + hdr->dst_port_id = cpu_to_le32(QRTR_NODE_BCAST); + } else { + hdr->dst_node_id = cpu_to_le32(to->sq_node); + hdr->dst_port_id = cpu_to_le32(to->sq_port); + } hdr->size = cpu_to_le32(len); hdr->confirm_rx = 0; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project