netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Loic Poulain <loic.poulain@linaro.org>, clew@codeaurora.org
Cc: davem@davemloft.net, netdev@vger.kernel.org,
	manivannan.sadhasivam@linaro.org
Subject: Re: [PATCH] net: qrtr: Fix port ID for control messages
Date: Thu, 24 Sep 2020 09:25:59 -0500	[thread overview]
Message-ID: <20200924142559.GD40811@yoga> (raw)
In-Reply-To: <1600941239-19435-1-git-send-email-loic.poulain@linaro.org>

On Thu 24 Sep 04:53 CDT 2020, Loic Poulain wrote:

> The port ID for control messages was uncorrectly set with broadcast
> node ID value, causing message to be dropped on remote side since
> not passing packet filtering (cb->dst_port != QRTR_PORT_CTRL).
> 

This does indeed make more sense. Unfortunately after reading the
documentation a few times I do believe that it doesn't actually specify
the expected port (only the node id) - and that the recipient shall
ignore "the field"...

Chris, can you please let us know what the actual expectation of the
modem is? (SDX55 in this case, but Arun must have tested this on
something with more lax expectations?)

Regards,
Bjorn

> Fixes: d27e77a3de28 ("net: qrtr: Reset the node and port ID of broadcast messages")
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> ---
>  net/qrtr/qrtr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
> index b4c0db0..e09154b 100644
> --- a/net/qrtr/qrtr.c
> +++ b/net/qrtr/qrtr.c
> @@ -348,7 +348,7 @@ static int qrtr_node_enqueue(struct qrtr_node *node, struct sk_buff *skb,
>  	hdr->src_port_id = cpu_to_le32(from->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);
> +		hdr->dst_port_id = cpu_to_le32(QRTR_PORT_CTRL);
>  	} else {
>  		hdr->dst_node_id = cpu_to_le32(to->sq_node);
>  		hdr->dst_port_id = cpu_to_le32(to->sq_port);
> -- 
> 2.7.4
> 

      reply	other threads:[~2020-09-24 14:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24  9:53 [PATCH] net: qrtr: Fix port ID for control messages Loic Poulain
2020-09-24 14:25 ` Bjorn Andersson [this message]

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=20200924142559.GD40811@yoga \
    --to=bjorn.andersson@linaro.org \
    --cc=clew@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=loic.poulain@linaro.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=netdev@vger.kernel.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).