All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Poirier <benjamin.poirier@gmail.com>
To: Shane Miller <gshanemiller6@gmail.com>
Cc: Jiri Pirko <jiri@resnulli.us>, netdev@vger.kernel.org
Subject: Re: SR-IOV + switchdev + vlan + Mellanox: Cannot ping
Date: Wed, 1 May 2024 14:16:41 -0400	[thread overview]
Message-ID: <ZjKHCTe9j4tAg7yp@f4> (raw)
In-Reply-To: <CAFtQo5B5oveWMr9PoUEmFnsbxwjQbxtHDcFpsUg646=Z__fJtw@mail.gmail.com>

On 2024-04-30 17:29 -0400, Shane Miller wrote:
> On Mon, Apr 29, 2024 at 7:29 AM Jiri Pirko <jiri@resnulli.us> wrote:
> > Nope. Think of it as another switch inside the NIC that connects VFs and
> > uplink port. You have representors that represent the switch port. Each
> > representor has counter part VF. You have to configure the forwarding
> > between the representor, similar to switch ports. In switch, there is
> > also no default forwarding.
> 
> The salient phrase is "forward between the representor". You seem to
> be saying to forward ARP packets from the uplink port (ieth3 e.g.
> the NIC that was virtualized) to a port representer (ieth3r0)? Are those
> the correct endpoints?
> 
> Second, what UNIX tool do I use to forward? As far as I can tell, the
> correct methodology is to first create a bridge:
> 
>     ip link add name br0 type bridge
>     ip link set br0 up
> 

I recently learned about this too and here is what I noted down:

In switchdev mode, two netdevs are created for each VF:
1) port representor (PR)
	`ethtool -i` shows "driver: mlx5e_rep"
	sysfs device/ is the PF
	`devlink port` shows "flavour pcivf"
2) actual VF
	driver: mlx5_core
	sysfs device/ is unique
	`devlink port` shows "flavour virtual"

In order to be able to pass traffic, the PR must be added into a bridge
with the PF:
ip link add br0 up type bridge
ip link set dev eth2 up master br0  # PF
ip link set dev eth4 up master br0  # PR

      reply	other threads:[~2024-05-01 18:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 20:35 SR-IOV + switchdev + vlan + Mellanox: Cannot ping Shane Miller
2024-04-27 10:26 ` Jiri Pirko
2024-04-28 20:24   ` Shane Miller
2024-04-29 11:29     ` Jiri Pirko
2024-04-30 21:29       ` Shane Miller
2024-05-01 18:16         ` Benjamin Poirier [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=ZjKHCTe9j4tAg7yp@f4 \
    --to=benjamin.poirier@gmail.com \
    --cc=gshanemiller6@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.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 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.