Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90050
b: refs/heads/master
c: db8dac2
h: refs/heads/master
v: v3
  • Loading branch information
David S. Miller committed Mar 7, 2008
1 parent 67fcd30 commit e0f1989
Show file tree
Hide file tree
Showing 18 changed files with 1,102 additions and 1,223 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: ba0fa4599484b98dbb21d279fbfdb40e9c07d30d
refs/heads/master: db8dac20d5199307dcfcf4e01dac4bda5edf9e89
10 changes: 0 additions & 10 deletions trunk/include/linux/udp.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,8 @@ struct udp_sock {
#define UDPLITE_BIT 0x1 /* set by udplite proto init function */
#define UDPLITE_SEND_CC 0x2 /* set via udplite setsockopt */
#define UDPLITE_RECV_CC 0x4 /* set via udplite setsocktopt */
#ifdef CONFIG_IP_UDPLITE
__u8 pcflag; /* marks socket as UDP-Lite if > 0 */
__u8 unused[3];
#endif
/*
* For encapsulation sockets.
*/
Expand All @@ -85,15 +83,7 @@ static inline struct udp_sock *udp_sk(const struct sock *sk)
return (struct udp_sock *)sk;
}

#ifdef CONFIG_IP_UDPLITE
#define IS_UDPLITE(__sk) (udp_sk(__sk)->pcflag)
#define IS_PROTO_UDPLITE(__proto) ((__proto) == IPPROTO_UDPLITE)
#define IS_SOL_UDPFAMILY(level) ((level) == SOL_UDP || (level) == SOL_UDPLITE)
#else
#define IS_UDPLITE(__sk) 0
#define IS_PROTO_UDPLITE(__proto) 0
#define IS_SOL_UDPFAMILY(level) ((level) == SOL_UDP)
#endif

#endif

Expand Down
5 changes: 0 additions & 5 deletions trunk/include/net/ipv6.h
Original file line number Diff line number Diff line change
Expand Up @@ -599,13 +599,8 @@ extern int tcp6_proc_init(void);
extern void tcp6_proc_exit(void);
extern int udp6_proc_init(void);
extern void udp6_proc_exit(void);
#ifdef CONFIG_IP_UDPLITE
extern int udplite6_proc_init(void);
extern void udplite6_proc_exit(void);
#else
static inline int udplite6_proc_init(void) { return 0; }
static inline void udplite6_proc_exit(void) { }
#endif
extern int ipv6_misc_proc_init(void);
extern void ipv6_misc_proc_exit(void);
extern int snmp6_register_dev(struct inet6_dev *idev);
Expand Down
5 changes: 0 additions & 5 deletions trunk/include/net/transp_v6.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,8 @@ extern int rawv6_init(void);
extern void rawv6_exit(void);
extern int udpv6_init(void);
extern void udpv6_exit(void);
#ifdef CONFIG_IP_UDPLITE
extern int udplitev6_init(void);
extern void udplitev6_exit(void);
#else
static inline int udplitev6_init(void) { return 0; }
static inline void udplitev6_exit(void) { }
#endif
extern int tcpv6_init(void);
extern void tcpv6_exit(void);

Expand Down
9 changes: 2 additions & 7 deletions trunk/include/net/udplite.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ static __inline__ int udplite_getfrag(void *from, char *to, int offset,
/* Designate sk as UDP-Lite socket */
static inline int udplite_sk_init(struct sock *sk)
{
#ifdef CONFIG_IP_UDPLITE
udp_sk(sk)->pcflag = UDPLITE_BIT;
#endif
return 0;
}

Expand Down Expand Up @@ -71,7 +69,7 @@ static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh)
static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh)
{
int cscov = up->len;
#ifdef CONFIG_IP_UDPLITE

/*
* Sender has set `partial coverage' option on UDP-Lite socket
*/
Expand All @@ -95,15 +93,13 @@ static inline int udplite_sender_cscov(struct udp_sock *up, struct udphdr *uh)
* illegal, we fall back to the defaults here.
*/
}
#endif
return cscov;
}

static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
{
__wsum csum = 0;
#ifdef CONFIG_IP_UDPLITE
int cscov = udplite_sender_cscov(udp_sk(sk), udp_hdr(skb));
__wsum csum = 0;

skb->ip_summed = CHECKSUM_NONE; /* no HW support for checksumming */

Expand All @@ -116,7 +112,6 @@ static inline __wsum udplite_csum_outgoing(struct sock *sk, struct sk_buff *skb)
if ((cscov -= len) <= 0)
break;
}
#endif
return csum;
}

Expand Down
10 changes: 0 additions & 10 deletions trunk/net/ipv4/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -632,15 +632,5 @@ config TCP_MD5SIG

If unsure, say N.

config IP_UDPLITE
bool "IP: UDP-Lite Protocol (RFC 3828)"
default n
---help---
UDP-Lite (RFC 3828) is a UDP-like protocol with variable-length
checksum. Read <file:Documentation/networking/udplite.txt> for
details.

If unsure, say N.

source "net/ipv4/ipvs/Kconfig"

3 changes: 1 addition & 2 deletions trunk/net/ipv4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ obj-y := route.o inetpeer.o protocol.o \
inet_timewait_sock.o inet_connection_sock.o \
tcp.o tcp_input.o tcp_output.o tcp_timer.o tcp_ipv4.o \
tcp_minisocks.o tcp_cong.o \
datagram.o raw.o udp.o udp_ipv4.o \
datagram.o raw.o udp.o udplite.o \
arp.o icmp.o devinet.o af_inet.o igmp.o \
fib_frontend.o fib_semantics.o \
inet_fragment.o
Expand Down Expand Up @@ -49,7 +49,6 @@ obj-$(CONFIG_TCP_CONG_SCALABLE) += tcp_scalable.o
obj-$(CONFIG_TCP_CONG_LP) += tcp_lp.o
obj-$(CONFIG_TCP_CONG_YEAH) += tcp_yeah.o
obj-$(CONFIG_TCP_CONG_ILLINOIS) += tcp_illinois.o
obj-$(CONFIG_IP_UDPLITE) += udplite_ipv4.o
obj-$(CONFIG_NETLABEL) += cipso_ipv4.o

obj-$(CONFIG_XFRM) += xfrm4_policy.o xfrm4_state.o xfrm4_input.o \
Expand Down
7 changes: 1 addition & 6 deletions trunk/net/ipv4/af_inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,18 +1317,15 @@ static int __init init_ipv4_mibs(void)
if (snmp_mib_init((void **)udp_statistics,
sizeof(struct udp_mib)) < 0)
goto err_udp_mib;
#ifdef CONFIG_IP_UDPLITE
if (snmp_mib_init((void **)udplite_statistics,
sizeof(struct udp_mib)) < 0)
goto err_udplite_mib;
#endif

tcp_mib_init();

return 0;

#ifdef CONFIG_IP_UDPLITE
err_udplite_mib:
#endif
snmp_mib_free((void **)udp_statistics);
err_udp_mib:
snmp_mib_free((void **)tcp_statistics);
Expand Down Expand Up @@ -1426,10 +1423,8 @@ static int __init inet_init(void)
/* Setup UDP memory threshold */
udp_init();

#ifdef CONFIG_IP_UDPLITE
/* Add UDP-Lite (RFC 3828) */
udplite4_register();
#endif

/*
* Set the ICMP layer up
Expand Down
5 changes: 1 addition & 4 deletions trunk/net/ipv4/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ static int sockstat_seq_show(struct seq_file *seq, void *v)
atomic_read(&tcp_memory_allocated));
seq_printf(seq, "UDP: inuse %d mem %d\n", sock_prot_inuse_get(&udp_prot),
atomic_read(&udp_memory_allocated));
#ifdef CONFIG_IP_UDPLITE
seq_printf(seq, "UDPLITE: inuse %d\n", sock_prot_inuse_get(&udplite_prot));
#endif
seq_printf(seq, "RAW: inuse %d\n", sock_prot_inuse_get(&raw_prot));
seq_printf(seq, "FRAG: inuse %d memory %d\n",
ip_frag_nqueues(&init_net), ip_frag_mem(&init_net));
Expand Down Expand Up @@ -351,7 +349,6 @@ static int snmp_seq_show(struct seq_file *seq, void *v)
snmp_fold_field((void **)udp_statistics,
snmp4_udp_list[i].entry));

#ifdef CONFIG_IP_UDPLITE
/* the UDP and UDP-Lite MIBs are the same */
seq_puts(seq, "\nUdpLite:");
for (i = 0; snmp4_udp_list[i].name != NULL; i++)
Expand All @@ -362,7 +359,7 @@ static int snmp_seq_show(struct seq_file *seq, void *v)
seq_printf(seq, " %lu",
snmp_fold_field((void **)udplite_statistics,
snmp4_udp_list[i].entry));
#endif

seq_putc(seq, '\n');
return 0;
}
Expand Down
Loading

0 comments on commit e0f1989

Please sign in to comment.