From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 2/2 net-next] ixgbe: remove xmit length check Date: Mon, 18 Jun 2012 11:55:58 -0700 Message-ID: <20120618115558.1ef26a48@nehalam.linuxnetplumber.net> References: <20120618105816.5fdd0b90@nehalam.linuxnetplumber.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, "David S. Miller" To: Bruce Allan , Carolyn Wyborny , Don Skidmore , Greg Rose , Peter P Waskiewicz Jr , Alex Duyck Return-path: In-Reply-To: <20120618105816.5fdd0b90@nehalam.linuxnetplumber.net> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: e1000-devel-bounces@lists.sourceforge.net List-Id: netdev.vger.kernel.org The check here is bogus. Since len is unsigned, it can never be negative. And it would be a bug in network stack to ever send a zero length packet to device. Signed-off-by: Stephen Hemminger --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 2012-06-18 10:53:13.742310994 -0700 +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c 2012-06-18 10:53:15.962279249 -0700 @@ -6380,11 +6380,6 @@ static netdev_tx_t ixgbe_xmit_frame(stru struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_ring *tx_ring; - if (skb->len <= 0) { - dev_kfree_skb_any(skb); - return NETDEV_TX_OK; - } - /* * The minimum packet size for olinfo paylen is 17 so pad the skb * in order to meet this minimum size requirement. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ E1000-devel mailing list E1000-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/e1000-devel To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired