~vlad-a/ubuntu/+source/linux/+git/cosmic:mellanox_bluefield

Last commit made on 2018-10-05
Get this branch:
git clone -b mellanox_bluefield https://git.launchpad.net/~vlad-a/ubuntu/+source/linux/+git/cosmic
Only Vladimir Sokolovsky can upload to this branch. If you are Vladimir Sokolovsky please log in for upload directions.

Branch merges

Branch information

Name:
mellanox_bluefield
Repository:
lp:~vlad-a/ubuntu/+source/linux/+git/cosmic

Recent commits

67a46c3... by Eli Cohen <email address hidden>

net/mlx5: E-Switch, Re-read device caps after FDB create/destroy

Re-read device capabilities after eswitch tables are created or
destroyed to reflect capability changes that the firmware may apply, e.g
due to tables created with encap flag set. It required for ECPF since it
creates the FDB before the NIC netdevice is initialized. This change
will allow it to read the correct capabilities.

Signed-off-by: Eli Cohen <email address hidden>

3961ef9... by Eli Cohen <email address hidden>

IB/mlx5: Modify ib_rep to support smartnic model

Modify representors states according to the new scheme. With the new
scheme, a representor can be in on of the following states:
- unregistered
- registered
- enabled
- loaded

Now, that we may have a representor for vport 0, we extend the range of
registered vports to include vport 0 and also ecpf for the case where
the eswitch manager is running on the host.

We also change the prototype of mlx5_ib_get_rep_ibdev() and
mlx5_ib_get_rep_netdev() to accept vport number instead of vport index.
This matches mlx5_eswitch_get_proto_dev() which is used to return the
actual pointer to the device.

Lastly, we add sysfs entries to mlx5 IB devices to show the representor
state and the vport this representor is associated with.

Signed-off-by: Eli Cohen <email address hidden>

ce34f58... by Eli Cohen <email address hidden>

net/mlx5: Update enable_hca dependency

With the introduction of ECPF, where the ECPF can be the page supplier
for a PF, we require that the ECPF driver will call enable/disable HCA
for that PF in the same way a PF does this for its VFs. The PF is still
responsible for calling enable/disable HCA for its VFs.

To distinguish between the ECPF executing enable/disable HCA for itself
or for the PF, it sets the embedded_cpu_function bit in the input params
struct of these commands. When the bit is cleared and func_id is zero,
it refers to the peer PF.

Signed-off-by: Eli Cohen <email address hidden>

0e50d3c... by Eli Cohen <email address hidden>

net/mlx5: E-Switch, Change to switchdev mode on startup for ECPF

For ECPF driver that has eswitch manager capablities, change to eswitch
mode automatically on startup.

Signed-off-by: Eli Cohen <email address hidden>

804166e... by Eli Cohen <email address hidden>

net/mlx5: E-Switch, Selectively apply configuration based on privileges

Since vport 0 is not necessarily the privileged port, use a helper
function to determine is a port is privileged or not.

Signed-off-by: Eli Cohen <email address hidden>

db17a20... by Eli Cohen <email address hidden>

net/mlx5: E-Switch, Use indices to index into vport arrays

Since vport number can no longer act as an index into the vport or
representors arrays, use a function to map vport numbers to indices when
accessing the vports or representors arrays.

Signed-off-by: Eli Cohen <email address hidden>

fc71576... by Eli Cohen <email address hidden>

net/mlx5: E-Switcn, Fix reference to my vport number

Functions referring to vport numbers used to pass 0 as the vport number
argument to denote that they refer to their own vport numbers. So far it
was sufficient but now with ECPF being able to access port 0, this is not
enough anymore. Use real vport number and let the callee encode the
correct values in the command so it refers to the right vport number.

Signed-off-by: Eli Cohen <email address hidden>

b54f59c... by Eli Cohen <email address hidden>

net/mlx5: E-Switch, Modify vport encoding in commands

Commands referring to vports use the following scheme:

1. When referring to my own vport, put 0 in vport and 0 in other_vport.
2. When referring to another vport, put the vport number of the referred
   vport and put 1 in other_vport.

Some functions made use of this knowledge when they wanted to access
their own vport by passing 0. This is not good since it does not allow
to distinguish between the case when ECPF wants to access vport 0 and
the case where a function wants to access its own vport.

This get_other_vport() is defined to return the correct setting for the
other_vport fields and modify the vport_num value to correctly encode
the desired vport number.

Signed-off-by: Eli Cohen <email address hidden>

265e18a... by Eli Cohen <email address hidden>

net/mlx5: E-Switch, Use consistent vport_num argument type

Use u16 for vport number, which matches how hardware refers to this
argument throughout commands.

Signed-off-by: Eli Cohen <email address hidden>

0f2cad3... by Eli Cohen <email address hidden>

net/mlx5: E-Switch, Correctly set eswitch manager vport for smarnic as well

Update the switchdev mode slow path rules to forward packets to/from the
eswitch manager's port which is not necessarily vport 0 (smartnic).

Signed-off-by: Eli Cohen <email address hidden>