Re: mlx5en issue with SR-IOV when using in the bridge

2024-02-12 Thread Benoit Chesneau
OK . I guesss it's about porting some parts from the linux driver, but the code 
is slightly different today..

Is there any card that support correctly SR-IOV ? chelsio (but i don't know 
where to source them) ? Intel ?

Benoît
On Monday, February 12th, 2024 at 10:54, Konstantin Belousov 
 wrote:

> On Mon, Feb 12, 2024 at 08:30:37AM +, Benoit Chesneau wrote:
>
> > Hi Konstantin,
> >
> > indeed the port is plugged to a switch. The port is enabled. So yes that 
> > probably is. Is this a firmware issue or can it be solved in the driver?
>
> It is driver issue, and requires some (significant) driver updates.
>
> > Benoît
> >
> > On Sunday, February 11th, 2024 at 04:50, Konstantin Belousov 
> > kostik...@gmail.com wrote:
> >
> > > On Sat, Feb 10, 2024 at 09:23:36AM +, Benoit Chesneau wrote:
> > >
> > > > I have tested the following scenario:
> > > >
> > > > Setup the mellanox driver with SRIOV:
> > > >
> > > > ```
> > > > $ sudo more /etc/iov/mce0.conf
> > > > PF {
> > > > device: "mlx5_core0";
> > > > num_vfs: 8;
> > > > }
> > > >
> > > > DEFAULT {
> > > > passthrough: true;
> > > > }
> > > >
> > > > VF-0 {
> > > > mac-addr: "02:01:02:02:01:00";
> > > > }
> > > >
> > > > VF-1 {
> > > > mac-addr: "02:01:02:02:01:01";
> > > > }
> > > >
> > > > VF-2 {
> > > > passthrough: false;}
> > > >
> > > > ```
> > > >
> > > > With one VF in the vm answering to a specific vlan, and one jail on the 
> > > > host using vnet with the PF in a bridge and a epair interface added to 
> > > > this bridge.
> > > >
> > > > When I am pinging from the jail to the VF in the vm , the vm receive 
> > > > the ping or arp requests. But the jail doesn't receive the response. In 
> > > > a same manner , when I ping from the VM to the jail, the host is not 
> > > > found. bridge arp doesn't return the vm mac address.
> > > >
> > > > All the hosts has the PF interface set in promiscuous mode but this 
> > > > doesn't seem to be enough to allows the bridge to learn other mac ids. 
> > > > When I directly add the IP to PF, Ping works from the vm to the PF, the 
> > > > reverse is also true.
> > > >
> > > > Do I miss a setting? Is this expected with mellanox cards? What shoudl 
> > > > I look for?
> > >
> > > Do you have the port plugged into a switch and the port enabled?
> > > I suspect VFs do not have enough hairpin code to do proper loopback
> > > communications, and I certain that multicast loopback does not work.



Re: mlx5en issue with SR-IOV when using in the bridge

2024-02-12 Thread Benoit Chesneau
Hi Konstantin,

indeed the port is plugged to a switch. The port is enabled. So yes that 
probably is. Is this a firmware issue or can it be solved in the driver?


Benoît

On Sunday, February 11th, 2024 at 04:50, Konstantin Belousov 
 wrote:

> On Sat, Feb 10, 2024 at 09:23:36AM +, Benoit Chesneau wrote:
> 
> > I have tested the following scenario:
> > 
> > Setup the mellanox driver with SRIOV:
> > 
> > ```
> > $ sudo more /etc/iov/mce0.conf
> > PF {
> > device: "mlx5_core0";
> > num_vfs: 8;
> > }
> > 
> > DEFAULT {
> > passthrough: true;
> > }
> > 
> > VF-0 {
> > mac-addr: "02:01:02:02:01:00";
> > }
> > 
> > VF-1 {
> > mac-addr: "02:01:02:02:01:01";
> > }
> > 
> > VF-2 {
> > passthrough: false;}
> > 
> > ```
> > 
> > With one VF in the vm answering to a specific vlan, and one jail on the 
> > host using vnet with the PF in a bridge and a epair interface added to this 
> > bridge.
> > 
> > When I am pinging from the jail to the VF in the vm , the vm receive the 
> > ping or arp requests. But the jail doesn't receive the response. In a same 
> > manner , when I ping from the VM to the jail, the host is not found. bridge 
> > arp doesn't return the vm mac address.
> > 
> > All the hosts has the PF interface set in promiscuous mode but this doesn't 
> > seem to be enough to allows the bridge to learn other mac ids. When I 
> > directly add the IP to PF, Ping works from the vm to the PF, the reverse is 
> > also true.
> > 
> > Do I miss a setting? Is this expected with mellanox cards? What shoudl I 
> > look for?
> 
> 
> Do you have the port plugged into a switch and the port enabled?
> I suspect VFs do not have enough hairpin code to do proper loopback
> communications, and I certain that multicast loopback does not work.



mlx5en issue with SR-IOV when using in the bridge

2024-02-10 Thread Benoit Chesneau
I have tested the following scenario:

Setup the mellanox driver with SRIOV:

```
$ sudo more /etc/iov/mce0.conf
PF {
device: "mlx5_core0";
num_vfs: 8;
}

DEFAULT {
passthrough: true;
}

VF-0 {
mac-addr: "02:01:02:02:01:00";
}

VF-1 {
mac-addr: "02:01:02:02:01:01";
}

VF-2 {
passthrough: false;}

```

With one VF in the vm answering to a specific vlan, and one jail on the host 
using vnet with the PF in a bridge and a epair interface added to this bridge.

When I am pinging from the jail to the VF in the vm , the vm receive the ping 
or arp requests. But the jail doesn't receive the response. In a same manner , 
when I ping from the VM to the jail, the host is not found. bridge arp doesn't 
return the vm mac address.

All the hosts has the PF interface set in promiscuous mode but this doesn't 
seem to be enough to allows the bridge to learn other mac ids. When I directly 
add the IP to PF, Ping works from the vm to the PF, the reverse is also true.

Do I miss a setting? Is this expected with mellanox cards? What shoudl I look 
for?

Benoît