Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (73 commits) netfilter: Remove ADVANCED dependency from NF_CONNTRACK_NETBIOS_NS ipv4: flush route cache after change accept_local sch_red: fix red_change Revert "udp: remove redundant variable" bridge: master device stuck in no-carrier state forever when in user-stp mode ipv4: Perform peer validation on cached route lookup. net/core: fix rollback handler in register_netdevice_notifier sch_red: fix red_calc_qavg_from_idle_time bonding: only use primary address for ARP ipv4: fix lockdep splat in rt_cache_seq_show sch_teql: fix lockdep splat net: fec: Select the FEC driver by default for i.MX SoCs isdn: avoid copying too long drvid isdn: make sure strings are null terminated netlabel: Fix build problems when IPv6 is not enabled sctp: better integer overflow check in sctp_auth_create_key() sctp: integer overflow in sctp_auth_create_key() ipv6: Set mcast_hops to IPV6_DEFAULT_MCASTHOPS when -1 was given. net: Fix corruption in /proc/*/net/dev_mcast mac80211: fix race between the AGG SM and the Tx data path ...
This commit is contained in:
commit
5983fe2b29
77 changed files with 589 additions and 280 deletions
|
|
@ -2536,6 +2536,8 @@ extern void net_disable_timestamp(void);
|
|||
extern void *dev_seq_start(struct seq_file *seq, loff_t *pos);
|
||||
extern void *dev_seq_next(struct seq_file *seq, void *v, loff_t *pos);
|
||||
extern void dev_seq_stop(struct seq_file *seq, void *v);
|
||||
extern int dev_seq_open_ops(struct inode *inode, struct file *file,
|
||||
const struct seq_operations *ops);
|
||||
#endif
|
||||
|
||||
extern int netdev_class_create_file(struct class_attribute *class_attr);
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
struct tc_stats {
|
||||
__u64 bytes; /* NUmber of enqueues bytes */
|
||||
__u64 bytes; /* Number of enqueued bytes */
|
||||
__u32 packets; /* Number of enqueued packets */
|
||||
__u32 drops; /* Packets dropped because of lack of resources */
|
||||
__u32 overlimits; /* Number of throttle events when this
|
||||
|
|
@ -297,7 +297,7 @@ struct tc_htb_glob {
|
|||
__u32 debug; /* debug flags */
|
||||
|
||||
/* stats */
|
||||
__u32 direct_pkts; /* count of non shapped packets */
|
||||
__u32 direct_pkts; /* count of non shaped packets */
|
||||
};
|
||||
enum {
|
||||
TCA_HTB_UNSPEC,
|
||||
|
|
@ -503,7 +503,7 @@ enum {
|
|||
};
|
||||
#define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1)
|
||||
|
||||
/* State transition probablities for 4 state model */
|
||||
/* State transition probabilities for 4 state model */
|
||||
struct tc_netem_gimodel {
|
||||
__u32 p13;
|
||||
__u32 p31;
|
||||
|
|
|
|||
|
|
@ -205,12 +205,7 @@ dst_feature(const struct dst_entry *dst, u32 feature)
|
|||
|
||||
static inline u32 dst_mtu(const struct dst_entry *dst)
|
||||
{
|
||||
u32 mtu = dst_metric_raw(dst, RTAX_MTU);
|
||||
|
||||
if (!mtu)
|
||||
mtu = dst->ops->default_mtu(dst);
|
||||
|
||||
return mtu;
|
||||
return dst->ops->mtu(dst);
|
||||
}
|
||||
|
||||
/* RTT metrics are stored in milliseconds for user ABI, but used as jiffies */
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ struct dst_ops {
|
|||
int (*gc)(struct dst_ops *ops);
|
||||
struct dst_entry * (*check)(struct dst_entry *, __u32 cookie);
|
||||
unsigned int (*default_advmss)(const struct dst_entry *);
|
||||
unsigned int (*default_mtu)(const struct dst_entry *);
|
||||
unsigned int (*mtu)(const struct dst_entry *);
|
||||
u32 * (*cow_metrics)(struct dst_entry *, unsigned long);
|
||||
void (*destroy)(struct dst_entry *);
|
||||
void (*ifdown)(struct dst_entry *,
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
/** struct ip_options - IP Options
|
||||
*
|
||||
* @faddr - Saved first hop address
|
||||
* @nexthop - Saved nexthop address in LSRR and SSRR
|
||||
* @is_data - Options in __data, rather than skb
|
||||
* @is_strictroute - Strict source route
|
||||
* @srr_is_hit - Packet destination addr was our one
|
||||
|
|
@ -41,6 +42,7 @@
|
|||
*/
|
||||
struct ip_options {
|
||||
__be32 faddr;
|
||||
__be32 nexthop;
|
||||
unsigned char optlen;
|
||||
unsigned char srr;
|
||||
unsigned char rr;
|
||||
|
|
|
|||
|
|
@ -35,6 +35,7 @@ struct inet_peer {
|
|||
|
||||
u32 metrics[RTAX_MAX];
|
||||
u32 rate_tokens; /* rate limiting for ICMP */
|
||||
int redirect_genid;
|
||||
unsigned long rate_last;
|
||||
unsigned long pmtu_expires;
|
||||
u32 pmtu_orig;
|
||||
|
|
|
|||
|
|
@ -67,18 +67,18 @@ struct nf_ct_event_notifier {
|
|||
int (*fcn)(unsigned int events, struct nf_ct_event *item);
|
||||
};
|
||||
|
||||
extern struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
|
||||
extern int nf_conntrack_register_notifier(struct nf_ct_event_notifier *nb);
|
||||
extern void nf_conntrack_unregister_notifier(struct nf_ct_event_notifier *nb);
|
||||
extern int nf_conntrack_register_notifier(struct net *net, struct nf_ct_event_notifier *nb);
|
||||
extern void nf_conntrack_unregister_notifier(struct net *net, struct nf_ct_event_notifier *nb);
|
||||
|
||||
extern void nf_ct_deliver_cached_events(struct nf_conn *ct);
|
||||
|
||||
static inline void
|
||||
nf_conntrack_event_cache(enum ip_conntrack_events event, struct nf_conn *ct)
|
||||
{
|
||||
struct net *net = nf_ct_net(ct);
|
||||
struct nf_conntrack_ecache *e;
|
||||
|
||||
if (nf_conntrack_event_cb == NULL)
|
||||
if (net->ct.nf_conntrack_event_cb == NULL)
|
||||
return;
|
||||
|
||||
e = nf_ct_ecache_find(ct);
|
||||
|
|
@ -95,11 +95,12 @@ nf_conntrack_eventmask_report(unsigned int eventmask,
|
|||
int report)
|
||||
{
|
||||
int ret = 0;
|
||||
struct net *net = nf_ct_net(ct);
|
||||
struct nf_ct_event_notifier *notify;
|
||||
struct nf_conntrack_ecache *e;
|
||||
|
||||
rcu_read_lock();
|
||||
notify = rcu_dereference(nf_conntrack_event_cb);
|
||||
notify = rcu_dereference(net->ct.nf_conntrack_event_cb);
|
||||
if (notify == NULL)
|
||||
goto out_unlock;
|
||||
|
||||
|
|
@ -164,9 +165,8 @@ struct nf_exp_event_notifier {
|
|||
int (*fcn)(unsigned int events, struct nf_exp_event *item);
|
||||
};
|
||||
|
||||
extern struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
|
||||
extern int nf_ct_expect_register_notifier(struct nf_exp_event_notifier *nb);
|
||||
extern void nf_ct_expect_unregister_notifier(struct nf_exp_event_notifier *nb);
|
||||
extern int nf_ct_expect_register_notifier(struct net *net, struct nf_exp_event_notifier *nb);
|
||||
extern void nf_ct_expect_unregister_notifier(struct net *net, struct nf_exp_event_notifier *nb);
|
||||
|
||||
static inline void
|
||||
nf_ct_expect_event_report(enum ip_conntrack_expect_events event,
|
||||
|
|
@ -174,11 +174,12 @@ nf_ct_expect_event_report(enum ip_conntrack_expect_events event,
|
|||
u32 pid,
|
||||
int report)
|
||||
{
|
||||
struct net *net = nf_ct_exp_net(exp);
|
||||
struct nf_exp_event_notifier *notify;
|
||||
struct nf_conntrack_ecache *e;
|
||||
|
||||
rcu_read_lock();
|
||||
notify = rcu_dereference(nf_expect_event_cb);
|
||||
notify = rcu_dereference(net->ct.nf_expect_event_cb);
|
||||
if (notify == NULL)
|
||||
goto out_unlock;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ struct netns_ct {
|
|||
struct hlist_nulls_head unconfirmed;
|
||||
struct hlist_nulls_head dying;
|
||||
struct ip_conntrack_stat __percpu *stat;
|
||||
struct nf_ct_event_notifier __rcu *nf_conntrack_event_cb;
|
||||
struct nf_exp_event_notifier __rcu *nf_expect_event_cb;
|
||||
int sysctl_events;
|
||||
unsigned int sysctl_events_retry_timeout;
|
||||
int sysctl_acct;
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ struct red_parms {
|
|||
u32 qR; /* Cached random number */
|
||||
|
||||
unsigned long qavg; /* Average queue length: A scaled */
|
||||
psched_time_t qidlestart; /* Start of current idle period */
|
||||
ktime_t qidlestart; /* Start of current idle period */
|
||||
};
|
||||
|
||||
static inline u32 red_rmask(u8 Plog)
|
||||
|
|
@ -148,17 +148,17 @@ static inline void red_set_parms(struct red_parms *p,
|
|||
|
||||
static inline int red_is_idling(struct red_parms *p)
|
||||
{
|
||||
return p->qidlestart != PSCHED_PASTPERFECT;
|
||||
return p->qidlestart.tv64 != 0;
|
||||
}
|
||||
|
||||
static inline void red_start_of_idle_period(struct red_parms *p)
|
||||
{
|
||||
p->qidlestart = psched_get_time();
|
||||
p->qidlestart = ktime_get();
|
||||
}
|
||||
|
||||
static inline void red_end_of_idle_period(struct red_parms *p)
|
||||
{
|
||||
p->qidlestart = PSCHED_PASTPERFECT;
|
||||
p->qidlestart.tv64 = 0;
|
||||
}
|
||||
|
||||
static inline void red_restart(struct red_parms *p)
|
||||
|
|
@ -170,13 +170,10 @@ static inline void red_restart(struct red_parms *p)
|
|||
|
||||
static inline unsigned long red_calc_qavg_from_idle_time(struct red_parms *p)
|
||||
{
|
||||
psched_time_t now;
|
||||
long us_idle;
|
||||
s64 delta = ktime_us_delta(ktime_get(), p->qidlestart);
|
||||
long us_idle = min_t(s64, delta, p->Scell_max);
|
||||
int shift;
|
||||
|
||||
now = psched_get_time();
|
||||
us_idle = psched_tdiff_bounded(now, p->qidlestart, p->Scell_max);
|
||||
|
||||
/*
|
||||
* The problem: ideally, average length queue recalcultion should
|
||||
* be done over constant clock intervals. This is too expensive, so
|
||||
|
|
|
|||
|
|
@ -71,12 +71,12 @@ struct rtable {
|
|||
struct fib_info *fi; /* for client ref to shared metrics */
|
||||
};
|
||||
|
||||
static inline bool rt_is_input_route(struct rtable *rt)
|
||||
static inline bool rt_is_input_route(const struct rtable *rt)
|
||||
{
|
||||
return rt->rt_route_iif != 0;
|
||||
}
|
||||
|
||||
static inline bool rt_is_output_route(struct rtable *rt)
|
||||
static inline bool rt_is_output_route(const struct rtable *rt)
|
||||
{
|
||||
return rt->rt_route_iif == 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue