Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112041
b: refs/heads/master
c: 8ec8eba
h: refs/heads/master
i:
  112039: 48631d4
v: v3
  • Loading branch information
John W. Linville committed Oct 6, 2008
1 parent 4c88463 commit 4e4dba0
Show file tree
Hide file tree
Showing 29 changed files with 147 additions and 297 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: b8bae41ed6a53cce56c50811a91cd963e3187d1c
refs/heads/master: 8ec8ebaeceedf3a845f9e23885f26d0d00eefeb7
2 changes: 0 additions & 2 deletions trunk/drivers/net/wireless/ath9k/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ static int ath_stop(struct ath_softc *sc)
* hardware is gone (invalid).
*/

if (!(sc->sc_flags & SC_OP_INVALID))
ath9k_hw_set_interrupts(ah, 0);
ath_draintxq(sc, false);
if (!(sc->sc_flags & SC_OP_INVALID)) {
ath_stoprecv(sc);
Expand Down
1 change: 0 additions & 1 deletion trunk/include/linux/inetdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ struct in_device
struct in_ifaddr *ifa_list; /* IP ifaddr chain */
rwlock_t mc_list_lock;
struct ip_mc_list *mc_list; /* IP multicast filter chain */
int mc_count; /* Number of installed mcasts */
spinlock_t mc_tomb_lock;
struct ip_mc_list *mc_tomb;
unsigned long mr_v1_seen;
Expand Down
23 changes: 0 additions & 23 deletions trunk/include/linux/skbuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -968,9 +968,6 @@ static inline void skb_fill_page_desc(struct sk_buff *skb, int i,
skb_shinfo(skb)->nr_frags = i + 1;
}

extern void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page,
int off, int size);

#define SKB_PAGE_ASSERT(skb) BUG_ON(skb_shinfo(skb)->nr_frags)
#define SKB_FRAG_ASSERT(skb) BUG_ON(skb_shinfo(skb)->frag_list)
#define SKB_LINEAR_ASSERT(skb) BUG_ON(skb_is_nonlinear(skb))
Expand Down Expand Up @@ -1385,26 +1382,6 @@ static inline struct sk_buff *netdev_alloc_skb(struct net_device *dev,
return __netdev_alloc_skb(dev, length, GFP_ATOMIC);
}

extern struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask);

/**
* netdev_alloc_page - allocate a page for ps-rx on a specific device
* @dev: network device to receive on
*
* Allocate a new page node local to the specified device.
*
* %NULL is returned if there is no free memory.
*/
static inline struct page *netdev_alloc_page(struct net_device *dev)
{
return __netdev_alloc_page(dev, GFP_ATOMIC);
}

static inline void netdev_free_page(struct net_device *dev, struct page *page)
{
__free_page(page);
}

/**
* skb_clone_writable - is the header of a clone writable
* @skb: buffer to check
Expand Down
9 changes: 5 additions & 4 deletions trunk/include/linux/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,11 +312,8 @@ struct tcp_sock {
u32 retrans_out; /* Retransmitted packets out */

u16 urg_data; /* Saved octet of OOB data and control flags */
u8 urg_mode; /* In urgent mode */
u8 ecn_flags; /* ECN status bits. */
u8 reordering; /* Packet reordering metric. */
u32 snd_up; /* Urgent pointer */

u8 keepalive_probes; /* num of allowed keep alive probes */
/*
* Options received (usually on last packet, some only on SYN packets).
*/
Expand Down Expand Up @@ -364,6 +361,8 @@ struct tcp_sock {

u32 lost_retrans_low; /* Sent seq after any rxmit (lowest) */

u8 reordering; /* Packet reordering metric. */
u8 keepalive_probes; /* num of allowed keep alive probes */
u32 prior_ssthresh; /* ssthresh saved at recovery start */
u32 high_seq; /* snd_nxt at onset of congestion */

Expand All @@ -375,6 +374,8 @@ struct tcp_sock {
u32 total_retrans; /* Total retransmits for entire connection */

u32 urg_seq; /* Seq of received urgent pointer */
u32 snd_up; /* Urgent pointer */

unsigned int keepalive_time; /* time before keep alive takes place */
unsigned int keepalive_intvl; /* time interval between keep alive probes */

Expand Down
15 changes: 0 additions & 15 deletions trunk/include/net/inet6_hashtables.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,6 @@ static inline struct sock *__inet6_lookup(struct net *net,
return inet6_lookup_listener(net, hashinfo, daddr, hnum, dif);
}

static inline struct sock *__inet6_lookup_skb(struct inet_hashinfo *hashinfo,
struct sk_buff *skb,
const __be16 sport,
const __be16 dport)
{
struct sock *sk;

if (unlikely(sk = skb_steal_sock(skb)))
return sk;
else return __inet6_lookup(dev_net(skb->dst->dev), hashinfo,
&ipv6_hdr(skb)->saddr, sport,
&ipv6_hdr(skb)->daddr, ntohs(dport),
inet6_iif(skb));
}

extern struct sock *inet6_lookup(struct net *net, struct inet_hashinfo *hashinfo,
const struct in6_addr *saddr, const __be16 sport,
const struct in6_addr *daddr, const __be16 dport,
Expand Down
18 changes: 0 additions & 18 deletions trunk/include/net/inet_hashtables.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@


#include <linux/interrupt.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/list.h>
#include <linux/slab.h>
Expand All @@ -29,7 +28,6 @@
#include <net/inet_connection_sock.h>
#include <net/inet_sock.h>
#include <net/sock.h>
#include <net/route.h>
#include <net/tcp_states.h>
#include <net/netns/hash.h>

Expand Down Expand Up @@ -373,22 +371,6 @@ static inline struct sock *inet_lookup(struct net *net,
return sk;
}

static inline struct sock *__inet_lookup_skb(struct inet_hashinfo *hashinfo,
struct sk_buff *skb,
const __be16 sport,
const __be16 dport)
{
struct sock *sk;
const struct iphdr *iph = ip_hdr(skb);

if (unlikely(sk = skb_steal_sock(skb)))
return sk;
else
return __inet_lookup(dev_net(skb->dst->dev), hashinfo,
iph->saddr, sport,
iph->daddr, dport, inet_iif(skb));
}

extern int __inet_hash_connect(struct inet_timewait_death_row *death_row,
struct sock *sk, u32 port_offset,
int (*check_established)(struct inet_timewait_death_row *,
Expand Down
6 changes: 0 additions & 6 deletions trunk/include/net/netns/mib.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ struct netns_mib {
DEFINE_SNMP_STAT(struct udp_mib, udplite_statistics);
DEFINE_SNMP_STAT(struct icmp_mib, icmp_statistics);
DEFINE_SNMP_STAT(struct icmpmsg_mib, icmpmsg_statistics);

#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
struct proc_dir_entry *proc_net_devsnmp6;
DEFINE_SNMP_STAT(struct udp_mib, udp_stats_in6);
DEFINE_SNMP_STAT(struct udp_mib, udplite_stats_in6);
#endif
};

#endif
17 changes: 0 additions & 17 deletions trunk/include/net/sock.h
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,6 @@ static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
skb->next = NULL;
}

static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
{
return sk->sk_backlog_rcv(sk, skb);
}

#define sk_wait_event(__sk, __timeo, __condition) \
({ int __rc; \
release_sock(__sk); \
Expand Down Expand Up @@ -1329,18 +1324,6 @@ static inline void sk_change_net(struct sock *sk, struct net *net)
sock_net_set(sk, hold_net(net));
}

static inline struct sock *skb_steal_sock(struct sk_buff *skb)
{
if (unlikely(skb->sk)) {
struct sock *sk = skb->sk;

skb->destructor = NULL;
skb->sk = NULL;
return sk;
}
return NULL;
}

extern void sock_enable_timestamp(struct sock *sk);
extern int sock_get_timestamp(struct sock *, struct timeval __user *);
extern int sock_get_timestampns(struct sock *, struct timespec __user *);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/net/tcp.h
Original file line number Diff line number Diff line change
Expand Up @@ -896,7 +896,7 @@ static inline int tcp_prequeue(struct sock *sk, struct sk_buff *skb)
BUG_ON(sock_owned_by_user(sk));

while ((skb1 = __skb_dequeue(&tp->ucopy.prequeue)) != NULL) {
sk_backlog_rcv(sk, skb1);
sk->sk_backlog_rcv(sk, skb1);
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPPREQUEUEDROPPED);
}

Expand Down
19 changes: 11 additions & 8 deletions trunk/include/net/udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
__be32 daddr, __be16 dport,
int dif);

DECLARE_SNMP_STAT(struct udp_mib, udp_stats_in6);

/* UDP-Lite does not have a standardized MIB yet, so we inherit from UDP */
DECLARE_SNMP_STAT(struct udp_mib, udplite_stats_in6);

/*
* SNMP statistics for UDP and UDP-Lite
*/
Expand All @@ -162,14 +167,12 @@ extern struct sock *udp4_lib_lookup(struct net *net, __be32 saddr, __be16 sport,
if (is_udplite) SNMP_INC_STATS_BH((net)->mib.udplite_statistics, field); \
else SNMP_INC_STATS_BH((net)->mib.udp_statistics, field); } while(0)

#define UDP6_INC_STATS_BH(net, field, is_udplite) do { \
if (is_udplite) SNMP_INC_STATS_BH((net)->mib.udplite_stats_in6, field);\
else SNMP_INC_STATS_BH((net)->mib.udp_stats_in6, field); \
} while(0)
#define UDP6_INC_STATS_USER(net, field, __lite) do { \
if (__lite) SNMP_INC_STATS_USER((net)->mib.udplite_stats_in6, field); \
else SNMP_INC_STATS_USER((net)->mib.udp_stats_in6, field); \
} while(0)
#define UDP6_INC_STATS_BH(net, field, is_udplite) do { (void)net; \
if (is_udplite) SNMP_INC_STATS_BH(udplite_stats_in6, field); \
else SNMP_INC_STATS_BH(udp_stats_in6, field); } while(0)
#define UDP6_INC_STATS_USER(net, field, is_udplite) do { (void)net; \
if (is_udplite) SNMP_INC_STATS_USER(udplite_stats_in6, field); \
else SNMP_INC_STATS_USER(udp_stats_in6, field); } while(0)

#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
#define UDPX_INC_STATS_BH(sk, field) \
Expand Down
20 changes: 0 additions & 20 deletions trunk/net/core/skbuff.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,26 +263,6 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev,
return skb;
}

struct page *__netdev_alloc_page(struct net_device *dev, gfp_t gfp_mask)
{
int node = dev->dev.parent ? dev_to_node(dev->dev.parent) : -1;
struct page *page;

page = alloc_pages_node(node, gfp_mask, 0);
return page;
}
EXPORT_SYMBOL(__netdev_alloc_page);

void skb_add_rx_frag(struct sk_buff *skb, int i, struct page *page, int off,
int size)
{
skb_fill_page_desc(skb, i, page, off, size);
skb->len += size;
skb->data_len += size;
skb->truesize += size;
}
EXPORT_SYMBOL(skb_add_rx_frag);

/**
* dev_alloc_skb - allocate an skbuff for receiving
* @length: length to allocate
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ int sk_receive_skb(struct sock *sk, struct sk_buff *skb, const int nested)
*/
mutex_acquire(&sk->sk_lock.dep_map, 0, 1, _RET_IP_);

rc = sk_backlog_rcv(sk, skb);
rc = sk->sk_backlog_rcv(sk, skb);

mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
} else
Expand Down Expand Up @@ -1374,7 +1374,7 @@ static void __release_sock(struct sock *sk)
struct sk_buff *next = skb->next;

skb->next = NULL;
sk_backlog_rcv(sk, skb);
sk->sk_backlog_rcv(sk, skb);

/*
* We are in process context here with softirqs
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/dccp/ipv4.c
Original file line number Diff line number Diff line change
Expand Up @@ -811,8 +811,9 @@ static int dccp_v4_rcv(struct sk_buff *skb)

/* Step 2:
* Look up flow ID in table and get corresponding socket */
sk = __inet_lookup_skb(&dccp_hashinfo, skb,
dh->dccph_sport, dh->dccph_dport);
sk = __inet_lookup(dev_net(skb->dst->dev), &dccp_hashinfo,
iph->saddr, dh->dccph_sport,
iph->daddr, dh->dccph_dport, inet_iif(skb));
/*
* Step 2:
* If no socket ...
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/dccp/ipv6.c
Original file line number Diff line number Diff line change
Expand Up @@ -805,8 +805,10 @@ static int dccp_v6_rcv(struct sk_buff *skb)

/* Step 2:
* Look up flow ID in table and get corresponding socket */
sk = __inet6_lookup_skb(&dccp_hashinfo, skb,
dh->dccph_sport, dh->dccph_dport);
sk = __inet6_lookup(dev_net(skb->dst->dev), &dccp_hashinfo,
&ipv6_hdr(skb)->saddr, dh->dccph_sport,
&ipv6_hdr(skb)->daddr, ntohs(dh->dccph_dport),
inet6_iif(skb));
/*
* Step 2:
* If no socket ...
Expand Down
7 changes: 2 additions & 5 deletions trunk/net/ipv4/igmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,6 @@ void ip_mc_inc_group(struct in_device *in_dev, __be32 addr)
write_lock_bh(&in_dev->mc_list_lock);
im->next=in_dev->mc_list;
in_dev->mc_list=im;
in_dev->mc_count++;
write_unlock_bh(&in_dev->mc_list_lock);
#ifdef CONFIG_IP_MULTICAST
igmpv3_del_delrec(in_dev, im->multiaddr);
Expand Down Expand Up @@ -1283,7 +1282,6 @@ void ip_mc_dec_group(struct in_device *in_dev, __be32 addr)
if (--i->users == 0) {
write_lock_bh(&in_dev->mc_list_lock);
*ip = i->next;
in_dev->mc_count--;
write_unlock_bh(&in_dev->mc_list_lock);
igmp_group_dropped(i);

Expand Down Expand Up @@ -1332,7 +1330,6 @@ void ip_mc_init_dev(struct in_device *in_dev)
setup_timer(&in_dev->mr_gq_timer, igmp_gq_timer_expire,
(unsigned long)in_dev);
in_dev->mr_ifc_count = 0;
in_dev->mc_count = 0;
setup_timer(&in_dev->mr_ifc_timer, igmp_ifc_timer_expire,
(unsigned long)in_dev);
in_dev->mr_qrv = IGMP_Unsolicited_Report_Count;
Expand Down Expand Up @@ -1372,8 +1369,8 @@ void ip_mc_destroy_dev(struct in_device *in_dev)
write_lock_bh(&in_dev->mc_list_lock);
while ((i = in_dev->mc_list) != NULL) {
in_dev->mc_list = i->next;
in_dev->mc_count--;
write_unlock_bh(&in_dev->mc_list_lock);

igmp_group_dropped(i);
ip_ma_put(i);

Expand Down Expand Up @@ -2386,7 +2383,7 @@ static int igmp_mc_seq_show(struct seq_file *seq, void *v)

if (state->in_dev->mc_list == im) {
seq_printf(seq, "%d\t%-10s: %5d %7s\n",
state->dev->ifindex, state->dev->name, state->in_dev->mc_count, querier);
state->dev->ifindex, state->dev->name, state->dev->mc_count, querier);
}

seq_printf(seq,
Expand Down
6 changes: 4 additions & 2 deletions trunk/net/ipv4/tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,10 @@ static inline void skb_entail(struct sock *sk, struct sk_buff *skb)
static inline void tcp_mark_urg(struct tcp_sock *tp, int flags,
struct sk_buff *skb)
{
if (flags & MSG_OOB)
if (flags & MSG_OOB) {
tp->urg_mode = 1;
tp->snd_up = tp->write_seq;
}
}

static inline void tcp_push(struct sock *sk, int flags, int mss_now,
Expand Down Expand Up @@ -1159,7 +1161,7 @@ static void tcp_prequeue_process(struct sock *sk)
* necessary */
local_bh_disable();
while ((skb = __skb_dequeue(&tp->ucopy.prequeue)) != NULL)
sk_backlog_rcv(sk, skb);
sk->sk_backlog_rcv(sk, skb);
local_bh_enable();

/* Clear memory counter. */
Expand Down
Loading

0 comments on commit 4e4dba0

Please sign in to comment.