Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan.gerhold@linaro.org>
To: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
Cc: Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
	Stephan Gerhold <stephan@gerhold.net>,
	Loic Poulain <loic.poulain@oss.qualcomm.com>,
	Sergey Ryazanov <ryazanov.s.a@gmail.com>,
	Johannes Berg <johannes@sipsolutions.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
Subject: Re: [PATCH net-next 3/3] net: wwan: qcom_bam_dmux: enable QMAP if supported by the modem
Date: Fri, 4 Dec 2026 11:42:18 +0100	[thread overview]
Message-ID: <axKZCkHIHOrF99GO@linaro.org> (raw)
In-Reply-To: <20261203-qcom-bam-dmux-qmap-v1-3-abc2e80a03af@oss.qualcomm.com>

On Thu, Dec 03, 2026 at 09:40:54PM +0530, Vishnu Santhosh wrote:
> Newer modem firmware can use QMAP to carry several data connections over
> one BAM-DMUX channel, with the rmnet driver handling QMAP on top of the
> BAM-DMUX network interfaces.

Nitpick: "Newer" is a quite ambiguous term here. Most MSM8916 from 2015
(11 years ago) already support QMAP. I think I only had a single device
with an old modem firmware from 2014 that did not support that yet.

The reason I never added support for QMAP is that BAM-DMUX itself
already supports multiple data connections through its channels, so that
alone is not a reason to use the more complex QMAP approach. What you
might gain is support for aggregation/flow control that are also
implemented in the rmnet driver, although I don't remember if I was able
to determine back then if this is actually functional on BAM-DMUX
platforms (it's been 6 years since I tried).

Please add a motivation to the commit message to explain what we really
gain in practice from enabling this feature.

> The modem only enables QMAP on a channel if
> bit 1 is set in the signal byte of the OPEN command it receives. The
> driver always sends 0, so QMAP stays disabled.
> 
> The modem sets the same bit in its own OPEN command if it supports QMAP.
> Remember the bit for each channel and set it in the OPEN command sent to
> the modem. The modem always opens a channel before its network interface
> is created, so the bit is known by the time ndo_open() sends the OPEN
> command. Firmware that does not set the bit is not affected.
> 
> Co-developed-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
> Signed-off-by: Deepak Kumar Singh <deepak.singh@oss.qualcomm.com>
> Signed-off-by: Vishnu Santhosh <vishnu.santhosh@oss.qualcomm.com>
> ---
>  drivers/net/wwan/qcom_bam_dmux.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wwan/qcom_bam_dmux.c b/drivers/net/wwan/qcom_bam_dmux.c
> index a7d05b1b8b1230d1d54e9a7abcbc16a16681797e..9e82a30b16a68d786cd7523a8d6a8bb52dd9fe89 100644
> --- a/drivers/net/wwan/qcom_bam_dmux.c
> +++ b/drivers/net/wwan/qcom_bam_dmux.c
> @@ -32,6 +32,9 @@
>  #define BAM_DMUX_HDR_MAGIC		0x33fc
>  #define BAM_DMUX_LEN_FROM_DMA		0xffff
>  
> +/* Signal bits in OPEN commands */
> +#define BAM_DMUX_OPEN_QMAP		BIT(1)
> +

The downstream bam_dmux driver calls this bit "DYNAMIC_MTU_MASK" and
it's a bit more involved than just a simple "QMAP" signal [1]. It's used
for some kind of dynamic MTU negotiation feature where both sides
dynamically negotiate the MTU/buffer sizes, once statically during OPEN
and technically also dynamically later on new DATA packets.

I recall that signaling this bit is required for QMAP to work, but is
only indirectly related to it. Based on your patch, it's not clear to me
if this feature was simplified for Shikra or you have intentionally
implemented it only partially with no reference to the dynamic MTU
feature.

Please explain the impact/applicability for older platforms in the
commit message.

Thanks,
Stephan

[1]: https://git.codelinaro.org/clo/la/kernel/msm-4.9/-/blob/dd6b65e15999156292e8108ec45062a419bbe98a/drivers/soc/qcom/bam_dmux.c#L1006-L1062

  parent reply	other threads:[~2026-12-04 10:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03 16:10 [PATCH net-next 0/3] net: wwan: qcom_bam_dmux: Add QMAP support Vishnu Santhosh
2026-12-03 16:10 ` [PATCH net-next 1/3] dmaengine: qcom: bam_dma: report residue for completed RX transfers Vishnu Santhosh
2026-12-03 16:19   ` Frank Li
2026-12-04 10:10   ` Stephan Gerhold
2026-12-04 11:18     ` Nickolay Goppen
2026-12-04 11:31     ` Nickolay Goppen
2026-12-04 17:06   ` netdev-bot+sashiko
2026-12-03 16:10 ` [PATCH net-next 2/3] net: wwan: qcom_bam_dmux: use DMA transfer size for RX packets Vishnu Santhosh
2026-12-04 10:14   ` Stephan Gerhold
2026-12-04 17:06   ` netdev-bot+sashiko
2026-12-03 16:10 ` [PATCH net-next 3/3] net: wwan: qcom_bam_dmux: enable QMAP if supported by the modem Vishnu Santhosh
2026-12-03 19:22   ` Loic Poulain
2026-12-04 10:42   ` Stephan Gerhold [this message]
2026-12-04 17:06   ` netdev-bot+sashiko

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=axKZCkHIHOrF99GO@linaro.org \
    --to=stephan.gerhold@linaro.org \
    --cc=Frank.Li@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=deepak.singh@oss.qualcomm.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=edumazet@kernel.org \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=stephan@gerhold.net \
    --cc=vishnu.santhosh@oss.qualcomm.com \
    --cc=vkoul@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