diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 32 | ||||
-rw-r--r-- | net/core/iovec.c | 6 | ||||
-rw-r--r-- | net/core/neighbour.c | 11 | ||||
-rw-r--r-- | net/core/netclassid_cgroup.c | 2 | ||||
-rw-r--r-- | net/core/netprio_cgroup.c | 2 |
5 files changed, 31 insertions, 22 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 30eedf677913..367a586d0c8a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -148,6 +148,9 @@ struct list_head ptype_all __read_mostly; /* Taps */ | |||
148 | static struct list_head offload_base __read_mostly; | 148 | static struct list_head offload_base __read_mostly; |
149 | 149 | ||
150 | static int netif_rx_internal(struct sk_buff *skb); | 150 | static int netif_rx_internal(struct sk_buff *skb); |
151 | static int call_netdevice_notifiers_info(unsigned long val, | ||
152 | struct net_device *dev, | ||
153 | struct netdev_notifier_info *info); | ||
151 | 154 | ||
152 | /* | 155 | /* |
153 | * The @dev_base_head list is protected by @dev_base_lock and the rtnl | 156 | * The @dev_base_head list is protected by @dev_base_lock and the rtnl |
@@ -1207,7 +1210,11 @@ EXPORT_SYMBOL(netdev_features_change); | |||
1207 | void netdev_state_change(struct net_device *dev) | 1210 | void netdev_state_change(struct net_device *dev) |
1208 | { | 1211 | { |
1209 | if (dev->flags & IFF_UP) { | 1212 | if (dev->flags & IFF_UP) { |
1210 | call_netdevice_notifiers(NETDEV_CHANGE, dev); | 1213 | struct netdev_notifier_change_info change_info; |
1214 | |||
1215 | change_info.flags_changed = 0; | ||
1216 | call_netdevice_notifiers_info(NETDEV_CHANGE, dev, | ||
1217 | &change_info.info); | ||
1211 | rtmsg_ifinfo(RTM_NEWLINK, dev, 0, GFP_KERNEL); | 1218 | rtmsg_ifinfo(RTM_NEWLINK, dev, 0, GFP_KERNEL); |
1212 | } | 1219 | } |
1213 | } | 1220 | } |
@@ -4089,6 +4096,8 @@ static void napi_reuse_skb(struct napi_struct *napi, struct sk_buff *skb) | |||
4089 | skb->vlan_tci = 0; | 4096 | skb->vlan_tci = 0; |
4090 | skb->dev = napi->dev; | 4097 | skb->dev = napi->dev; |
4091 | skb->skb_iif = 0; | 4098 | skb->skb_iif = 0; |
4099 | skb->encapsulation = 0; | ||
4100 | skb_shinfo(skb)->gso_type = 0; | ||
4092 | skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); | 4101 | skb->truesize = SKB_TRUESIZE(skb_end_offset(skb)); |
4093 | 4102 | ||
4094 | napi->skb = skb; | 4103 | napi->skb = skb; |
@@ -4227,9 +4236,8 @@ static int process_backlog(struct napi_struct *napi, int quota) | |||
4227 | #endif | 4236 | #endif |
4228 | napi->weight = weight_p; | 4237 | napi->weight = weight_p; |
4229 | local_irq_disable(); | 4238 | local_irq_disable(); |
4230 | while (work < quota) { | 4239 | while (1) { |
4231 | struct sk_buff *skb; | 4240 | struct sk_buff *skb; |
4232 | unsigned int qlen; | ||
4233 | 4241 | ||
4234 | while ((skb = __skb_dequeue(&sd->process_queue))) { | 4242 | while ((skb = __skb_dequeue(&sd->process_queue))) { |
4235 | local_irq_enable(); | 4243 | local_irq_enable(); |
@@ -4243,24 +4251,24 @@ static int process_backlog(struct napi_struct *napi, int quota) | |||
4243 | } | 4251 | } |
4244 | 4252 | ||
4245 | rps_lock(sd); | 4253 | rps_lock(sd); |
4246 | qlen = skb_queue_len(&sd->input_pkt_queue); | 4254 | if (skb_queue_empty(&sd->input_pkt_queue)) { |
4247 | if (qlen) | ||
4248 | skb_queue_splice_tail_init(&sd->input_pkt_queue, | ||
4249 | &sd->process_queue); | ||
4250 | |||
4251 | if (qlen < quota - work) { | ||
4252 | /* | 4255 | /* |
4253 | * Inline a custom version of __napi_complete(). | 4256 | * Inline a custom version of __napi_complete(). |
4254 | * only current cpu owns and manipulates this napi, | 4257 | * only current cpu owns and manipulates this napi, |
4255 | * and NAPI_STATE_SCHED is the only possible flag set on backlog. | 4258 | * and NAPI_STATE_SCHED is the only possible flag set |
4256 | * we can use a plain write instead of clear_bit(), | 4259 | * on backlog. |
4260 | * We can use a plain write instead of clear_bit(), | ||
4257 | * and we dont need an smp_mb() memory barrier. | 4261 | * and we dont need an smp_mb() memory barrier. |
4258 | */ | 4262 | */ |
4259 | list_del(&napi->poll_list); | 4263 | list_del(&napi->poll_list); |
4260 | napi->state = 0; | 4264 | napi->state = 0; |
4265 | rps_unlock(sd); | ||
4261 | 4266 | ||
4262 | quota = work + qlen; | 4267 | break; |
4263 | } | 4268 | } |
4269 | |||
4270 | skb_queue_splice_tail_init(&sd->input_pkt_queue, | ||
4271 | &sd->process_queue); | ||
4264 | rps_unlock(sd); | 4272 | rps_unlock(sd); |
4265 | } | 4273 | } |
4266 | local_irq_enable(); | 4274 | local_irq_enable(); |
diff --git a/net/core/iovec.c b/net/core/iovec.c index 827dd6beb49c..e1ec45ab1e63 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c | |||
@@ -39,7 +39,7 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *a | |||
39 | { | 39 | { |
40 | int size, ct, err; | 40 | int size, ct, err; |
41 | 41 | ||
42 | if (m->msg_namelen) { | 42 | if (m->msg_name && m->msg_namelen) { |
43 | if (mode == VERIFY_READ) { | 43 | if (mode == VERIFY_READ) { |
44 | void __user *namep; | 44 | void __user *namep; |
45 | namep = (void __user __force *) m->msg_name; | 45 | namep = (void __user __force *) m->msg_name; |
@@ -48,10 +48,10 @@ int verify_iovec(struct msghdr *m, struct iovec *iov, struct sockaddr_storage *a | |||
48 | if (err < 0) | 48 | if (err < 0) |
49 | return err; | 49 | return err; |
50 | } | 50 | } |
51 | if (m->msg_name) | 51 | m->msg_name = address; |
52 | m->msg_name = address; | ||
53 | } else { | 52 | } else { |
54 | m->msg_name = NULL; | 53 | m->msg_name = NULL; |
54 | m->msg_namelen = 0; | ||
55 | } | 55 | } |
56 | 56 | ||
57 | size = m->msg_iovlen * sizeof(struct iovec); | 57 | size = m->msg_iovlen * sizeof(struct iovec); |
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index 32d872eec7f5..ef31fef25e5a 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
@@ -2249,7 +2249,7 @@ static int pneigh_fill_info(struct sk_buff *skb, struct pneigh_entry *pn, | |||
2249 | ndm->ndm_pad1 = 0; | 2249 | ndm->ndm_pad1 = 0; |
2250 | ndm->ndm_pad2 = 0; | 2250 | ndm->ndm_pad2 = 0; |
2251 | ndm->ndm_flags = pn->flags | NTF_PROXY; | 2251 | ndm->ndm_flags = pn->flags | NTF_PROXY; |
2252 | ndm->ndm_type = NDA_DST; | 2252 | ndm->ndm_type = RTN_UNICAST; |
2253 | ndm->ndm_ifindex = pn->dev->ifindex; | 2253 | ndm->ndm_ifindex = pn->dev->ifindex; |
2254 | ndm->ndm_state = NUD_NONE; | 2254 | ndm->ndm_state = NUD_NONE; |
2255 | 2255 | ||
@@ -3059,11 +3059,12 @@ int neigh_sysctl_register(struct net_device *dev, struct neigh_parms *p, | |||
3059 | memset(&t->neigh_vars[NEIGH_VAR_GC_INTERVAL], 0, | 3059 | memset(&t->neigh_vars[NEIGH_VAR_GC_INTERVAL], 0, |
3060 | sizeof(t->neigh_vars[NEIGH_VAR_GC_INTERVAL])); | 3060 | sizeof(t->neigh_vars[NEIGH_VAR_GC_INTERVAL])); |
3061 | } else { | 3061 | } else { |
3062 | struct neigh_table *tbl = p->tbl; | ||
3062 | dev_name_source = "default"; | 3063 | dev_name_source = "default"; |
3063 | t->neigh_vars[NEIGH_VAR_GC_INTERVAL].data = (int *)(p + 1); | 3064 | t->neigh_vars[NEIGH_VAR_GC_INTERVAL].data = &tbl->gc_interval; |
3064 | t->neigh_vars[NEIGH_VAR_GC_THRESH1].data = (int *)(p + 1) + 1; | 3065 | t->neigh_vars[NEIGH_VAR_GC_THRESH1].data = &tbl->gc_thresh1; |
3065 | t->neigh_vars[NEIGH_VAR_GC_THRESH2].data = (int *)(p + 1) + 2; | 3066 | t->neigh_vars[NEIGH_VAR_GC_THRESH2].data = &tbl->gc_thresh2; |
3066 | t->neigh_vars[NEIGH_VAR_GC_THRESH3].data = (int *)(p + 1) + 3; | 3067 | t->neigh_vars[NEIGH_VAR_GC_THRESH3].data = &tbl->gc_thresh3; |
3067 | } | 3068 | } |
3068 | 3069 | ||
3069 | if (handler) { | 3070 | if (handler) { |
diff --git a/net/core/netclassid_cgroup.c b/net/core/netclassid_cgroup.c index 30d903b19c62..1f2a126f4ffa 100644 --- a/net/core/netclassid_cgroup.c +++ b/net/core/netclassid_cgroup.c | |||
@@ -107,5 +107,5 @@ struct cgroup_subsys net_cls_cgrp_subsys = { | |||
107 | .css_online = cgrp_css_online, | 107 | .css_online = cgrp_css_online, |
108 | .css_free = cgrp_css_free, | 108 | .css_free = cgrp_css_free, |
109 | .attach = cgrp_attach, | 109 | .attach = cgrp_attach, |
110 | .base_cftypes = ss_files, | 110 | .legacy_cftypes = ss_files, |
111 | }; | 111 | }; |
diff --git a/net/core/netprio_cgroup.c b/net/core/netprio_cgroup.c index 2f385b9bccc0..cbd0a199bf52 100644 --- a/net/core/netprio_cgroup.c +++ b/net/core/netprio_cgroup.c | |||
@@ -249,7 +249,7 @@ struct cgroup_subsys net_prio_cgrp_subsys = { | |||
249 | .css_online = cgrp_css_online, | 249 | .css_online = cgrp_css_online, |
250 | .css_free = cgrp_css_free, | 250 | .css_free = cgrp_css_free, |
251 | .attach = net_prio_attach, | 251 | .attach = net_prio_attach, |
252 | .base_cftypes = ss_files, | 252 | .legacy_cftypes = ss_files, |
253 | }; | 253 | }; |
254 | 254 | ||
255 | static int netprio_device_event(struct notifier_block *unused, | 255 | static int netprio_device_event(struct notifier_block *unused, |