netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Mikityanskiy <maxtram95@gmail.com>
To: "Stanisław Czech" <s.czech@nowatel.com>
Cc: netdev@vger.kernel.org, Gal Pressman <gal@nvidia.com>,
	Tariq Toukan <tariqt@nvidia.com>
Subject: Re: htb offload on vlan (mlx5)
Date: Mon, 6 Mar 2023 16:25:00 +0200	[thread overview]
Message-ID: <ZAX3vAu8QEbKOz5t@mail.gmail.com> (raw)
In-Reply-To: <425d50fa-9915-6eb7-609c-0e6a5373870a@nowatel.com>

On Mon, Mar 06, 2023 at 02:59:40PM +0100, Stanisław Czech wrote:
> 06.03.2023  10:35, Maxim Mikityanskiy wrote:
> > That's expected, vlan_features doesn't contain NETIF_F_HW_TC, and I
> > think that's the case for all drivers. Regarding HTB offload, I don't
> > think the current implementation in mlx5e can be easily modified to
> > support being attached to a VLAN only, because the current
> > implementation relies on objects created globally in the NIC.
> > 
> > CCed Nvidia folks in case they have more comments.
> > 
> 
> Thank you for you answer Maxim... I tried to use SR IOV and use the HTB
> offload functionality on the VF
> but it's not possible either:
> 
> ethtool -K enp1s0np0 hw-tc-offload  on
> echo 7 > /sys/class/infiniband/mlx5_0/device/mlx5_num_vfs
> ethtool -K enp1s0f7v6 hw-tc-offload  on
> 
> ip l s dev enp1s0np0 name eth0
> ip l s dev eth0 vf 6 vlan 4
> 
> and I see in
> ethtool -k eth0
> hw-tc-offload: on
> 
> but still:
> Error: mlx5_core: Missing QoS capabilities. Try disabling SRIOV or use a
> supported device.
> 
> So I guess there is no way to use HTB offloading anywhere else than on the
> PF device itself...

Yes, as the error message suggests, when SRIOV is enabled, the firmware
doesn't expose the needed capabilities for HTB offload. That means these
two features aren't compatible at the moment, and there is nothing the
driver could do, because the limitation comes from the firmware side.

> 
> Anyway, maybe using multiple VFS to support multiple VLANs (single VF for
> single vlan) would
> be more efficent than simple vlans on PF interface (regarding qdisc lock
> problem) ?

You mean with non-offloaded HTB? You might try, but there will still be
the lock contention issue in case of multiple queues. There will be
multiple locks, though (one per VF), which might alleviate the
contention, but there are too many variables to guess without actually
testing it. It also depends on how many VLANs you have, because each VF
has its memory footprint. It also may be worth looking at SFs, which are
lighter than VFs.

> I would like to utilize more CPU cores as the vlans on a single PF interface
> use only a single
> cpu core ( the 100% ksoftirqd problem)
> 
> Could this be some workaround?
> 
> 
> Greetings,
> *Stanisław Czech*
> 

      reply	other threads:[~2023-03-06 14:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03 18:04 htb offload on vlan (mlx5) Stanisław Czech
2023-03-06  9:35 ` Maxim Mikityanskiy
2023-03-06 13:59   ` Stanisław Czech
2023-03-06 14:25     ` Maxim Mikityanskiy [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=ZAX3vAu8QEbKOz5t@mail.gmail.com \
    --to=maxtram95@gmail.com \
    --cc=gal@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=s.czech@nowatel.com \
    --cc=tariqt@nvidia.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 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).