]> git.baikalelectronics.ru Git - kernel.git/commit
ice: Correctly deal with PFs that do not support RDMA
authorDave Ertman <david.m.ertman@intel.com>
Thu, 9 Sep 2021 15:12:23 +0000 (08:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Sep 2021 08:58:55 +0000 (09:58 +0100)
commit5df6da50e87bad6d1edf96ac104a4e04df09a560
tree94b10b464fd5764a8e136f889ac4a026b20eacd9
parent2a86d780a719ae6d5b6dce009a41d0b325b2b7ad
ice: Correctly deal with PFs that do not support RDMA

There are two cases where the current PF does not support RDMA
functionality.  The first is if the NVM loaded on the device is set
to not support RDMA (common_caps.rdma is false).  The second is if
the kernel bonding driver has included the current PF in an active
link aggregate.

When the driver has determined that this PF does not support RDMA, then
auxiliary devices should not be created on the auxiliary bus.  Without
a device on the auxiliary bus, even if the irdma driver is present, there
will be no RDMA activity attempted on this PF.

Currently, in the reset flow, an attempt to create auxiliary devices is
performed without regard to the ability of the PF.  There needs to be a
check in ice_aux_plug_dev (as the central point that creates auxiliary
devices) to see if the PF is in a state to support the functionality.

When disabling and re-enabling RDMA due to the inclusion/removal of the PF
in a link aggregate, we also need to set/clear the bit which controls
auxiliary device creation so that a reset recovery in a link aggregate
situation doesn't try to create auxiliary devices when it shouldn't.

Fixes: 142c9cadb44c ("ice: Register auxiliary device to provide RDMA")
Reported-by: Yongxin Liu <yongxin.liu@windriver.com>
Signed-off-by: Dave Ertman <david.m.ertman@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_idc.c