netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/10] ipv4: make fib_detect_death static
@ 2013-12-16 18:36 Stephen Hemminger
  2013-12-16 18:37 ` [PATCH net-next 2/10] arp: make arp_invalidate static Stephen Hemminger
                   ` (10 more replies)
  0 siblings, 11 replies; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 18:36 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Make fib_detect_death function static only used in one file.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


--- a/net/ipv4/fib_lookup.h	2013-12-12 11:48:17.293851542 -0800
+++ b/net/ipv4/fib_lookup.h	2013-12-12 11:56:44.461952887 -0800
@@ -33,8 +33,6 @@ int fib_dump_info(struct sk_buff *skb, u
 void rtmsg_fib(int event, __be32 key, struct fib_alias *fa, int dst_len,
 	       u32 tb_id, const struct nl_info *info, unsigned int nlm_flags);
 struct fib_alias *fib_find_alias(struct list_head *fah, u8 tos, u32 prio);
-int fib_detect_death(struct fib_info *fi, int order,
-		     struct fib_info **last_resort, int *last_idx, int dflt);
 
 static inline void fib_result_assign(struct fib_result *res,
 				     struct fib_info *fi)
--- a/net/ipv4/fib_semantics.c	2013-12-12 11:48:17.293851542 -0800
+++ b/net/ipv4/fib_semantics.c	2013-12-12 11:56:44.461952887 -0800
@@ -426,7 +426,7 @@ struct fib_alias *fib_find_alias(struct
 	return NULL;
 }
 
-int fib_detect_death(struct fib_info *fi, int order,
+static int fib_detect_death(struct fib_info *fi, int order,
 		     struct fib_info **last_resort, int *last_idx, int dflt)
 {
 	struct neighbour *n;

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 2/10]  arp: make arp_invalidate static
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
@ 2013-12-16 18:37 ` Stephen Hemminger
  2013-12-16 18:38 ` [PATCH net-next 3/10] ipv4: remove unused function Stephen Hemminger
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 18:37 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Don't export arp_invalidate, only used in arp.c

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


--- a/include/net/arp.h	2013-12-12 11:48:17.269851915 -0800
+++ b/include/net/arp.h	2013-12-12 11:56:45.541936083 -0800
@@ -62,6 +62,5 @@ struct sk_buff *arp_create(int type, int
 			   const unsigned char *src_hw,
 			   const unsigned char *target_hw);
 void arp_xmit(struct sk_buff *skb);
-int arp_invalidate(struct net_device *dev, __be32 ip);
 
 #endif	/* _ARP_H */
--- a/net/ipv4/arp.c	2013-12-12 11:48:17.269851915 -0800
+++ b/net/ipv4/arp.c	2013-12-12 11:56:45.545936021 -0800
@@ -1112,7 +1112,7 @@ static int arp_req_get(struct arpreq *r,
 	return err;
 }
 
-int arp_invalidate(struct net_device *dev, __be32 ip)
+static int arp_invalidate(struct net_device *dev, __be32 ip)
 {
 	struct neighbour *neigh = neigh_lookup(&arp_tbl, &ip, dev);
 	int err = -ENXIO;
@@ -1127,7 +1127,6 @@ int arp_invalidate(struct net_device *de
 
 	return err;
 }
-EXPORT_SYMBOL(arp_invalidate);
 
 static int arp_req_delete_public(struct net *net, struct arpreq *r,
 		struct net_device *dev)

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 3/10] ipv4: remove unused function
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
  2013-12-16 18:37 ` [PATCH net-next 2/10] arp: make arp_invalidate static Stephen Hemminger
@ 2013-12-16 18:38 ` Stephen Hemminger
  2013-12-16 18:39 ` [PATCH net-next 4/10] ipv4: ping make local stuff static Stephen Hemminger
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 18:38 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

inetpeer_invalidate_family defined but never used

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


--- a/include/net/inetpeer.h	2013-12-12 11:48:17.245852289 -0800
+++ b/include/net/inetpeer.h	2013-12-12 11:56:49.397876085 -0800
@@ -163,7 +163,6 @@ void inet_putpeer(struct inet_peer *p);
 bool inet_peer_xrlim_allow(struct inet_peer *peer, int timeout);
 
 void inetpeer_invalidate_tree(struct inet_peer_base *);
-void inetpeer_invalidate_family(int family);
 
 /*
  * temporary check to make sure we dont access rid, ip_id_count, tcp_ts,
--- a/net/ipv4/inetpeer.c	2013-12-12 11:48:17.245852289 -0800
+++ b/net/ipv4/inetpeer.c	2013-12-12 11:56:49.397876085 -0800
@@ -109,13 +109,6 @@ static inline void flush_check(struct in
 	}
 }
 
-void inetpeer_invalidate_family(int family)
-{
-	atomic_t *fp = inetpeer_seq_ptr(family);
-
-	atomic_inc(fp);
-}
-
 #define PEER_MAXDEPTH 40 /* sufficient for about 2^27 nodes */
 
 /* Exported for sysctl_net_ipv4.  */

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 4/10] ipv4: ping make local stuff static
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
  2013-12-16 18:37 ` [PATCH net-next 2/10] arp: make arp_invalidate static Stephen Hemminger
  2013-12-16 18:38 ` [PATCH net-next 3/10] ipv4: remove unused function Stephen Hemminger
@ 2013-12-16 18:39 ` Stephen Hemminger
  2013-12-16 18:40 ` [PATCH net-next 5/10] tcp: make local functions static Stephen Hemminger
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 18:39 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Don't export ping_table or ping_v4_sendmsg. Both are only used
inside ping code.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


--- a/include/net/ping.h	2013-12-12 11:48:17.173853412 -0800
+++ b/include/net/ping.h	2013-12-12 11:56:52.357830028 -0800
@@ -42,11 +42,6 @@ struct pingv6_ops {
 			     const struct net_device *dev, int strict);
 };
 
-struct ping_table {
-	struct hlist_nulls_head	hash[PING_HTABLE_SIZE];
-	rwlock_t		lock;
-};
-
 struct ping_iter_state {
 	struct seq_net_private  p;
 	int			bucket;
@@ -54,7 +49,6 @@ struct ping_iter_state {
 };
 
 extern struct proto ping_prot;
-extern struct ping_table ping_table;
 #if IS_ENABLED(CONFIG_IPV6)
 extern struct pingv6_ops pingv6_ops;
 #endif
@@ -81,8 +75,6 @@ int  ping_recvmsg(struct kiocb *iocb, st
 		  size_t len, int noblock, int flags, int *addr_len);
 int  ping_common_sendmsg(int family, struct msghdr *msg, size_t len,
 			 void *user_icmph, size_t icmph_len);
-int  ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
-		     size_t len);
 int  ping_v6_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
 		     size_t len);
 int  ping_queue_rcv_skb(struct sock *sk, struct sk_buff *skb);
--- a/net/ipv4/ping.c	2013-12-12 11:48:17.173853412 -0800
+++ b/net/ipv4/ping.c	2013-12-12 11:56:52.357830028 -0800
@@ -53,8 +53,12 @@
 #include <net/transp_v6.h>
 #endif
 
+struct ping_table {
+	struct hlist_nulls_head	hash[PING_HTABLE_SIZE];
+	rwlock_t		lock;
+};
 
-struct ping_table ping_table;
+static struct ping_table ping_table;
 struct pingv6_ops pingv6_ops;
 EXPORT_SYMBOL_GPL(pingv6_ops);
 
@@ -668,8 +672,8 @@ int ping_common_sendmsg(int family, stru
 }
 EXPORT_SYMBOL_GPL(ping_common_sendmsg);
 
-int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
-		    size_t len)
+static int ping_v4_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
+			   size_t len)
 {
 	struct net *net = sock_net(sk);
 	struct flowi4 fl4;

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 5/10]  tcp: make local functions static
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
                   ` (2 preceding siblings ...)
  2013-12-16 18:39 ` [PATCH net-next 4/10] ipv4: ping make local stuff static Stephen Hemminger
@ 2013-12-16 18:40 ` Stephen Hemminger
  2013-12-16 18:42 ` [PATCH net-next 6/10] bonding: make local function static Stephen Hemminger
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 18:40 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

--- a/include/net/tcp.h	2013-12-12 12:59:44.620705224 -0800
+++ b/include/net/tcp.h	2013-12-12 13:01:33.463099974 -0800
@@ -468,7 +468,6 @@ struct sk_buff *tcp_make_synack(struct s
 				struct tcp_fastopen_cookie *foc);
 int tcp_disconnect(struct sock *sk, int flags);
 
-void tcp_connect_init(struct sock *sk);
 void tcp_finish_connect(struct sock *sk, struct sk_buff *skb);
 int tcp_send_rcvq(struct sock *sk, struct msghdr *msg, size_t size);
 void inet_sk_rx_dst_set(struct sock *sk, const struct sk_buff *skb);
@@ -623,8 +622,6 @@ static inline u32 __tcp_set_rto(const st
 	return (tp->srtt >> 3) + tp->rttvar;
 }
 
-void tcp_set_rto(struct sock *sk);
-
 static inline void __tcp_fast_path_on(struct tcp_sock *tp, u32 snd_wnd)
 {
 	tp->pred_flags = htonl((tp->tcp_header_len << 26) |
--- a/net/ipv4/tcp_input.c	2013-12-12 12:59:44.620705224 -0800
+++ b/net/ipv4/tcp_input.c	2013-12-12 13:01:24.807227669 -0800
@@ -766,7 +766,7 @@ static void tcp_update_pacing_rate(struc
 /* Calculate rto without backoff.  This is the second half of Van Jacobson's
  * routine referred to above.
  */
-void tcp_set_rto(struct sock *sk)
+static void tcp_set_rto(struct sock *sk)
 {
 	const struct tcp_sock *tp = tcp_sk(sk);
 	/* Old crap is replaced with new one. 8)
--- a/net/ipv4/tcp_output.c	2013-12-12 12:59:44.576705873 -0800
+++ b/net/ipv4/tcp_output.c	2013-12-12 13:01:33.463099974 -0800
@@ -2762,7 +2762,7 @@ struct sk_buff *tcp_make_synack(struct s
 EXPORT_SYMBOL(tcp_make_synack);
 
 /* Do all connect socket setups that can be done AF independent. */
-void tcp_connect_init(struct sock *sk)
+static void tcp_connect_init(struct sock *sk)
 {
 	const struct dst_entry *dst = __sk_dst_get(sk);
 	struct tcp_sock *tp = tcp_sk(sk);

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 6/10] bonding: make local function static
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
                   ` (3 preceding siblings ...)
  2013-12-16 18:40 ` [PATCH net-next 5/10] tcp: make local functions static Stephen Hemminger
@ 2013-12-16 18:42 ` Stephen Hemminger
  2013-12-16 18:43 ` [PATCH net-next 7/10] ipv6: make icmpv6_route_lookup static Stephen Hemminger
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 18:42 UTC (permalink / raw)
  To: Jay Vosburgh, Veaceslav Falico, Andy Gospodarek; +Cc: David Miller, netdev



Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

--- a/drivers/net/bonding/bond_main.c	2013-12-14 11:18:15.297586790 -0800
+++ b/drivers/net/bonding/bond_main.c	2013-12-15 10:25:04.445785839 -0800
@@ -3511,7 +3511,7 @@ unwind:
  * it fails, it tries to find the first available slave for transmission.
  * The skb is consumed in all cases, thus the function is void.
  */
-void bond_xmit_slave_id(struct bonding *bond, struct sk_buff *skb, int slave_id)
+static void bond_xmit_slave_id(struct bonding *bond, struct sk_buff *skb, int slave_id)
 {
 	struct list_head *iter;
 	struct slave *slave;
--- a/drivers/net/bonding/bonding.h	2013-12-14 11:18:15.301586736 -0800
+++ b/drivers/net/bonding/bonding.h	2013-12-15 10:25:04.445785839 -0800
@@ -417,7 +417,6 @@ struct bond_net;
 
 int bond_arp_rcv(const struct sk_buff *skb, struct bonding *bond, struct slave *slave);
 int bond_dev_queue_xmit(struct bonding *bond, struct sk_buff *skb, struct net_device *slave_dev);
-void bond_xmit_slave_id(struct bonding *bond, struct sk_buff *skb, int slave_id);
 int bond_create(struct net *net, const char *name);
 int bond_create_sysfs(struct bond_net *net);
 void bond_destroy_sysfs(struct bond_net *net);

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 7/10] ipv6: make icmpv6_route_lookup static
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
                   ` (4 preceding siblings ...)
  2013-12-16 18:42 ` [PATCH net-next 6/10] bonding: make local function static Stephen Hemminger
@ 2013-12-16 18:43 ` Stephen Hemminger
  2013-12-16 18:44 ` [PATCH net-next 8/10] socket: make cred_to_ucred static Stephen Hemminger
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 18:43 UTC (permalink / raw)
  To: David Miller; +Cc: netdev

Template table and icmpv6_route_lookup only used in net/ipv6/icmp.c


Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


--- a/include/net/ipv6.h	2013-12-12 08:46:52.532025877 -0800
+++ b/include/net/ipv6.h	2013-12-12 13:15:14.659040460 -0800
@@ -267,9 +267,6 @@ void icmpv6_notify(struct sk_buff *skb,
 int icmpv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
 			       struct icmp6hdr *thdr, int len);
 
-struct dst_entry *icmpv6_route_lookup(struct net *net, struct sk_buff *skb,
-				      struct sock *sk, struct flowi6 *fl6);
-
 int ip6_ra_control(struct sock *sk, int sel);
 
 int ipv6_parse_hopopts(struct sk_buff *skb);
@@ -841,7 +838,6 @@ static inline int snmp6_unregister_dev(s
 
 #ifdef CONFIG_SYSCTL
 extern struct ctl_table ipv6_route_table_template[];
-extern struct ctl_table ipv6_icmp_table_template[];
 
 struct ctl_table *ipv6_icmp_sysctl_init(struct net *net);
 struct ctl_table *ipv6_route_sysctl_init(struct net *net);
--- a/net/ipv6/icmp.c	2013-10-06 14:48:24.978449730 -0700
+++ b/net/ipv6/icmp.c	2013-12-12 13:15:22.154931148 -0800
@@ -315,8 +315,10 @@ static void mip6_addr_swap(struct sk_buf
 static inline void mip6_addr_swap(struct sk_buff *skb) {}
 #endif
 
-struct dst_entry *icmpv6_route_lookup(struct net *net, struct sk_buff *skb,
-				      struct sock *sk, struct flowi6 *fl6)
+static struct dst_entry *icmpv6_route_lookup(struct net *net,
+					     struct sk_buff *skb,
+					     struct sock *sk,
+					     struct flowi6 *fl6)
 {
 	struct dst_entry *dst, *dst2;
 	struct flowi6 fl2;
@@ -984,7 +986,7 @@ int icmpv6_err_convert(u8 type, u8 code,
 EXPORT_SYMBOL(icmpv6_err_convert);
 
 #ifdef CONFIG_SYSCTL
-struct ctl_table ipv6_icmp_table_template[] = {
+static struct ctl_table ipv6_icmp_table_template[] = {
 	{
 		.procname	= "ratelimit",
 		.data		= &init_net.ipv6.sysctl.icmpv6_time,

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 8/10] socket: make cred_to_ucred static
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
                   ` (5 preceding siblings ...)
  2013-12-16 18:43 ` [PATCH net-next 7/10] ipv6: make icmpv6_route_lookup static Stephen Hemminger
@ 2013-12-16 18:44 ` Stephen Hemminger
  2013-12-16 18:45 ` [PATCH net-next 9/10] lro: remove unused code Stephen Hemminger
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 18:44 UTC (permalink / raw)
  To: David Miller; +Cc: netdev


Only used in sock core.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


--- a/include/linux/socket.h	2013-12-13 11:18:42.254612024 -0800
+++ b/include/linux/socket.h	2013-12-13 11:18:46.010550445 -0800
@@ -305,8 +305,6 @@ struct ucred {
 /* IPX options */
 #define IPX_TYPE	1
 
-extern void cred_to_ucred(struct pid *pid, const struct cred *cred, struct ucred *ucred);
-
 extern int memcpy_fromiovecend(unsigned char *kdata, const struct iovec *iov,
 			       int offset, int len);
 extern int csum_partial_copy_fromiovecend(unsigned char *kdata, 
--- a/net/core/sock.c	2013-12-13 11:18:42.254612024 -0800
+++ b/net/core/sock.c	2013-12-13 11:19:14.714080063 -0800
@@ -925,7 +925,7 @@ set_rcvbuf:
 EXPORT_SYMBOL(sock_setsockopt);
 
 
-void cred_to_ucred(struct pid *pid, const struct cred *cred,
+static void cred_to_ucred(struct pid *pid, const struct cred *cred,
 		   struct ucred *ucred)
 {
 	ucred->pid = pid_vnr(pid);
@@ -937,7 +937,6 @@ void cred_to_ucred(struct pid *pid, cons
 		ucred->gid = from_kgid_munged(current_ns, cred->egid);
 	}
 }
-EXPORT_SYMBOL_GPL(cred_to_ucred);
 
 int sock_getsockopt(struct socket *sock, int level, int optname,
 		    char __user *optval, int __user *optlen)
@@ -1668,8 +1667,8 @@ EXPORT_SYMBOL(sock_wmalloc);
 /*
  * Allocate a skb from the socket's receive buffer.
  */
-struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force,
-			     gfp_t priority)
+static struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size,
+				    int force, gfp_t priority)
 {
 	if (force || atomic_read(&sk->sk_rmem_alloc) < sk->sk_rcvbuf) {
 		struct sk_buff *skb = alloc_skb(size, priority);
--- a/include/net/sock.h	2013-12-12 08:46:52.536025817 -0800
+++ b/include/net/sock.h	2013-12-13 11:21:04.472284937 -0800
@@ -1535,8 +1535,6 @@ struct sock *sk_clone_lock(const struct
 
 struct sk_buff *sock_wmalloc(struct sock *sk, unsigned long size, int force,
 			     gfp_t priority);
-struct sk_buff *sock_rmalloc(struct sock *sk, unsigned long size, int force,
-			     gfp_t priority);
 void sock_wfree(struct sk_buff *skb);
 void skb_orphan_partial(struct sk_buff *skb);
 void sock_rfree(struct sk_buff *skb);

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 9/10] lro: remove unused code
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
                   ` (6 preceding siblings ...)
  2013-12-16 18:44 ` [PATCH net-next 8/10] socket: make cred_to_ucred static Stephen Hemminger
@ 2013-12-16 18:45 ` Stephen Hemminger
  2013-12-16 19:54   ` Ben Hutchings
  2013-12-16 19:29 ` [PATCH net-next 10/10] dccp: remove dead code Stephen Hemminger
                   ` (2 subsequent siblings)
  10 siblings, 1 reply; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 18:45 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

This code is not used anywhere in net-next

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

--- a/include/linux/inet_lro.h	2013-10-06 14:48:24.742452035 -0700
+++ b/include/linux/inet_lro.h	2013-12-12 13:28:31.971391114 -0800
@@ -133,33 +133,10 @@ struct net_lro_mgr {
 void lro_receive_skb(struct net_lro_mgr *lro_mgr,
 		     struct sk_buff *skb,
 		     void *priv);
-
-/*
- * Processes a fragment list
- *
- * This functions aggregate fragments and generate SKBs do pass
- * the packets to the stack.
- *
- * @lro_mgr: LRO manager to use
- * @frags: Fragment to be processed. Must contain entire header in first
- *         element.
- * @len: Length of received data
- * @true_size: Actual size of memory the fragment is consuming
- * @priv: Private data that may be used by driver functions
- *        (for example get_tcp_ip_hdr)
- */
-
-void lro_receive_frags(struct net_lro_mgr *lro_mgr,
-		       struct skb_frag_struct *frags,
-		       int len, int true_size, void *priv, __wsum sum);
-
 /*
  * Forward all aggregated SKBs held by lro_mgr to network stack
  */
 
 void lro_flush_all(struct net_lro_mgr *lro_mgr);
 
-void lro_flush_pkt(struct net_lro_mgr *lro_mgr,
-		   struct iphdr *iph, struct tcphdr *tcph);
-
 #endif
--- a/net/ipv4/inet_lro.c	2013-10-06 14:48:24.966449847 -0700
+++ b/net/ipv4/inet_lro.c	2013-12-12 13:28:43.435225437 -0800
@@ -506,23 +506,6 @@ void lro_receive_skb(struct net_lro_mgr
 }
 EXPORT_SYMBOL(lro_receive_skb);
 
-void lro_receive_frags(struct net_lro_mgr *lro_mgr,
-		       struct skb_frag_struct *frags,
-		       int len, int true_size, void *priv, __wsum sum)
-{
-	struct sk_buff *skb;
-
-	skb = __lro_proc_segment(lro_mgr, frags, len, true_size, priv, sum);
-	if (!skb)
-		return;
-
-	if (lro_mgr->features & LRO_F_NAPI)
-		netif_receive_skb(skb);
-	else
-		netif_rx(skb);
-}
-EXPORT_SYMBOL(lro_receive_frags);
-
 void lro_flush_all(struct net_lro_mgr *lro_mgr)
 {
 	int i;
@@ -534,14 +517,3 @@ void lro_flush_all(struct net_lro_mgr *l
 	}
 }
 EXPORT_SYMBOL(lro_flush_all);
-
-void lro_flush_pkt(struct net_lro_mgr *lro_mgr,
-		  struct iphdr *iph, struct tcphdr *tcph)
-{
-	struct net_lro_desc *lro_desc;
-
-	lro_desc = lro_get_desc(lro_mgr, lro_mgr->lro_arr, iph, tcph);
-	if (lro_desc->active)
-		lro_flush(lro_mgr, lro_desc);
-}
-EXPORT_SYMBOL(lro_flush_pkt);

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 10/10] dccp: remove dead code
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
                   ` (7 preceding siblings ...)
  2013-12-16 18:45 ` [PATCH net-next 9/10] lro: remove unused code Stephen Hemminger
@ 2013-12-16 19:29 ` Stephen Hemminger
  2013-12-16 19:39 ` [PATCH net-next 10/10] dccp: remove unused code Stephen Hemminger
  2013-12-17 22:20 ` [PATCH net-next 1/10] ipv4: make fib_detect_death static David Miller
  10 siblings, 0 replies; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 19:29 UTC (permalink / raw)
  To: Gerrit Renker, David Miller; +Cc: netdev, dccp

This function is defined but not used.
Remove it now, can come back when used.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

--- a/net/dccp/dccp.h	2013-10-23 21:23:03.044671179 -0700
+++ b/net/dccp/dccp.h	2013-12-16 10:52:33.667013589 -0800
@@ -479,7 +479,6 @@ void dccp_feat_list_purge(struct list_he
 
 int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
 int dccp_insert_options_rsk(struct dccp_request_sock *, struct sk_buff *);
-int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed);
 u32 dccp_timestamp(void);
 void dccp_timestamping_init(void);
 int dccp_insert_option(struct sk_buff *skb, unsigned char option,
--- a/net/dccp/options.c	2013-10-06 14:48:24.962449886 -0700
+++ b/net/dccp/options.c	2013-12-16 10:52:53.266746098 -0800
@@ -343,38 +343,6 @@ static inline int dccp_elapsed_time_len(
 	return elapsed_time == 0 ? 0 : elapsed_time <= 0xFFFF ? 2 : 4;
 }
 
-/* FIXME: This function is currently not used anywhere */
-int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed_time)
-{
-	const int elapsed_time_len = dccp_elapsed_time_len(elapsed_time);
-	const int len = 2 + elapsed_time_len;
-	unsigned char *to;
-
-	if (elapsed_time_len == 0)
-		return 0;
-
-	if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN)
-		return -1;
-
-	DCCP_SKB_CB(skb)->dccpd_opt_len += len;
-
-	to    = skb_push(skb, len);
-	*to++ = DCCPO_ELAPSED_TIME;
-	*to++ = len;
-
-	if (elapsed_time_len == 2) {
-		const __be16 var16 = htons((u16)elapsed_time);
-		memcpy(to, &var16, 2);
-	} else {
-		const __be32 var32 = htonl(elapsed_time);
-		memcpy(to, &var32, 4);
-	}
-
-	return 0;
-}
-
-EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);
-
 static int dccp_insert_option_timestamp(struct sk_buff *skb)
 {
 	__be32 now = htonl(dccp_timestamp());

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH net-next 10/10] dccp: remove unused code
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
                   ` (8 preceding siblings ...)
  2013-12-16 19:29 ` [PATCH net-next 10/10] dccp: remove dead code Stephen Hemminger
@ 2013-12-16 19:39 ` Stephen Hemminger
  2013-12-16 22:27   ` Gerrit Renker
  2013-12-17 22:20 ` [PATCH net-next 1/10] ipv4: make fib_detect_death static David Miller
  10 siblings, 1 reply; 15+ messages in thread
From: Stephen Hemminger @ 2013-12-16 19:39 UTC (permalink / raw)
  To: Gerrit Renker, David Miller; +Cc: netdev, dccp

This function is defined but not used.
Remove it now, can come back when used.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

--- a/net/dccp/dccp.h	2013-10-23 21:23:03.044671179 -0700
+++ b/net/dccp/dccp.h	2013-12-16 10:52:33.667013589 -0800
@@ -479,7 +479,6 @@ void dccp_feat_list_purge(struct list_he
 
 int dccp_insert_options(struct sock *sk, struct sk_buff *skb);
 int dccp_insert_options_rsk(struct dccp_request_sock *, struct sk_buff *);
-int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed);
 u32 dccp_timestamp(void);
 void dccp_timestamping_init(void);
 int dccp_insert_option(struct sk_buff *skb, unsigned char option,
--- a/net/dccp/options.c	2013-10-06 14:48:24.962449886 -0700
+++ b/net/dccp/options.c	2013-12-16 10:52:53.266746098 -0800
@@ -343,38 +343,6 @@ static inline int dccp_elapsed_time_len(
 	return elapsed_time == 0 ? 0 : elapsed_time <= 0xFFFF ? 2 : 4;
 }
 
-/* FIXME: This function is currently not used anywhere */
-int dccp_insert_option_elapsed_time(struct sk_buff *skb, u32 elapsed_time)
-{
-	const int elapsed_time_len = dccp_elapsed_time_len(elapsed_time);
-	const int len = 2 + elapsed_time_len;
-	unsigned char *to;
-
-	if (elapsed_time_len == 0)
-		return 0;
-
-	if (DCCP_SKB_CB(skb)->dccpd_opt_len + len > DCCP_MAX_OPT_LEN)
-		return -1;
-
-	DCCP_SKB_CB(skb)->dccpd_opt_len += len;
-
-	to    = skb_push(skb, len);
-	*to++ = DCCPO_ELAPSED_TIME;
-	*to++ = len;
-
-	if (elapsed_time_len == 2) {
-		const __be16 var16 = htons((u16)elapsed_time);
-		memcpy(to, &var16, 2);
-	} else {
-		const __be32 var32 = htonl(elapsed_time);
-		memcpy(to, &var32, 4);
-	}
-
-	return 0;
-}
-
-EXPORT_SYMBOL_GPL(dccp_insert_option_elapsed_time);
-
 static int dccp_insert_option_timestamp(struct sk_buff *skb)
 {
 	__be32 now = htonl(dccp_timestamp());

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 9/10] lro: remove unused code
  2013-12-16 18:45 ` [PATCH net-next 9/10] lro: remove unused code Stephen Hemminger
@ 2013-12-16 19:54   ` Ben Hutchings
  2013-12-17 22:20     ` David Miller
  0 siblings, 1 reply; 15+ messages in thread
From: Ben Hutchings @ 2013-12-16 19:54 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev

On Mon, 2013-12-16 at 10:45 -0800, Stephen Hemminger wrote:
> This code is not used anywhere in net-next
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
[...]
> --- a/net/ipv4/inet_lro.c	2013-10-06 14:48:24.966449847 -0700
> +++ b/net/ipv4/inet_lro.c	2013-12-12 13:28:43.435225437 -0800
> @@ -506,23 +506,6 @@ void lro_receive_skb(struct net_lro_mgr
>  }
>  EXPORT_SYMBOL(lro_receive_skb);
>  
> -void lro_receive_frags(struct net_lro_mgr *lro_mgr,
> -		       struct skb_frag_struct *frags,
> -		       int len, int true_size, void *priv, __wsum sum)
> -{
> -	struct sk_buff *skb;
> -
> -	skb = __lro_proc_segment(lro_mgr, frags, len, true_size, priv, sum);

You should remove unused functions recursively.  After this, you can
remove at least __lro_proc_segment(), lro_gen_skb() and lro_add_frags().

> -	if (!skb)
> -		return;
> -
> -	if (lro_mgr->features & LRO_F_NAPI)
> -		netif_receive_skb(skb);
> -	else
> -		netif_rx(skb);
> -}
> -EXPORT_SYMBOL(lro_receive_frags);
> -
>  void lro_flush_all(struct net_lro_mgr *lro_mgr)
>  {
>  	int i;
> @@ -534,14 +517,3 @@ void lro_flush_all(struct net_lro_mgr *l
>  	}
>  }
>  EXPORT_SYMBOL(lro_flush_all);
> -
> -void lro_flush_pkt(struct net_lro_mgr *lro_mgr,
> -		  struct iphdr *iph, struct tcphdr *tcph)
> -{
> -	struct net_lro_desc *lro_desc;
> -
> -	lro_desc = lro_get_desc(lro_mgr, lro_mgr->lro_arr, iph, tcph);
> -	if (lro_desc->active)
> -		lro_flush(lro_mgr, lro_desc);
> -}
> -EXPORT_SYMBOL(lro_flush_pkt);

It looks like lro_flush_pkt() was *never* used!

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 10/10] dccp: remove unused code
  2013-12-16 19:39 ` [PATCH net-next 10/10] dccp: remove unused code Stephen Hemminger
@ 2013-12-16 22:27   ` Gerrit Renker
  0 siblings, 0 replies; 15+ messages in thread
From: Gerrit Renker @ 2013-12-16 22:27 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: David Miller, netdev, dccp

(We had left it in there since the spec defines the option in RFC 4340, 13.2,
 but there had so far not been any need to use it.)

> This function is defined but not used.
> Remove it now, can come back when used.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 1/10] ipv4: make fib_detect_death static
  2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
                   ` (9 preceding siblings ...)
  2013-12-16 19:39 ` [PATCH net-next 10/10] dccp: remove unused code Stephen Hemminger
@ 2013-12-17 22:20 ` David Miller
  10 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2013-12-17 22:20 UTC (permalink / raw)
  To: stephen; +Cc: netdev

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 16 Dec 2013 10:36:06 -0800

> @@ -426,7 +426,7 @@ struct fib_alias *fib_find_alias(struct
>  	return NULL;
>  }
>  
> -int fib_detect_death(struct fib_info *fi, int order,
> +static int fib_detect_death(struct fib_info *fi, int order,
>  		     struct fib_info **last_resort, int *last_idx, int dflt)

Please update the argument indentation when you add the static
tag like this, I see you did this properly elsewhere in this
series.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH net-next 9/10] lro: remove unused code
  2013-12-16 19:54   ` Ben Hutchings
@ 2013-12-17 22:20     ` David Miller
  0 siblings, 0 replies; 15+ messages in thread
From: David Miller @ 2013-12-17 22:20 UTC (permalink / raw)
  To: bhutchings; +Cc: stephen, netdev

From: Ben Hutchings <bhutchings@solarflare.com>
Date: Mon, 16 Dec 2013 19:54:27 +0000

> On Mon, 2013-12-16 at 10:45 -0800, Stephen Hemminger wrote:
>> This code is not used anywhere in net-next
>> 
>> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> [...]
>> --- a/net/ipv4/inet_lro.c	2013-10-06 14:48:24.966449847 -0700
>> +++ b/net/ipv4/inet_lro.c	2013-12-12 13:28:43.435225437 -0800
>> @@ -506,23 +506,6 @@ void lro_receive_skb(struct net_lro_mgr
>>  }
>>  EXPORT_SYMBOL(lro_receive_skb);
>>  
>> -void lro_receive_frags(struct net_lro_mgr *lro_mgr,
>> -		       struct skb_frag_struct *frags,
>> -		       int len, int true_size, void *priv, __wsum sum)
>> -{
>> -	struct sk_buff *skb;
>> -
>> -	skb = __lro_proc_segment(lro_mgr, frags, len, true_size, priv, sum);
> 
> You should remove unused functions recursively.  After this, you can
> remove at least __lro_proc_segment(), lro_gen_skb() and lro_add_frags().

Agreed.

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2013-12-17 22:20 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-16 18:36 [PATCH net-next 1/10] ipv4: make fib_detect_death static Stephen Hemminger
2013-12-16 18:37 ` [PATCH net-next 2/10] arp: make arp_invalidate static Stephen Hemminger
2013-12-16 18:38 ` [PATCH net-next 3/10] ipv4: remove unused function Stephen Hemminger
2013-12-16 18:39 ` [PATCH net-next 4/10] ipv4: ping make local stuff static Stephen Hemminger
2013-12-16 18:40 ` [PATCH net-next 5/10] tcp: make local functions static Stephen Hemminger
2013-12-16 18:42 ` [PATCH net-next 6/10] bonding: make local function static Stephen Hemminger
2013-12-16 18:43 ` [PATCH net-next 7/10] ipv6: make icmpv6_route_lookup static Stephen Hemminger
2013-12-16 18:44 ` [PATCH net-next 8/10] socket: make cred_to_ucred static Stephen Hemminger
2013-12-16 18:45 ` [PATCH net-next 9/10] lro: remove unused code Stephen Hemminger
2013-12-16 19:54   ` Ben Hutchings
2013-12-17 22:20     ` David Miller
2013-12-16 19:29 ` [PATCH net-next 10/10] dccp: remove dead code Stephen Hemminger
2013-12-16 19:39 ` [PATCH net-next 10/10] dccp: remove unused code Stephen Hemminger
2013-12-16 22:27   ` Gerrit Renker
2013-12-17 22:20 ` [PATCH net-next 1/10] ipv4: make fib_detect_death static David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).