From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: "Subash Abhinov Kasiviswanathan (KS)" <quic_subashab@quicinc.com>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, netdev@vger.kernel.org, lkp@intel.com
Cc: Sean Tranchetti <quic_stranche@quicinc.com>
Subject: Re: [PATCH net-next v2] net: qualcomm: rmnet: Add side band flow control support
Date: Thu, 28 Sep 2023 08:51:17 +0100 [thread overview]
Message-ID: <6bb95279-156d-220c-c294-891c92ca5fd4@linux.dev> (raw)
In-Reply-To: <1f0069a7-8581-acc0-1ab8-bd5dd95cdb49@quicinc.com>
On 28.09.2023 04:31, Subash Abhinov Kasiviswanathan (KS) wrote:
>
>
> On 9/27/2023 6:12 PM, Vadim Fedorenko wrote:
>> On 26/09/2023 19:24, Subash Abhinov Kasiviswanathan wrote:
>>> Individual rmnet devices map to specific network types such as internet,
>>> multimedia messaging services, IP multimedia subsystem etc. Each of
>>> these network types may support varying quality of service for different
>>> bearers or traffic types.
>>>
>>
>>> +static u16 rmnet_vnd_select_queue(struct net_device *dev,
>>> + struct sk_buff *skb,
>>> + struct net_device *sb_dev)
>>> +{
>>> + struct rmnet_priv *priv = netdev_priv(dev);
>>> + void *p = xa_load(&priv->queue_map, skb->mark);
>>
>> Reverse X-mas tree, please.
>
> We need to get priv first though. Alternatively, i could do the following but it
> is just more verbose for the sake of the formatting.
>
> struct rmnet_priv *priv;
> void *p;
>
> priv = netdev_priv(dev);
> p = xa_load(&priv->queue_map, skb->mark);
I think you can move xa_load only.
>
>>
>>> + u8 txq;
>>> +
>>> + if (!p || !xa_is_value(p))
>>> + return 0;
>>> +
>>> + txq = xa_to_value(p);
>>> +
>>> + netdev_dbg(dev, "mark %08x -> txq %02x\n", skb->mark, txq);
>>> + return txq;
>>> +}
>>> +
>>
>>
prev parent reply other threads:[~2023-09-28 7:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 18:24 [PATCH net-next v2] net: qualcomm: rmnet: Add side band flow control support Subash Abhinov Kasiviswanathan
2023-09-28 0:12 ` Vadim Fedorenko
2023-09-28 3:31 ` Subash Abhinov Kasiviswanathan (KS)
2023-09-28 7:51 ` Vadim Fedorenko [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=6bb95279-156d-220c-c294-891c92ca5fd4@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=lkp@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_stranche@quicinc.com \
--cc=quic_subashab@quicinc.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.