DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx5:fix storing the synced MAC to internal table
@ 2020-12-09 13:42 Souvik Dey
  2020-12-09 13:42 ` Souvik Dey
  0 siblings, 1 reply; 5+ messages in thread
From: Souvik Dey @ 2020-12-09 13:42 UTC (permalink / raw)
  To: rasland, matan, shahafs, viacheslavo; +Cc: dev, Souvik Dey

During the mlx5_dev_spawn(), it tries to sync the MAC address of the
Device to the internal MAC table. In case of SR-IOV VF , the 
mlx5_nl_mac_addr_sync() gets, 2 MAC address in the fresh start. 
One the unicast MAC assigned to the VF on the host and the second
the multicast mac of 33:33:00:00:00:01. Currently without check the 
type of MAC we try to add the MAC 33:33:00:00:00:01 to the first free
place in the MAC table which will be mostly index 1, as index 0 stores 
the unicast MAC assigned to the VF. This causes issues subsequently
when we try to add multicast address list. As every IPv6 IP generates 
differnet multicast MAC, to support multiple IP on a single interface, 
we need to add a list of multicast MAC. As an example, if we try to 
add 3 multicast MAC as mentioned below
mcast addr 0 - 33:33:00:00:00:01
mcast addr 1 - 01:00:5e:00:00:01
mcast addr 2 - 33:33:ff:68:fe:7d
then, the addition of these MAC will fail with error -EADDRINUSE in 
mlx5_internal_mac_addr_add(), and none of the MAC address will be 
added to the device, which will lead of packet drop in case multicast
promiscuous is not enable.
To make this work, we should store the synced MAC to the proper section 
of the internal table, after checking the type of the MAC synced. This
check will make the MAC of 33:33:00:00:00:01(synced MAC) to be stored at 
index 128(starting of MLX5_MAX_MC_MAC_ADDRESSES), which will be removed 
and added again during the mlx5_set_mc_addr_list(). This will make sure 
that all the multicast MACs are added properly to both the internal table
and also the device, specially in case of SR-IOV VF.

Souvik Dey (1):
  net/mlx5:fix storing the synced MAC to internal table

 drivers/common/mlx5/linux/mlx5_nl.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

-- 
2.9.3.windows.1


^ permalink raw reply	[flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH] net/mlx5:fix storing the synced MAC to internal table
@ 2020-12-09 15:11 Souvik Dey
  2020-12-09 15:11 ` Souvik Dey
  0 siblings, 1 reply; 5+ messages in thread
From: Souvik Dey @ 2020-12-09 15:11 UTC (permalink / raw)
  To: rasland, matan, shahafs, viacheslavo; +Cc: dev, Souvik Dey

During the mlx5_dev_spawn(), it tries to sync the MAC address of the
Device to the internal MAC table. In case of SR-IOV VF , the 
mlx5_nl_mac_addr_sync() gets, 2 MAC address in the fresh start. 
One the unicast MAC assigned to the VF on the host and the second
the multicast mac of 33:33:00:00:00:01. Currently without check the 
type of MAC we try to add the MAC 33:33:00:00:00:01 to the first free
place in the MAC table which will be mostly index 1, as index 0 stores 
the unicast MAC assigned to the VF. This causes issues subsequently
when we try to add multicast address list. As every IPv6 IP generates 
differnet multicast MAC, to support multiple IP on a single interface, 
we need to add a list of multicast MAC. As an example, if we try to 
add 3 multicast MAC as mentioned below
mcast addr 0 - 33:33:00:00:00:01
mcast addr 1 - 01:00:5e:00:00:01
mcast addr 2 - 33:33:ff:68:fe:7d
then, the addition of these MAC will fail with error -EADDRINUSE in 
mlx5_internal_mac_addr_add(), and none of the MAC address will be 
added to the device, which will lead of packet drop in case multicast
promiscuous is not enable.
To make this work, we should store the synced MAC to the proper section 
of the internal table, after checking the type of the MAC synced. This
check will make the MAC of 33:33:00:00:00:01(synced MAC) to be stored at 
index 128(starting of MLX5_MAX_MC_MAC_ADDRESSES), which will be removed 
and added again during the mlx5_set_mc_addr_list(). This will make sure 
that all the multicast MACs are added properly to both the internal table
and also the device, specially in case of SR-IOV VF.

Souvik Dey (1):
  net/mlx5:fix storing the synced MAC to internal table

 drivers/common/mlx5/linux/mlx5_nl.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)

-- 
2.9.3.windows.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-01-21 16:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-09 13:42 [dpdk-dev] [PATCH] net/mlx5:fix storing the synced MAC to internal table Souvik Dey
2020-12-09 13:42 ` Souvik Dey
2020-12-09 15:11 Souvik Dey
2020-12-09 15:11 ` Souvik Dey
2021-01-21 16:56   ` Slava Ovsiienko

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).