[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20140314.145735.289100032884651109.davem@davemloft.net>
Date: Fri, 14 Mar 2014 14:57:35 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: jeffrey.t.kirsher@...el.com
Cc: emil.s.tantilov@...el.com, netdev@...r.kernel.org,
gospo@...hat.com, sassmann@...hat.com, asharma@...com,
stable@...r.kernel.org
Subject: Re: [net-next 01/16] ixgbe: add check for netif_carrier_ok in
ixgbe_xmit_frame
From: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
Date: Fri, 14 Mar 2014 02:47:11 -0700
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> index 851c413..8bea6ca 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -7121,6 +7121,11 @@ static netdev_tx_t __ixgbe_xmit_frame(struct sk_buff *skb,
> struct ixgbe_adapter *adapter = netdev_priv(netdev);
> struct ixgbe_ring *tx_ring;
>
> + if (!netif_carrier_ok(netdev)) {
> + dev_kfree_skb_any(skb);
> + return NETDEV_TX_OK;
> + }
> +
I would much prefer that this check moves into netpoll's direct invocation of
->ndo_start_xmit().
Otherwise every driver will start to add this check and that kind of
duplication doesn't make any sense at all.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists