Author: kib
Date: Wed Mar 18 22:44:48 2020
New Revision: 359105
URL: https://svnweb.freebsd.org/changeset/base/359105

Log:
  mlx5: Route NIC_VPORT_CHANGE events to eswitch code.
  
  Reviewed by:  hselasky
  Sponsored by: Mellanox Technologies
  MFC after:    2 weeks

Modified:
  head/sys/dev/mlx5/mlx5_core/mlx5_eq.c

Modified: head/sys/dev/mlx5/mlx5_core/mlx5_eq.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_core/mlx5_eq.c       Wed Mar 18 22:43:39 2020        
(r359104)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_eq.c       Wed Mar 18 22:44:48 2020        
(r359105)
@@ -31,6 +31,7 @@
 #include <dev/mlx5/mlx5_ifc.h>
 #include <dev/mlx5/mlx5_fpga/core.h>
 #include "mlx5_core.h"
+#include "eswitch.h"
 
 #include "opt_rss.h"
 
@@ -65,7 +66,8 @@ enum {
                               (1ull << MLX5_EVENT_TYPE_PORT_CHANGE)        | \
                               (1ull << MLX5_EVENT_TYPE_SRQ_CATAS_ERROR)    | \
                               (1ull << MLX5_EVENT_TYPE_SRQ_LAST_WQE)       | \
-                              (1ull << MLX5_EVENT_TYPE_SRQ_RQ_LIMIT))
+                              (1ull << MLX5_EVENT_TYPE_SRQ_RQ_LIMIT)       | \
+                              (1ull << MLX5_EVENT_TYPE_NIC_VPORT_CHANGE))
 
 struct map_eq_in {
        u64     mask;
@@ -353,6 +355,9 @@ static int mlx5_eq_int(struct mlx5_core_dev *dev, stru
                                             MLX5_DEV_EVENT_VPORT_CHANGE,
                                             (unsigned long)vport_num);
                        }
+                       if (dev->priv.eswitch != NULL)
+                               mlx5_eswitch_vport_event(dev->priv.eswitch,
+                                   eqe);
                        break;
 
                case MLX5_EVENT_TYPE_FPGA_ERROR:
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to