netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Saeed Mahameed <saeedm@mellanox.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: max channels for mlx5
Date: Mon, 4 May 2020 17:04:21 -0600	[thread overview]
Message-ID: <f11d1ff2-b16b-37d3-0e17-4a051c29a9b5@gmail.com> (raw)
In-Reply-To: <2f5110e579a21737e5c13b23482eff6fdb6f3808.camel@mellanox.com>

On 5/4/20 3:46 PM, Saeed Mahameed wrote:
> what is the amount of msix avaiable for eth0 port ?
> 
> businfo=$(ethtool -i eth0 | grep bus-info | cut -d":" -f2-)
> cat /proc/interrupts | grep $businfo | wc -l

64

> 
> So if number of msix is 64, we can only use 63 for data path
> completions .. 
> 
> do you have sriov enabled ? 

no

> 
> what is the FW version you have ?

$ ethtool -i eth0
driver: mlx5_core
version: 5.0-0
firmware-version: 14.27.1016 (MT_2420110034)

> we need to figure out if this is a system MSIX limitation or a FW
> limitation.
> 
>> A side effect of this limit is XDP_REDIRECT drops packets if a vhost
>> thread gets scheduled on cpus 64 and up since the tx queue is based
>> on
>> processor id:
>>
>> int mlx5e_xdp_xmit(struct net_device *dev, int n, struct xdp_frame
>> **frames,
>>                    u32 flags)
>> {
>> 	...
>>         sq_num = smp_processor_id();
>>         if (unlikely(sq_num >= priv->channels.num))
>>                 return -ENXIO;
>>
>> So in my example if the redirect happens on cpus 64-95, which is 1/3
>> of
>> my hardware threads, the packet is just dropped.
>>
> 
> Know XDP redirect issue,  you need to tune the RSS and affinity on RX
> side and match TX count and affinity on TX side, so you won't end up on
> a wrong CPU on the TX side

Understood for port to port redirect.

This use case is a virtual machine with a tap device + vhost bypassing
host kernel stack and redirecting to a port. Losing a third of the cpus
for vhost threads is a huge limitation.

      reply	other threads:[~2020-05-04 23:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04  0:41 max channels for mlx5 David Ahern
2020-05-04 21:46 ` Saeed Mahameed
2020-05-04 23:04   ` David Ahern [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=f11d1ff2-b16b-37d3-0e17-4a051c29a9b5@gmail.com \
    --to=dsahern@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.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).