Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6:
[IPV4]: Remove IPVS icmp hack from route.c for now.
[IPV4]: Correct rp_filter help text.
[TCP]: TCP_CONG_YEAH requires TCP_CONG_VEGAS
[TCP] slow start: Make comments and code logic clearer.
[BLUETOOTH]: Fix locking in hci_sock_dev_event().
[NET]: Fix BMSR_100{HALF,FULL}2 defines in linux/mii.h
[NET]: lockdep classes in register_netdevice

+102 -26
+2 -2
include/linux/mii.h
··· 56 56 #define BMSR_ANEGCOMPLETE 0x0020 /* Auto-negotiation complete */ 57 57 #define BMSR_RESV 0x00c0 /* Unused... */ 58 58 #define BMSR_ESTATEN 0x0100 /* Extended Status in R15 */ 59 - #define BMSR_100FULL2 0x0200 /* Can do 100BASE-T2 HDX */ 60 - #define BMSR_100HALF2 0x0400 /* Can do 100BASE-T2 FDX */ 59 + #define BMSR_100HALF2 0x0200 /* Can do 100BASE-T2 HDX */ 60 + #define BMSR_100FULL2 0x0400 /* Can do 100BASE-T2 FDX */ 61 61 #define BMSR_10HALF 0x0800 /* Can do 10mbps, half-duplex */ 62 62 #define BMSR_10FULL 0x1000 /* Can do 10mbps, full-duplex */ 63 63 #define BMSR_100HALF 0x2000 /* Can do 100mbps, half-duplex */
+4 -2
net/bluetooth/hci_sock.c
··· 665 665 /* Detach sockets from device */ 666 666 read_lock(&hci_sk_list.lock); 667 667 sk_for_each(sk, node, &hci_sk_list.head) { 668 - lock_sock(sk); 668 + local_bh_disable(); 669 + bh_lock_sock_nested(sk); 669 670 if (hci_pi(sk)->hdev == hdev) { 670 671 hci_pi(sk)->hdev = NULL; 671 672 sk->sk_err = EPIPE; ··· 675 674 676 675 hci_dev_put(hdev); 677 676 } 678 - release_sock(sk); 677 + bh_unlock_sock(sk); 678 + local_bh_enable(); 679 679 } 680 680 read_unlock(&hci_sk_list.lock); 681 681 }
+69
net/core/dev.c
··· 116 116 #include <linux/dmaengine.h> 117 117 #include <linux/err.h> 118 118 #include <linux/ctype.h> 119 + #include <linux/if_arp.h> 119 120 120 121 /* 121 122 * The list of packet types we will receive (as opposed to discard) ··· 218 217 #define netdev_unregister_sysfs(dev) do { } while(0) 219 218 #endif 220 219 220 + #ifdef CONFIG_DEBUG_LOCK_ALLOC 221 + /* 222 + * register_netdevice() inits dev->_xmit_lock and sets lockdep class 223 + * according to dev->type 224 + */ 225 + static const unsigned short netdev_lock_type[] = 226 + {ARPHRD_NETROM, ARPHRD_ETHER, ARPHRD_EETHER, ARPHRD_AX25, 227 + ARPHRD_PRONET, ARPHRD_CHAOS, ARPHRD_IEEE802, ARPHRD_ARCNET, 228 + ARPHRD_APPLETLK, ARPHRD_DLCI, ARPHRD_ATM, ARPHRD_METRICOM, 229 + ARPHRD_IEEE1394, ARPHRD_EUI64, ARPHRD_INFINIBAND, ARPHRD_SLIP, 230 + ARPHRD_CSLIP, ARPHRD_SLIP6, ARPHRD_CSLIP6, ARPHRD_RSRVD, 231 + ARPHRD_ADAPT, ARPHRD_ROSE, ARPHRD_X25, ARPHRD_HWX25, 232 + ARPHRD_PPP, ARPHRD_CISCO, ARPHRD_LAPB, ARPHRD_DDCMP, 233 + ARPHRD_RAWHDLC, ARPHRD_TUNNEL, ARPHRD_TUNNEL6, ARPHRD_FRAD, 234 + ARPHRD_SKIP, ARPHRD_LOOPBACK, ARPHRD_LOCALTLK, ARPHRD_FDDI, 235 + ARPHRD_BIF, ARPHRD_SIT, ARPHRD_IPDDP, ARPHRD_IPGRE, 236 + ARPHRD_PIMREG, ARPHRD_HIPPI, ARPHRD_ASH, ARPHRD_ECONET, 237 + ARPHRD_IRDA, ARPHRD_FCPP, ARPHRD_FCAL, ARPHRD_FCPL, 238 + ARPHRD_FCFABRIC, ARPHRD_IEEE802_TR, ARPHRD_IEEE80211, 239 + ARPHRD_IEEE80211_PRISM, ARPHRD_IEEE80211_RADIOTAP, ARPHRD_VOID, 240 + ARPHRD_NONE}; 241 + 242 + static const char *netdev_lock_name[] = 243 + {"_xmit_NETROM", "_xmit_ETHER", "_xmit_EETHER", "_xmit_AX25", 244 + "_xmit_PRONET", "_xmit_CHAOS", "_xmit_IEEE802", "_xmit_ARCNET", 245 + "_xmit_APPLETLK", "_xmit_DLCI", "_xmit_ATM", "_xmit_METRICOM", 246 + "_xmit_IEEE1394", "_xmit_EUI64", "_xmit_INFINIBAND", "_xmit_SLIP", 247 + "_xmit_CSLIP", "_xmit_SLIP6", "_xmit_CSLIP6", "_xmit_RSRVD", 248 + "_xmit_ADAPT", "_xmit_ROSE", "_xmit_X25", "_xmit_HWX25", 249 + "_xmit_PPP", "_xmit_CISCO", "_xmit_LAPB", "_xmit_DDCMP", 250 + "_xmit_RAWHDLC", "_xmit_TUNNEL", "_xmit_TUNNEL6", "_xmit_FRAD", 251 + "_xmit_SKIP", "_xmit_LOOPBACK", "_xmit_LOCALTLK", "_xmit_FDDI", 252 + "_xmit_BIF", "_xmit_SIT", "_xmit_IPDDP", "_xmit_IPGRE", 253 + "_xmit_PIMREG", "_xmit_HIPPI", "_xmit_ASH", "_xmit_ECONET", 254 + "_xmit_IRDA", "_xmit_FCPP", "_xmit_FCAL", "_xmit_FCPL", 255 + "_xmit_FCFABRIC", "_xmit_IEEE802_TR", "_xmit_IEEE80211", 256 + "_xmit_IEEE80211_PRISM", "_xmit_IEEE80211_RADIOTAP", "_xmit_VOID", 257 + "_xmit_NONE"}; 258 + 259 + static struct lock_class_key netdev_xmit_lock_key[ARRAY_SIZE(netdev_lock_type)]; 260 + 261 + static inline unsigned short netdev_lock_pos(unsigned short dev_type) 262 + { 263 + int i; 264 + 265 + for (i = 0; i < ARRAY_SIZE(netdev_lock_type); i++) 266 + if (netdev_lock_type[i] == dev_type) 267 + return i; 268 + /* the last key is used by default */ 269 + return ARRAY_SIZE(netdev_lock_type) - 1; 270 + } 271 + 272 + static inline void netdev_set_lockdep_class(spinlock_t *lock, 273 + unsigned short dev_type) 274 + { 275 + int i; 276 + 277 + i = netdev_lock_pos(dev_type); 278 + lockdep_set_class_and_name(lock, &netdev_xmit_lock_key[i], 279 + netdev_lock_name[i]); 280 + } 281 + #else 282 + static inline void netdev_set_lockdep_class(spinlock_t *lock, 283 + unsigned short dev_type) 284 + { 285 + } 286 + #endif 221 287 222 288 /******************************************************************************* 223 289 ··· 3069 3001 3070 3002 spin_lock_init(&dev->queue_lock); 3071 3003 spin_lock_init(&dev->_xmit_lock); 3004 + netdev_set_lockdep_class(&dev->_xmit_lock, dev->type); 3072 3005 dev->xmit_lock_owner = -1; 3073 3006 spin_lock_init(&dev->ingress_lock); 3074 3007
+4 -3
net/ipv4/Kconfig
··· 43 43 asymmetric routing (packets from you to a host take a different path 44 44 than packets from that host to you) or if you operate a non-routing 45 45 host which has several IP addresses on different interfaces. To turn 46 - rp_filter off use: 46 + rp_filter on use: 47 47 48 - echo 0 > /proc/sys/net/ipv4/conf/<device>/rp_filter 48 + echo 1 > /proc/sys/net/ipv4/conf/<device>/rp_filter 49 49 or 50 - echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter 50 + echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter 51 51 52 52 If unsure, say N here. 53 53 ··· 577 577 config TCP_CONG_YEAH 578 578 tristate "YeAH TCP" 579 579 depends on EXPERIMENTAL 580 + select TCP_CONG_VEGAS 580 581 default n 581 582 ---help--- 582 583 YeAH-TCP is a sender-side high-speed enabled TCP congestion control
+2 -2
net/ipv4/route.c
··· 2396 2396 2397 2397 /* It is equivalent to inet_addr_type(saddr) == RTN_LOCAL */ 2398 2398 dev_out = ip_dev_find(oldflp->fl4_src); 2399 - if ((dev_out == NULL) && !(sysctl_ip_nonlocal_bind)) 2399 + if (dev_out == NULL) 2400 2400 goto out; 2401 2401 2402 2402 /* I removed check for oif == dev_out->oif here. ··· 2407 2407 of another iface. --ANK 2408 2408 */ 2409 2409 2410 - if (dev_out && oldflp->oif == 0 2410 + if (oldflp->oif == 0 2411 2411 && (MULTICAST(oldflp->fl4_dst) || oldflp->fl4_dst == htonl(0xFFFFFFFF))) { 2412 2412 /* Special hack: user can direct multicasts 2413 2413 and limited broadcast via necessary interface
+21 -17
net/ipv4/tcp_cong.c
··· 276 276 277 277 278 278 /* 279 - * Slow start (exponential increase) with 280 - * RFC3742 Limited Slow Start (fast linear increase) support. 279 + * Slow start is used when congestion window is less than slow start 280 + * threshold. This version implements the basic RFC2581 version 281 + * and optionally supports: 282 + * RFC3742 Limited Slow Start - growth limited to max_ssthresh 283 + * RFC3465 Appropriate Byte Counting - growth limited by bytes acknowledged 281 284 */ 282 285 void tcp_slow_start(struct tcp_sock *tp) 283 286 { 284 - int cnt = 0; 287 + int cnt; /* increase in packets */ 285 288 286 - if (sysctl_tcp_abc) { 287 - /* RFC3465: Slow Start 288 - * TCP sender SHOULD increase cwnd by the number of 289 - * previously unacknowledged bytes ACKed by each incoming 290 - * acknowledgment, provided the increase is not more than L 291 - */ 292 - if (tp->bytes_acked < tp->mss_cache) 293 - return; 294 - } 289 + /* RFC3465: ABC Slow start 290 + * Increase only after a full MSS of bytes is acked 291 + * 292 + * TCP sender SHOULD increase cwnd by the number of 293 + * previously unacknowledged bytes ACKed by each incoming 294 + * acknowledgment, provided the increase is not more than L 295 + */ 296 + if (sysctl_tcp_abc && tp->bytes_acked < tp->mss_cache) 297 + return; 295 298 296 - if (sysctl_tcp_max_ssthresh > 0 && 297 - tp->snd_cwnd > sysctl_tcp_max_ssthresh) 298 - cnt += sysctl_tcp_max_ssthresh>>1; 299 + if (sysctl_tcp_max_ssthresh > 0 && tp->snd_cwnd > sysctl_tcp_max_ssthresh) 300 + cnt = sysctl_tcp_max_ssthresh >> 1; /* limited slow start */ 299 301 else 300 - cnt += tp->snd_cwnd; 302 + cnt = tp->snd_cwnd; /* exponential increase */ 301 303 302 - /* RFC3465: We MAY increase by 2 if discovered delayed ack */ 304 + /* RFC3465: ABC 305 + * We MAY increase by 2 if discovered delayed ack 306 + */ 303 307 if (sysctl_tcp_abc > 1 && tp->bytes_acked >= 2*tp->mss_cache) 304 308 cnt <<= 1; 305 309 tp->bytes_acked = 0;