* [PATCH net-next 1/2] drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALEN
@ 2012-04-27 7:01 roy.qing.li
2012-04-27 7:01 ` [PATCH net-next 2/2] drivers/net/oki-semi: Donot recompute IP header checksum roy.qing.li
2012-04-29 2:00 ` [PATCH net-next 1/2] drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALEN David Miller
0 siblings, 2 replies; 4+ messages in thread
From: roy.qing.li @ 2012-04-27 7:01 UTC (permalink / raw)
To: netdev
From: RongQing.Li <roy.qing.li@gmail.com>
PCH_GBE_ETH_ALEN is equal to ETH_ALEN, so we can replace it with
ETH_ALEN.
If they are not equal, it must be a bug, since this is ethernet,
and the address has been already stored to mc_addr_list as ETH_ALEN
bytes when call pch_gbe_mac_mc_addr_list_update.
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
.../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 89c6bcf..835e3bb 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -79,7 +79,6 @@ const char pch_driver_version[] = DRV_VERSION;
#define PCH_GBE_PAUSE_PKT4_VALUE 0x01000888
#define PCH_GBE_PAUSE_PKT5_VALUE 0x0000FFFF
-#define PCH_GBE_ETH_ALEN 6
/* This defines the bits that are set in the Interrupt Mask
* Set/Read Register. Each bit is documented below:
@@ -519,7 +518,7 @@ static void pch_gbe_mac_mc_addr_list_update(struct pch_gbe_hw *hw,
if (mc_addr_count) {
pch_gbe_mac_mar_set(hw, mc_addr_list, i);
mc_addr_count--;
- mc_addr_list += PCH_GBE_ETH_ALEN;
+ mc_addr_list += ETH_ALEN;
} else {
/* Clear MAC address mask */
adrmask = ioread32(&hw->reg->ADDR_MASK);
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net-next 2/2] drivers/net/oki-semi: Donot recompute IP header checksum
2012-04-27 7:01 [PATCH net-next 1/2] drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALEN roy.qing.li
@ 2012-04-27 7:01 ` roy.qing.li
2012-04-29 2:00 ` David Miller
2012-04-29 2:00 ` [PATCH net-next 1/2] drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALEN David Miller
1 sibling, 1 reply; 4+ messages in thread
From: roy.qing.li @ 2012-04-27 7:01 UTC (permalink / raw)
To: netdev
From: RongQing.Li <roy.qing.li@gmail.com>
If I understand correct, NETIF_F_IP_CSUM only means the hardware
will compute the TCP/UDP checksum, IP checksum is always computed
in software
So as a workround of hardware unable to compute small packages
checksum, do not need to compute IP header checksum.
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
.../net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index 835e3bb..107f41a 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -1240,8 +1240,6 @@ static void pch_gbe_tx_queue(struct pch_gbe_adapter *adapter,
if (skb->protocol == htons(ETH_P_IP)) {
struct iphdr *iph = ip_hdr(skb);
unsigned int offset;
- iph->check = 0;
- iph->check = ip_fast_csum((u8 *) iph, iph->ihl);
offset = skb_transport_offset(skb);
if (iph->protocol == IPPROTO_TCP) {
skb->csum = 0;
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 1/2] drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALEN
2012-04-27 7:01 [PATCH net-next 1/2] drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALEN roy.qing.li
2012-04-27 7:01 ` [PATCH net-next 2/2] drivers/net/oki-semi: Donot recompute IP header checksum roy.qing.li
@ 2012-04-29 2:00 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2012-04-29 2:00 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev
From: roy.qing.li@gmail.com
Date: Fri, 27 Apr 2012 15:01:12 +0800
> From: RongQing.Li <roy.qing.li@gmail.com>
>
> PCH_GBE_ETH_ALEN is equal to ETH_ALEN, so we can replace it with
> ETH_ALEN.
>
> If they are not equal, it must be a bug, since this is ethernet,
> and the address has been already stored to mc_addr_list as ETH_ALEN
> bytes when call pch_gbe_mac_mc_addr_list_update.
>
> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-next 2/2] drivers/net/oki-semi: Donot recompute IP header checksum
2012-04-27 7:01 ` [PATCH net-next 2/2] drivers/net/oki-semi: Donot recompute IP header checksum roy.qing.li
@ 2012-04-29 2:00 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-04-29 2:00 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev
From: roy.qing.li@gmail.com
Date: Fri, 27 Apr 2012 15:01:13 +0800
> From: RongQing.Li <roy.qing.li@gmail.com>
>
> If I understand correct, NETIF_F_IP_CSUM only means the hardware
> will compute the TCP/UDP checksum, IP checksum is always computed
> in software
>
> So as a workround of hardware unable to compute small packages
> checksum, do not need to compute IP header checksum.
>
> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-29 2:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-27 7:01 [PATCH net-next 1/2] drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALEN roy.qing.li
2012-04-27 7:01 ` [PATCH net-next 2/2] drivers/net/oki-semi: Donot recompute IP header checksum roy.qing.li
2012-04-29 2:00 ` David Miller
2012-04-29 2:00 ` [PATCH net-next 1/2] drivers/net/oki-semi: Remove the definition of PCH_GBE_ETH_ALEN David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.