diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-10 05:22:26 -0400 |
commit | 65b53e4cc90e59936733b3b95b9451d2ca47528d (patch) | |
tree | 29932718192962671c48c3fd1ea017a6112459e8 /include/net | |
parent | 788c0a53164c05c5ccdb1472474372b72ba74644 (diff) | |
parent | 2e761e0532a784816e7e822dbaaece8c5d4be14d (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/tg3.c
drivers/net/wireless/rt2x00/rt2x00dev.c
net/mac80211/ieee80211_i.h
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/addrconf.h | 22 | ||||
-rw-r--r-- | include/net/genetlink.h | 4 | ||||
-rw-r--r-- | include/net/netlink.h | 20 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 17 | ||||
-rw-r--r-- | include/net/transp_v6.h | 3 | ||||
-rw-r--r-- | include/net/udp.h | 1 |
6 files changed, 50 insertions, 17 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 0a2f0372df31..bbd3d583c6e6 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -94,6 +94,28 @@ extern void addrconf_join_solict(struct net_device *dev, | |||
94 | extern void addrconf_leave_solict(struct inet6_dev *idev, | 94 | extern void addrconf_leave_solict(struct inet6_dev *idev, |
95 | struct in6_addr *addr); | 95 | struct in6_addr *addr); |
96 | 96 | ||
97 | static inline unsigned long addrconf_timeout_fixup(u32 timeout, | ||
98 | unsigned unit) | ||
99 | { | ||
100 | if (timeout == 0xffffffff) | ||
101 | return ~0UL; | ||
102 | |||
103 | /* | ||
104 | * Avoid arithmetic overflow. | ||
105 | * Assuming unit is constant and non-zero, this "if" statement | ||
106 | * will go away on 64bit archs. | ||
107 | */ | ||
108 | if (0xfffffffe > LONG_MAX / unit && timeout > LONG_MAX / unit) | ||
109 | return LONG_MAX / unit; | ||
110 | |||
111 | return timeout; | ||
112 | } | ||
113 | |||
114 | static inline int addrconf_finite_timeout(unsigned long timeout) | ||
115 | { | ||
116 | return ~timeout; | ||
117 | } | ||
118 | |||
97 | /* | 119 | /* |
98 | * IPv6 Address Label subsystem (addrlabel.c) | 120 | * IPv6 Address Label subsystem (addrlabel.c) |
99 | */ | 121 | */ |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index decdda546829..747c255d1df0 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -162,9 +162,9 @@ static inline int genlmsg_end(struct sk_buff *skb, void *hdr) | |||
162 | * @skb: socket buffer the message is stored in | 162 | * @skb: socket buffer the message is stored in |
163 | * @hdr: generic netlink message header | 163 | * @hdr: generic netlink message header |
164 | */ | 164 | */ |
165 | static inline int genlmsg_cancel(struct sk_buff *skb, void *hdr) | 165 | static inline void genlmsg_cancel(struct sk_buff *skb, void *hdr) |
166 | { | 166 | { |
167 | return nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); | 167 | nlmsg_cancel(skb, hdr - GENL_HDRLEN - NLMSG_HDRLEN); |
168 | } | 168 | } |
169 | 169 | ||
170 | /** | 170 | /** |
diff --git a/include/net/netlink.h b/include/net/netlink.h index 112dcdf7e34e..dfc3701dfcc3 100644 --- a/include/net/netlink.h +++ b/include/net/netlink.h | |||
@@ -556,14 +556,12 @@ static inline void *nlmsg_get_pos(struct sk_buff *skb) | |||
556 | * @skb: socket buffer the message is stored in | 556 | * @skb: socket buffer the message is stored in |
557 | * @mark: mark to trim to | 557 | * @mark: mark to trim to |
558 | * | 558 | * |
559 | * Trims the message to the provided mark. Returns -1. | 559 | * Trims the message to the provided mark. |
560 | */ | 560 | */ |
561 | static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | 561 | static inline void nlmsg_trim(struct sk_buff *skb, const void *mark) |
562 | { | 562 | { |
563 | if (mark) | 563 | if (mark) |
564 | skb_trim(skb, (unsigned char *) mark - skb->data); | 564 | skb_trim(skb, (unsigned char *) mark - skb->data); |
565 | |||
566 | return -1; | ||
567 | } | 565 | } |
568 | 566 | ||
569 | /** | 567 | /** |
@@ -572,11 +570,11 @@ static inline int nlmsg_trim(struct sk_buff *skb, const void *mark) | |||
572 | * @nlh: netlink message header | 570 | * @nlh: netlink message header |
573 | * | 571 | * |
574 | * Removes the complete netlink message including all | 572 | * Removes the complete netlink message including all |
575 | * attributes from the socket buffer again. Returns -1. | 573 | * attributes from the socket buffer again. |
576 | */ | 574 | */ |
577 | static inline int nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) | 575 | static inline void nlmsg_cancel(struct sk_buff *skb, struct nlmsghdr *nlh) |
578 | { | 576 | { |
579 | return nlmsg_trim(skb, nlh); | 577 | nlmsg_trim(skb, nlh); |
580 | } | 578 | } |
581 | 579 | ||
582 | /** | 580 | /** |
@@ -775,7 +773,7 @@ static inline int __nla_parse_nested_compat(struct nlattr *tb[], int maxtype, | |||
775 | int nested_len = nla_len(nla) - NLA_ALIGN(len); | 773 | int nested_len = nla_len(nla) - NLA_ALIGN(len); |
776 | 774 | ||
777 | if (nested_len < 0) | 775 | if (nested_len < 0) |
778 | return -1; | 776 | return -EINVAL; |
779 | if (nested_len >= nla_attr_size(0)) | 777 | if (nested_len >= nla_attr_size(0)) |
780 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), | 778 | return nla_parse(tb, maxtype, nla_data(nla) + NLA_ALIGN(len), |
781 | nested_len, policy); | 779 | nested_len, policy); |
@@ -1080,11 +1078,11 @@ static inline int nla_nest_compat_end(struct sk_buff *skb, struct nlattr *start) | |||
1080 | * @start: container attribute | 1078 | * @start: container attribute |
1081 | * | 1079 | * |
1082 | * Removes the container attribute and including all nested | 1080 | * Removes the container attribute and including all nested |
1083 | * attributes. Returns -1. | 1081 | * attributes. Returns -EMSGSIZE |
1084 | */ | 1082 | */ |
1085 | static inline int nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) | 1083 | static inline void nla_nest_cancel(struct sk_buff *skb, struct nlattr *start) |
1086 | { | 1084 | { |
1087 | return nlmsg_trim(skb, start); | 1085 | nlmsg_trim(skb, start); |
1088 | } | 1086 | } |
1089 | 1087 | ||
1090 | /** | 1088 | /** |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index e11151702bee..fbc27ac8a09e 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -549,7 +549,8 @@ struct sctp_af { | |||
549 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, | 549 | struct dst_entry *(*get_dst) (struct sctp_association *asoc, |
550 | union sctp_addr *daddr, | 550 | union sctp_addr *daddr, |
551 | union sctp_addr *saddr); | 551 | union sctp_addr *saddr); |
552 | void (*get_saddr) (struct sctp_association *asoc, | 552 | void (*get_saddr) (struct sctp_sock *sk, |
553 | struct sctp_association *asoc, | ||
553 | struct dst_entry *dst, | 554 | struct dst_entry *dst, |
554 | union sctp_addr *daddr, | 555 | union sctp_addr *daddr, |
555 | union sctp_addr *saddr); | 556 | union sctp_addr *saddr); |
@@ -588,6 +589,7 @@ struct sctp_af { | |||
588 | int (*is_ce) (const struct sk_buff *sk); | 589 | int (*is_ce) (const struct sk_buff *sk); |
589 | void (*seq_dump_addr)(struct seq_file *seq, | 590 | void (*seq_dump_addr)(struct seq_file *seq, |
590 | union sctp_addr *addr); | 591 | union sctp_addr *addr); |
592 | void (*ecn_capable)(struct sock *sk); | ||
591 | __u16 net_header_len; | 593 | __u16 net_header_len; |
592 | int sockaddr_len; | 594 | int sockaddr_len; |
593 | sa_family_t sa_family; | 595 | sa_family_t sa_family; |
@@ -902,7 +904,10 @@ struct sctp_transport { | |||
902 | * calculation completes (i.e. the DATA chunk | 904 | * calculation completes (i.e. the DATA chunk |
903 | * is SACK'd) clear this flag. | 905 | * is SACK'd) clear this flag. |
904 | */ | 906 | */ |
905 | int rto_pending; | 907 | __u8 rto_pending; |
908 | |||
909 | /* Flag to track the current fast recovery state */ | ||
910 | __u8 fast_recovery; | ||
906 | 911 | ||
907 | /* | 912 | /* |
908 | * These are the congestion stats. | 913 | * These are the congestion stats. |
@@ -921,6 +926,9 @@ struct sctp_transport { | |||
921 | /* Data that has been sent, but not acknowledged. */ | 926 | /* Data that has been sent, but not acknowledged. */ |
922 | __u32 flight_size; | 927 | __u32 flight_size; |
923 | 928 | ||
929 | /* TSN marking the fast recovery exit point */ | ||
930 | __u32 fast_recovery_exit; | ||
931 | |||
924 | /* Destination */ | 932 | /* Destination */ |
925 | struct dst_entry *dst; | 933 | struct dst_entry *dst; |
926 | /* Source address. */ | 934 | /* Source address. */ |
@@ -1046,7 +1054,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *, | |||
1046 | struct sctp_sock *); | 1054 | struct sctp_sock *); |
1047 | void sctp_transport_pmtu(struct sctp_transport *); | 1055 | void sctp_transport_pmtu(struct sctp_transport *); |
1048 | void sctp_transport_free(struct sctp_transport *); | 1056 | void sctp_transport_free(struct sctp_transport *); |
1049 | void sctp_transport_reset_timers(struct sctp_transport *); | 1057 | void sctp_transport_reset_timers(struct sctp_transport *, int); |
1050 | void sctp_transport_hold(struct sctp_transport *); | 1058 | void sctp_transport_hold(struct sctp_transport *); |
1051 | void sctp_transport_put(struct sctp_transport *); | 1059 | void sctp_transport_put(struct sctp_transport *); |
1052 | void sctp_transport_update_rto(struct sctp_transport *, __u32); | 1060 | void sctp_transport_update_rto(struct sctp_transport *, __u32); |
@@ -1136,6 +1144,9 @@ struct sctp_outq { | |||
1136 | /* How many unackd bytes do we have in-flight? */ | 1144 | /* How many unackd bytes do we have in-flight? */ |
1137 | __u32 outstanding_bytes; | 1145 | __u32 outstanding_bytes; |
1138 | 1146 | ||
1147 | /* Are we doing fast-rtx on this queue */ | ||
1148 | char fast_rtx; | ||
1149 | |||
1139 | /* Corked? */ | 1150 | /* Corked? */ |
1140 | char cork; | 1151 | char cork; |
1141 | 1152 | ||
diff --git a/include/net/transp_v6.h b/include/net/transp_v6.h index 27394e0447d8..112934a3288d 100644 --- a/include/net/transp_v6.h +++ b/include/net/transp_v6.h | |||
@@ -40,7 +40,8 @@ extern int datagram_recv_ctl(struct sock *sk, | |||
40 | struct msghdr *msg, | 40 | struct msghdr *msg, |
41 | struct sk_buff *skb); | 41 | struct sk_buff *skb); |
42 | 42 | ||
43 | extern int datagram_send_ctl(struct msghdr *msg, | 43 | extern int datagram_send_ctl(struct net *net, |
44 | struct msghdr *msg, | ||
44 | struct flowi *fl, | 45 | struct flowi *fl, |
45 | struct ipv6_txoptions *opt, | 46 | struct ipv6_txoptions *opt, |
46 | int *hlimit, int *tclass); | 47 | int *hlimit, int *tclass); |
diff --git a/include/net/udp.h b/include/net/udp.h index 3e55a99b0ba3..ccce83707046 100644 --- a/include/net/udp.h +++ b/include/net/udp.h | |||
@@ -135,6 +135,7 @@ extern void udp_err(struct sk_buff *, u32); | |||
135 | 135 | ||
136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, | 136 | extern int udp_sendmsg(struct kiocb *iocb, struct sock *sk, |
137 | struct msghdr *msg, size_t len); | 137 | struct msghdr *msg, size_t len); |
138 | extern void udp_flush_pending_frames(struct sock *sk); | ||
138 | 139 | ||
139 | extern int udp_rcv(struct sk_buff *skb); | 140 | extern int udp_rcv(struct sk_buff *skb); |
140 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); | 141 | extern int udp_ioctl(struct sock *sk, int cmd, unsigned long arg); |