All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/6]: Tidy up unused structures
@ 2006-11-21 15:45 Gerrit Renker
  2006-11-23 23:30 ` Arnaldo Carvalho de Melo
  2006-11-24 10:05 ` Gerrit Renker
  0 siblings, 2 replies; 3+ messages in thread
From: Gerrit Renker @ 2006-11-21 15:45 UTC (permalink / raw)
  To: dccp

[CCID 3]: Tidy up unused structures

This removes and cleans up unused variables and structures 
which have become unnecessary following the introduction of
the EWMA patch to automatically track the CCID 3 receiver/sender
packet sizes `s'.

Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
 include/linux/dccp.h   |    3 ---
 net/dccp/ccids/ccid3.h |    4 ----
 net/dccp/proto.c       |    7 -------
 3 files changed, 14 deletions(-)

--- a/include/linux/dccp.h
+++ b/include/linux/dccp.h
@@ -200,7 +200,6 @@ struct dccp_so_feat {
 };
 
 /* DCCP socket options */
-#define DCCP_SOCKOPT_PACKET_SIZE	1
 #define DCCP_SOCKOPT_SERVICE		2
 #define DCCP_SOCKOPT_CHANGE_L		3
 #define DCCP_SOCKOPT_CHANGE_R		4
@@ -460,7 +459,6 @@ struct dccp_ackvec;
  * @dccps_service_list - second .. last service code on passive socket
  * @dccps_timestamp_time - time of latest TIMESTAMP option
  * @dccps_timestamp_echo - latest timestamp received on a TIMESTAMP option
- * @dccps_packet_size - Set thru setsockopt
  * @dccps_l_ack_ratio -
  * @dccps_r_ack_ratio -
  * @dccps_pcslen - sender   partial checksum coverage (via sockopt)
@@ -495,7 +493,6 @@ struct dccp_sock {
 	struct dccp_service_list	*dccps_service_list;
 	struct timeval			dccps_timestamp_time;
 	__u32				dccps_timestamp_echo;
-	__u32				dccps_packet_size;
 	__u16				dccps_l_ack_ratio;
 	__u16				dccps_r_ack_ratio;
 	__u16				dccps_pcslen;
--- a/net/dccp/ccids/ccid3.h
+++ b/net/dccp/ccids/ccid3.h
@@ -42,10 +42,6 @@
 #include <linux/tfrc.h>
 #include "../ccid.h"
 
-#define TFRC_MIN_PACKET_SIZE	   16
-#define TFRC_STD_PACKET_SIZE	  256
-#define TFRC_MAX_PACKET_SIZE	65535
-
 /* Two seconds as per CCID3 spec */
 #define TFRC_INITIAL_TIMEOUT	   (2 * USEC_PER_SEC)
 
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -469,9 +469,6 @@ static int do_dccp_setsockopt(struct soc
 
 	lock_sock(sk);
 	switch (optname) {
-	case DCCP_SOCKOPT_PACKET_SIZE:
-		dp->dccps_packet_size = val;
-		break;
 	case DCCP_SOCKOPT_CHANGE_L:
 		if (optlen != sizeof(struct dccp_so_feat))
 			err = -EINVAL;
@@ -580,10 +577,6 @@ static int do_dccp_getsockopt(struct soc
 	dp = dccp_sk(sk);
 
 	switch (optname) {
-	case DCCP_SOCKOPT_PACKET_SIZE:
-		val = dp->dccps_packet_size;
-		len = sizeof(dp->dccps_packet_size);
-		break;
 	case DCCP_SOCKOPT_SERVICE:
 		return dccp_getsockopt_service(sk, len,
 					       (__be32 __user *)optval, optlen);

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

* Re: [PATCH 6/6]: Tidy up unused structures
  2006-11-21 15:45 [PATCH 6/6]: Tidy up unused structures Gerrit Renker
@ 2006-11-23 23:30 ` Arnaldo Carvalho de Melo
  2006-11-24 10:05 ` Gerrit Renker
  1 sibling, 0 replies; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2006-11-23 23:30 UTC (permalink / raw)
  To: dccp

On Tue, Nov 21, 2006 at 03:45:46PM +0000, Gerrit Renker wrote:
> [CCID 3]: Tidy up unused structures
> 
> This removes and cleans up unused variables and structures 
> which have become unnecessary following the introduction of
> the EWMA patch to automatically track the CCID 3 receiver/sender
> packet sizes `s'.
> 
> Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
> ---
>  include/linux/dccp.h   |    3 ---
>  net/dccp/ccids/ccid3.h |    4 ----
>  net/dccp/proto.c       |    7 -------
>  3 files changed, 14 deletions(-)
> 
> --- a/include/linux/dccp.h
> +++ b/include/linux/dccp.h
> @@ -200,7 +200,6 @@ struct dccp_so_feat {
>  };
>  
>  /* DCCP socket options */
> -#define DCCP_SOCKOPT_PACKET_SIZE	1

Suggestion: just add a comment stating that DCCP_SOCKOPT_PACKET_SIZE is
deprecated and ...

>  #define DCCP_SOCKOPT_SERVICE		2

<SNIP>
  
> --- a/net/dccp/proto.c
> +++ b/net/dccp/proto.c
> @@ -469,9 +469,6 @@ static int do_dccp_setsockopt(struct soc
>  
>  	lock_sock(sk);
>  	switch (optname) {
> -	case DCCP_SOCKOPT_PACKET_SIZE:
> -		dp->dccps_packet_size = val;
> -		break;

... printk(KERN_WARNING "setsockopt(PACKET_SIZE) is deprecated, "
			"fix your app\n");

Its not like there are tons of apps using this interface, but I think
that this is what we have to do in these cases.

- Arnaldo

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

* Re: [PATCH 6/6]: Tidy up unused structures
  2006-11-21 15:45 [PATCH 6/6]: Tidy up unused structures Gerrit Renker
  2006-11-23 23:30 ` Arnaldo Carvalho de Melo
@ 2006-11-24 10:05 ` Gerrit Renker
  1 sibling, 0 replies; 3+ messages in thread
From: Gerrit Renker @ 2006-11-24 10:05 UTC (permalink / raw)
  To: dccp

Quoting Arnaldo Carvalho de Melo:
|  > --- a/net/dccp/proto.c
|  > +++ b/net/dccp/proto.c
|  > @@ -469,9 +469,6 @@ static int do_dccp_setsockopt(struct soc
|  >  
|  >       lock_sock(sk);
|  >       switch (optname) {
|  > -     case DCCP_SOCKOPT_PACKET_SIZE:
|  > -             dp->dccps_packet_size = val;
|  > -             break;
|  
|  ... printk(KERN_WARNING "setsockopt(PACKET_SIZE) is deprecated, "
|                          "fix your app\n");
Many thanks for spotting this - I will update the patch and resubmit it.
How bad to think what happens if 1 gets re-allocated and an old app tries
to set it ... :-x


Gerrit

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

end of thread, other threads:[~2006-11-24 10:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-21 15:45 [PATCH 6/6]: Tidy up unused structures Gerrit Renker
2006-11-23 23:30 ` Arnaldo Carvalho de Melo
2006-11-24 10:05 ` Gerrit Renker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.