From: Arun Kumar Neelakantam <aneela@codeaurora.org>
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 <aneela@codeaurora.org>,
Florian Westphal <fw@strlen.de>,
Hannes Frederic Sowa <hannes@stressinduktion.org>,
Denys Vlasenko <dvlasenk@redhat.com>,
Nicolas Dechesne <nicolas.dechesne@linaro.org>
Subject: [PATCH 2/2] net: qrtr: Reset the node and port ID of broadcast messages
Date: Wed, 4 Jul 2018 19:49:33 +0530 [thread overview]
Message-ID: <1530713973-26696-3-git-send-email-aneela@codeaurora.org> (raw)
In-Reply-To: <1530713973-26696-1-git-send-email-aneela@codeaurora.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 <aneela@codeaurora.org>
---
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
next prev parent reply other threads:[~2018-07-04 14:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 14:19 [PATCH 0/2] net: qrtr: Broadcasting control messages Arun Kumar Neelakantam
2018-07-04 14:19 ` [PATCH 1/2] net: qrtr: Broadcast messages only from control port Arun Kumar Neelakantam
2018-07-04 14:19 ` Arun Kumar Neelakantam [this message]
2018-07-05 11:20 ` [PATCH 0/2] net: qrtr: Broadcasting control messages David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530713973-26696-3-git-send-email-aneela@codeaurora.org \
--to=aneela@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=davem@davemloft.net \
--cc=dvlasenk@redhat.com \
--cc=fw@strlen.de \
--cc=hannes@stressinduktion.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dechesne@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).