* [PATCH] e1000: remove the check: skb->len<=0
@ 2014-05-13 5:07 xuyongjiande
2014-05-13 14:57 ` [E1000-devel] " Ronciak, John
0 siblings, 1 reply; 3+ messages in thread
From: xuyongjiande @ 2014-05-13 5:07 UTC (permalink / raw)
To: eric.dumazet; +Cc: e1000-devel, netdev, linux-kernel, Yongjian Xu
From: Yongjian Xu <xuyongjiande@gmail.com>
There is no case skb->len would be 0 or 'negative'.
Remove the check.
Signed-off-by: Yongjian Xu <xuyongjiande@gmail.com>
---
drivers/net/ethernet/intel/e1000/e1000_main.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c b/drivers/net/ethernet/intel/e1000/e1000_main.c
index 27058df..660971f 100644
--- a/drivers/net/ethernet/intel/e1000/e1000_main.c
+++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
@@ -3105,11 +3105,6 @@ static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb,
*/
tx_ring = adapter->tx_ring;
- if (unlikely(skb->len <= 0)) {
- dev_kfree_skb_any(skb);
- return NETDEV_TX_OK;
- }
-
/* On PCI/PCI-X HW, if packet size is less than ETH_ZLEN,
* packets may get corrupted during padding by HW.
* To WA this issue, pad all small packets manually.
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [E1000-devel] [PATCH] e1000: remove the check: skb->len<=0
2014-05-13 5:07 [PATCH] e1000: remove the check: skb->len<=0 xuyongjiande
@ 2014-05-13 14:57 ` Ronciak, John
2014-05-14 1:25 ` 徐永健
0 siblings, 1 reply; 3+ messages in thread
From: Ronciak, John @ 2014-05-13 14:57 UTC (permalink / raw)
To: xuyongjiande, eric.dumazet; +Cc: e1000-devel, netdev, linux-kernel
> -----Original Message-----
> From: xuyongjiande@gmail.com [mailto:xuyongjiande@gmail.com]
> Sent: Monday, May 12, 2014 10:07 PM
> To: eric.dumazet@gmail.com
> Cc: e1000-devel@lists.sourceforge.net; netdev@vger.kernel.org; linux-
> kernel@vger.kernel.org; Yongjian Xu
> Subject: [E1000-devel] [PATCH] e1000: remove the check: skb->len<=0
>
> From: Yongjian Xu <xuyongjiande@gmail.com>
>
> There is no case skb->len would be 0 or 'negative'.
> Remove the check.
>
> Signed-off-by: Yongjian Xu <xuyongjiande@gmail.com>
> ---
> drivers/net/ethernet/intel/e1000/e1000_main.c | 5 -----
> 1 file changed, 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c
> b/drivers/net/ethernet/intel/e1000/e1000_main.c
> index 27058df..660971f 100644
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -3105,11 +3105,6 @@ static netdev_tx_t e1000_xmit_frame(struct
> sk_buff *skb,
> */
> tx_ring = adapter->tx_ring;
>
> - if (unlikely(skb->len <= 0)) {
> - dev_kfree_skb_any(skb);
> - return NETDEV_TX_OK;
> - }
> -
> /* On PCI/PCI-X HW, if packet size is less than ETH_ZLEN,
> * packets may get corrupted during padding by HW.
> * To WA this issue, pad all small packets manually.
> --
> 1.9.1
What is the exact problem that this is fixing? Did you have a test case that showed a problem with it?
Cheers,
John
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [E1000-devel] [PATCH] e1000: remove the check: skb->len<=0
2014-05-13 14:57 ` [E1000-devel] " Ronciak, John
@ 2014-05-14 1:25 ` 徐永健
0 siblings, 0 replies; 3+ messages in thread
From: 徐永健 @ 2014-05-14 1:25 UTC (permalink / raw)
To: Ronciak, John; +Cc: eric.dumazet, e1000-devel, netdev, linux-kernel
The check is not right, it should be "(int)(skb->len) <= 0", or we
just remove this check if "skb->len will never be negative or 0".
2014-05-13 22:57 GMT+08:00 Ronciak, John <john.ronciak@intel.com>:
>> -----Original Message-----
>> From: xuyongjiande@gmail.com [mailto:xuyongjiande@gmail.com]
>> Sent: Monday, May 12, 2014 10:07 PM
>> To: eric.dumazet@gmail.com
>> Cc: e1000-devel@lists.sourceforge.net; netdev@vger.kernel.org; linux-
>> kernel@vger.kernel.org; Yongjian Xu
>> Subject: [E1000-devel] [PATCH] e1000: remove the check: skb->len<=0
>>
>> From: Yongjian Xu <xuyongjiande@gmail.com>
>>
>> There is no case skb->len would be 0 or 'negative'.
>> Remove the check.
>>
>> Signed-off-by: Yongjian Xu <xuyongjiande@gmail.com>
>> ---
>> drivers/net/ethernet/intel/e1000/e1000_main.c | 5 -----
>> 1 file changed, 5 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/intel/e1000/e1000_main.c
>> b/drivers/net/ethernet/intel/e1000/e1000_main.c
>> index 27058df..660971f 100644
>> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
>> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
>> @@ -3105,11 +3105,6 @@ static netdev_tx_t e1000_xmit_frame(struct
>> sk_buff *skb,
>> */
>> tx_ring = adapter->tx_ring;
>>
>> - if (unlikely(skb->len <= 0)) {
>> - dev_kfree_skb_any(skb);
>> - return NETDEV_TX_OK;
>> - }
>> -
>> /* On PCI/PCI-X HW, if packet size is less than ETH_ZLEN,
>> * packets may get corrupted during padding by HW.
>> * To WA this issue, pad all small packets manually.
>> --
>> 1.9.1
> What is the exact problem that this is fixing? Did you have a test case that showed a problem with it?
>
> Cheers,
> John
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-14 1:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-13 5:07 [PATCH] e1000: remove the check: skb->len<=0 xuyongjiande
2014-05-13 14:57 ` [E1000-devel] " Ronciak, John
2014-05-14 1:25 ` 徐永健
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).