Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10901
b: refs/heads/master
c: fc228a0
h: refs/heads/master
i:
  10899: dd3c1a3
v: v3
  • Loading branch information
Arnaldo Carvalho de Melo committed Oct 29, 2005
1 parent 638f559 commit b13b7aa
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a212ab6b8a4ccc6f3c3d1beba5f92655c576404
refs/heads/master: fc228a04a4c01bbb2f898e180a14f9a976001f79
2 changes: 1 addition & 1 deletion trunk/Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ tcp_tso_win_divisor - INTEGER
can be consumed by a single TSO frame.
The setting of this parameter is a choice between burstiness and
building larger TSO frames.
Default: 8
Default: 3

tcp_frto - BOOLEAN
Enables F-RTO, an enhanced recovery algorithm for TCP retransmission
Expand Down
16 changes: 16 additions & 0 deletions trunk/include/linux/etherdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,22 @@ static inline void random_ether_addr(u8 *addr)
addr [0] &= 0xfe; /* clear multicast bit */
addr [0] |= 0x02; /* set local assignment bit (IEEE802) */
}

/**
* compare_ether_addr - Compare two Ethernet addresses
* @addr1: Pointer to a six-byte array containing the Ethernet address
* @addr2 Pointer other six-byte array containing the Ethernet address
*
* Compare two ethernet addresses, returns 0 if equal
*/
static inline unsigned compare_ether_addr(const u8 *_a, const u8 *_b)
{
const u16 *a = (const u16 *) _a;
const u16 *b = (const u16 *) _b;

BUILD_BUG_ON(ETH_ALEN != 6);
return ((a[0] ^ b[0]) | (a[1] ^ b[1]) | (a[2] ^ b[2])) != 0;
}
#endif /* __KERNEL__ */

#endif /* _LINUX_ETHERDEVICE_H */
17 changes: 2 additions & 15 deletions trunk/net/ethernet/eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,19 +146,6 @@ int eth_rebuild_header(struct sk_buff *skb)
return 0;
}

static inline unsigned int compare_eth_addr(const unsigned char *__a, const unsigned char *__b)
{
const unsigned short *dest = (unsigned short *) __a;
const unsigned short *devaddr = (unsigned short *) __b;
unsigned int res;

BUILD_BUG_ON(ETH_ALEN != 6);
res = ((dest[0] ^ devaddr[0]) |
(dest[1] ^ devaddr[1]) |
(dest[2] ^ devaddr[2])) != 0;

return res;
}

/*
* Determine the packet's protocol ID. The rule here is that we
Expand All @@ -176,7 +163,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
eth = eth_hdr(skb);

if (*eth->h_dest&1) {
if (!compare_eth_addr(eth->h_dest, dev->broadcast))
if (!compare_ether_addr(eth->h_dest, dev->broadcast))
skb->pkt_type = PACKET_BROADCAST;
else
skb->pkt_type = PACKET_MULTICAST;
Expand All @@ -191,7 +178,7 @@ __be16 eth_type_trans(struct sk_buff *skb, struct net_device *dev)
*/

else if(1 /*dev->flags&IFF_PROMISC*/) {
if (unlikely(compare_eth_addr(eth->h_dest, dev->dev_addr)))
if (unlikely(compare_ether_addr(eth->h_dest, dev->dev_addr)))
skb->pkt_type = PACKET_OTHERHOST;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/ipv4/fib_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ static int fib_inetaddr_event(struct notifier_block *this, unsigned long event,
break;
case NETDEV_DOWN:
fib_del_ifaddr(ifa);
if (ifa->ifa_dev && ifa->ifa_dev->ifa_list == NULL) {
if (ifa->ifa_dev->ifa_list == NULL) {
/* Last address was deleted from this interface.
Disable IP.
*/
Expand Down

0 comments on commit b13b7aa

Please sign in to comment.