ixgbe: Add warning when no space left for more MAC filters
authorGreg Rose <gregory.v.rose@intel.com>
Thu, 5 Jan 2012 07:58:11 +0000 (07:58 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 3 Feb 2012 11:05:36 +0000 (03:05 -0800)
Send message to system log when the VF requests another MAC filter
but there is no space left on the device for it.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Robert E Garrett <robertX.e.garrett@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c

index b76339be8a66805d8ad1d857df127932f06eddaf..8d8cdbc22df0f4df4cd65979fa9d0f9b11540f10 100644 (file)
@@ -646,6 +646,9 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)
                        ixgbe_ndo_set_vf_spoofchk(adapter->netdev, vf, false);
                retval = ixgbe_set_vf_macvlan(adapter, vf, index,
                                              (unsigned char *)(&msgbuf[1]));
+               if (retval == -ENOSPC)
+                       e_warn(drv, "VF %d has requested a MACVLAN filter "
+                                   "but there is no space for it\n", vf);
                break;
        default:
                e_err(drv, "Unhandled Msg %8.8x\n", msgbuf[0]);