From: Joe Jin Date: Thu, 17 May 2012 14:46:20 +0000 (+0800) Subject: ixgbe: Add warning when no space left for more MAC filters X-Git-Tag: v2.6.39-400.9.0~423^2~19^2~11^2~126 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=ae7effe76176ae41152b85d08e3ba3363ba00745;p=users%2Fjedix%2Flinux-maple.git ixgbe: Add warning when no space left for more MAC filters Send message to system log when the VF requests another MAC filter but there is no space left on the device for it. (backported from commit 68d6d4ab9a963cfaece88f9b4ea23be517ce46b0) Signed-off-by: Greg Rose Tested-by: Robert E Garrett Signed-off-by: Jeff Kirsher Signed-off-by: Joe Jin --- diff --git a/drivers/net/ixgbe/ixgbe_sriov.c b/drivers/net/ixgbe/ixgbe_sriov.c index ad4114f44b695..14c3d475fd803 100644 --- a/drivers/net/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ixgbe/ixgbe_sriov.c @@ -642,6 +642,9 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf) } 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]);