lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Thu, 28 Sep 2023 08:51:17 +0100
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
To: "Subash Abhinov Kasiviswanathan (KS)" <quic_subashab@...cinc.com>,
 davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
 pabeni@...hat.com, netdev@...r.kernel.org, lkp@...el.com
Cc: Sean Tranchetti <quic_stranche@...cinc.com>
Subject: Re: [PATCH net-next v2] net: qualcomm: rmnet: Add side band flow
 control support

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;
>>> +}
>>> +
>>
>>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ