linux-sctp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID
@ 2008-04-30 14:46 Neil Horman
  2008-05-05 11:32 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC Neil Horman
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Neil Horman @ 2008-04-30 14:46 UTC (permalink / raw)
  To: linux-sctp

Hey all-

Add support for RFC3873 remote address table OID.  Currently the OID's required
by RFC 3873 cannot be implemented as part of the association table, where they
would otherwise naturally belong.  This patch places all the requsite data in a
separate proc file, /proc/net/sctp/remaddr
    
Regards
Neil 

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>


include/net/sctp/sctp.h |    2 
net/sctp/proc.c         |  144 ++++++++++++++++++++++++++++++++++++++++++++++++
net/sctp/protocol.c     |    3 +
3 files changed, 149 insertions(+)

diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 34318a3..c1b087d 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -186,6 +186,8 @@ int sctp_eps_proc_init(void);
 void sctp_eps_proc_exit(void);
 int sctp_assocs_proc_init(void);
 void sctp_assocs_proc_exit(void);
+int sctp_remaddr_proc_init(void);
+void sctp_remaddr_proc_exit(void);
 
 
 /*
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 2499732..dc80cd7 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -402,3 +402,147 @@ void sctp_assocs_proc_exit(void)
 {
 	remove_proc_entry("assocs", proc_net_sctp);
 }
+
+static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)
+{
+	if (*pos >= sctp_assoc_hashsize)
+		return NULL;
+
+	if (*pos < 0)
+		*pos = 0;
+
+	if (*pos = 0)
+		seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
+				"REM_ADDR_RTX  START\n");
+
+	return (void *)pos;
+}
+
+static void *sctp_remaddr_seq_next(struct seq_file *seq, void *v, loff_t *pos)
+{
+	if (++*pos >= sctp_assoc_hashsize)
+		return NULL;
+
+	return pos;
+}
+
+static void sctp_remaddr_seq_stop(struct seq_file *seq, void *v)
+{
+	return;
+}
+
+static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
+{
+	struct sctp_hashbucket *head;
+	struct sctp_ep_common *epb;
+	struct sctp_association *assoc;
+	struct hlist_node *node;
+	struct list_head *pos;
+	int    hash = *(loff_t *)v;
+
+	if (hash >= sctp_assoc_hashsize)
+		return -ENOMEM;
+
+	head = &sctp_assoc_hashtable[hash];
+	sctp_local_bh_disable();
+	read_lock(&head->lock);
+	sctp_for_each_hentry(epb, node, &head->chain) {
+		assoc = sctp_assoc(epb);
+		list_for_each(pos, &assoc->peer.transport_addr_list) {
+			struct sctp_transport *tsp;
+			tsp = list_entry(pos, struct sctp_transport,
+					 transports);
+			/*
+			 * The remote address (ADDR)
+			 */
+			tsp->af_specific->seq_dump_addr(seq, &tsp->ipaddr);
+			seq_printf(seq, " ");
+
+			/*
+			 * The association ID (ASSOC_ID)
+			 */
+			seq_printf(seq, "%d ", tsp->asoc->assoc_id);
+
+			/*
+			 * If the Heartbeat is active (HB_ACT)
+			 * Note: 1 = Active, 0 = Inactive
+			 */
+			seq_printf(seq, "%d ", timer_pending(&tsp->hb_timer));
+
+			/*
+			 * Retransmit time out (RTO)
+			 */
+			seq_printf(seq, "%lu ", tsp->rto);
+
+			/*
+			 * Maximum path retransmit count (PATH_MAX_RTX)
+			 */
+			seq_printf(seq, "%d ", tsp->pathmaxrxt);
+
+			/*
+			 * remote address retransmit count (REM_ADDR_RTX)
+			 * Note: We don't have a way to tally this at the moment
+			 * so lets just leave it as zero for the moment
+			 */
+			seq_printf(seq, "0 ");
+
+			/*
+			 * remote address start time (START).  This is also not
+			 * currently implemented, but we can record it with a
+			 * jiffies marker in a subsequent patch
+			 */
+			seq_printf(seq, "0");
+
+			seq_printf(seq, "\n");
+		}
+	}
+
+	read_unlock(&head->lock);
+	sctp_local_bh_enable();
+
+	return 0;
+
+}
+
+static const struct seq_operations sctp_remaddr_ops = {
+	.start = sctp_remaddr_seq_start,
+	.next  = sctp_remaddr_seq_next,
+	.stop  = sctp_remaddr_seq_stop,
+	.show  = sctp_remaddr_seq_show,
+};
+
+/* Cleanup the proc fs entry for 'remaddr' object. */
+void sctp_remaddr_proc_exit(void)
+{
+	remove_proc_entry("remaddr", proc_net_sctp);
+}
+
+static int sctp_remaddr_seq_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &sctp_remaddr_ops);
+}
+
+static const struct file_operations sctp_remaddr_seq_fops = {
+	.open = sctp_remaddr_seq_open,
+	.read = seq_read,
+	.llseek = seq_lseek,
+	.release = seq_release,
+};
+
+int __init sctp_remaddr_proc_init(void)
+{
+	struct proc_dir_entry *p;
+
+	p = create_proc_entry("remaddr", S_IRUGO, proc_net_sctp);
+	if (!p)
+		return -ENOMEM;
+	p->proc_fops = &sctp_remaddr_seq_fops;
+
+	return 0;
+}
+
+void sctp_assoc_proc_exit(void)
+{
+	remove_proc_entry("remaddr", proc_net_sctp);
+}
+
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index d50f610..15be5cb 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -113,6 +113,8 @@ static __init int sctp_proc_init(void)
 		goto out_nomem;
 	if (sctp_assocs_proc_init())
 		goto out_nomem;
+	if (sctp_remaddr_proc_init())
+		goto out_nomem;
 
 	return 0;
 
@@ -129,6 +131,7 @@ static void sctp_proc_exit(void)
 	sctp_snmp_proc_exit();
 	sctp_eps_proc_exit();
 	sctp_assocs_proc_exit();
+	sctp_remaddr_proc_exit();
 
 	if (proc_net_sctp) {
 		proc_net_sctp = NULL;
-- 
/***************************************************
 *Neil Horman
 *nhorman@tuxdriver.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/

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

* Re: [PATCH] add /proc/net/sctp/remaddr table to complete RFC
  2008-04-30 14:46 [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
@ 2008-05-05 11:32 ` Neil Horman
  2008-05-06 23:29 ` Neil Horman
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Neil Horman @ 2008-05-05 11:32 UTC (permalink / raw)
  To: linux-sctp

On Wed, Apr 30, 2008 at 10:46:06AM -0400, Neil Horman wrote:
> Hey all-
> 
> Add support for RFC3873 remote address table OID.  Currently the OID's required
> by RFC 3873 cannot be implemented as part of the association table, where they
> would otherwise naturally belong.  This patch places all the requsite data in a
> separate proc file, /proc/net/sctp/remaddr
>     
> Regards
> Neil 
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> 
> 
> include/net/sctp/sctp.h |    2 
> net/sctp/proc.c         |  144 ++++++++++++++++++++++++++++++++++++++++++++++++
> net/sctp/protocol.c     |    3 +
> 3 files changed, 149 insertions(+)
> 


Vlad, any feedback here?

Neil

> diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
> index 34318a3..c1b087d 100644
> --- a/include/net/sctp/sctp.h
> +++ b/include/net/sctp/sctp.h
> @@ -186,6 +186,8 @@ int sctp_eps_proc_init(void);
>  void sctp_eps_proc_exit(void);
>  int sctp_assocs_proc_init(void);
>  void sctp_assocs_proc_exit(void);
> +int sctp_remaddr_proc_init(void);
> +void sctp_remaddr_proc_exit(void);
>  
>  
>  /*
> diff --git a/net/sctp/proc.c b/net/sctp/proc.c
> index 2499732..dc80cd7 100644
> --- a/net/sctp/proc.c
> +++ b/net/sctp/proc.c
> @@ -402,3 +402,147 @@ void sctp_assocs_proc_exit(void)
>  {
>  	remove_proc_entry("assocs", proc_net_sctp);
>  }
> +
> +static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)
> +{
> +	if (*pos >= sctp_assoc_hashsize)
> +		return NULL;
> +
> +	if (*pos < 0)
> +		*pos = 0;
> +
> +	if (*pos = 0)
> +		seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
> +				"REM_ADDR_RTX  START\n");
> +
> +	return (void *)pos;
> +}
> +
> +static void *sctp_remaddr_seq_next(struct seq_file *seq, void *v, loff_t *pos)
> +{
> +	if (++*pos >= sctp_assoc_hashsize)
> +		return NULL;
> +
> +	return pos;
> +}
> +
> +static void sctp_remaddr_seq_stop(struct seq_file *seq, void *v)
> +{
> +	return;
> +}
> +
> +static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
> +{
> +	struct sctp_hashbucket *head;
> +	struct sctp_ep_common *epb;
> +	struct sctp_association *assoc;
> +	struct hlist_node *node;
> +	struct list_head *pos;
> +	int    hash = *(loff_t *)v;
> +
> +	if (hash >= sctp_assoc_hashsize)
> +		return -ENOMEM;
> +
> +	head = &sctp_assoc_hashtable[hash];
> +	sctp_local_bh_disable();
> +	read_lock(&head->lock);
> +	sctp_for_each_hentry(epb, node, &head->chain) {
> +		assoc = sctp_assoc(epb);
> +		list_for_each(pos, &assoc->peer.transport_addr_list) {
> +			struct sctp_transport *tsp;
> +			tsp = list_entry(pos, struct sctp_transport,
> +					 transports);
> +			/*
> +			 * The remote address (ADDR)
> +			 */
> +			tsp->af_specific->seq_dump_addr(seq, &tsp->ipaddr);
> +			seq_printf(seq, " ");
> +
> +			/*
> +			 * The association ID (ASSOC_ID)
> +			 */
> +			seq_printf(seq, "%d ", tsp->asoc->assoc_id);
> +
> +			/*
> +			 * If the Heartbeat is active (HB_ACT)
> +			 * Note: 1 = Active, 0 = Inactive
> +			 */
> +			seq_printf(seq, "%d ", timer_pending(&tsp->hb_timer));
> +
> +			/*
> +			 * Retransmit time out (RTO)
> +			 */
> +			seq_printf(seq, "%lu ", tsp->rto);
> +
> +			/*
> +			 * Maximum path retransmit count (PATH_MAX_RTX)
> +			 */
> +			seq_printf(seq, "%d ", tsp->pathmaxrxt);
> +
> +			/*
> +			 * remote address retransmit count (REM_ADDR_RTX)
> +			 * Note: We don't have a way to tally this at the moment
> +			 * so lets just leave it as zero for the moment
> +			 */
> +			seq_printf(seq, "0 ");
> +
> +			/*
> +			 * remote address start time (START).  This is also not
> +			 * currently implemented, but we can record it with a
> +			 * jiffies marker in a subsequent patch
> +			 */
> +			seq_printf(seq, "0");
> +
> +			seq_printf(seq, "\n");
> +		}
> +	}
> +
> +	read_unlock(&head->lock);
> +	sctp_local_bh_enable();
> +
> +	return 0;
> +
> +}
> +
> +static const struct seq_operations sctp_remaddr_ops = {
> +	.start = sctp_remaddr_seq_start,
> +	.next  = sctp_remaddr_seq_next,
> +	.stop  = sctp_remaddr_seq_stop,
> +	.show  = sctp_remaddr_seq_show,
> +};
> +
> +/* Cleanup the proc fs entry for 'remaddr' object. */
> +void sctp_remaddr_proc_exit(void)
> +{
> +	remove_proc_entry("remaddr", proc_net_sctp);
> +}
> +
> +static int sctp_remaddr_seq_open(struct inode *inode, struct file *file)
> +{
> +	return seq_open(file, &sctp_remaddr_ops);
> +}
> +
> +static const struct file_operations sctp_remaddr_seq_fops = {
> +	.open = sctp_remaddr_seq_open,
> +	.read = seq_read,
> +	.llseek = seq_lseek,
> +	.release = seq_release,
> +};
> +
> +int __init sctp_remaddr_proc_init(void)
> +{
> +	struct proc_dir_entry *p;
> +
> +	p = create_proc_entry("remaddr", S_IRUGO, proc_net_sctp);
> +	if (!p)
> +		return -ENOMEM;
> +	p->proc_fops = &sctp_remaddr_seq_fops;
> +
> +	return 0;
> +}
> +
> +void sctp_assoc_proc_exit(void)
> +{
> +	remove_proc_entry("remaddr", proc_net_sctp);
> +}
> +
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index d50f610..15be5cb 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -113,6 +113,8 @@ static __init int sctp_proc_init(void)
>  		goto out_nomem;
>  	if (sctp_assocs_proc_init())
>  		goto out_nomem;
> +	if (sctp_remaddr_proc_init())
> +		goto out_nomem;
>  
>  	return 0;
>  
> @@ -129,6 +131,7 @@ static void sctp_proc_exit(void)
>  	sctp_snmp_proc_exit();
>  	sctp_eps_proc_exit();
>  	sctp_assocs_proc_exit();
> +	sctp_remaddr_proc_exit();
>  
>  	if (proc_net_sctp) {
>  		proc_net_sctp = NULL;
> -- 
> /***************************************************
>  *Neil Horman
>  *nhorman@tuxdriver.com
>  *gpg keyid: 1024D / 0x92A74FA1
>  *http://pgp.mit.edu
>  ***************************************************/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/

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

* Re: [PATCH] add /proc/net/sctp/remaddr table to complete RFC
  2008-04-30 14:46 [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
  2008-05-05 11:32 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC Neil Horman
@ 2008-05-06 23:29 ` Neil Horman
  2008-05-07 12:25 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote Vlad Yasevich
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Neil Horman @ 2008-05-06 23:29 UTC (permalink / raw)
  To: linux-sctp

On Mon, May 05, 2008 at 07:32:23AM -0400, Neil Horman wrote:
> On Wed, Apr 30, 2008 at 10:46:06AM -0400, Neil Horman wrote:
> > Hey all-
> > 
> > Add support for RFC3873 remote address table OID.  Currently the OID's required
> > by RFC 3873 cannot be implemented as part of the association table, where they
> > would otherwise naturally belong.  This patch places all the requsite data in a
> > separate proc file, /proc/net/sctp/remaddr
> >     
> > Regards
> > Neil 
> > 
> > Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> > 
> > 
> > include/net/sctp/sctp.h |    2 
> > net/sctp/proc.c         |  144 ++++++++++++++++++++++++++++++++++++++++++++++++
> > net/sctp/protocol.c     |    3 +
> > 3 files changed, 149 insertions(+)
> > 
> 
> 
> Vlad, any feedback here?
> 
> Neil
> 
Ping?

Neil

> > diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
> > index 34318a3..c1b087d 100644
> > --- a/include/net/sctp/sctp.h
> > +++ b/include/net/sctp/sctp.h
> > @@ -186,6 +186,8 @@ int sctp_eps_proc_init(void);
> >  void sctp_eps_proc_exit(void);
> >  int sctp_assocs_proc_init(void);
> >  void sctp_assocs_proc_exit(void);
> > +int sctp_remaddr_proc_init(void);
> > +void sctp_remaddr_proc_exit(void);
> >  
> >  
> >  /*
> > diff --git a/net/sctp/proc.c b/net/sctp/proc.c
> > index 2499732..dc80cd7 100644
> > --- a/net/sctp/proc.c
> > +++ b/net/sctp/proc.c
> > @@ -402,3 +402,147 @@ void sctp_assocs_proc_exit(void)
> >  {
> >  	remove_proc_entry("assocs", proc_net_sctp);
> >  }
> > +
> > +static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)
> > +{
> > +	if (*pos >= sctp_assoc_hashsize)
> > +		return NULL;
> > +
> > +	if (*pos < 0)
> > +		*pos = 0;
> > +
> > +	if (*pos = 0)
> > +		seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
> > +				"REM_ADDR_RTX  START\n");
> > +
> > +	return (void *)pos;
> > +}
> > +
> > +static void *sctp_remaddr_seq_next(struct seq_file *seq, void *v, loff_t *pos)
> > +{
> > +	if (++*pos >= sctp_assoc_hashsize)
> > +		return NULL;
> > +
> > +	return pos;
> > +}
> > +
> > +static void sctp_remaddr_seq_stop(struct seq_file *seq, void *v)
> > +{
> > +	return;
> > +}
> > +
> > +static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
> > +{
> > +	struct sctp_hashbucket *head;
> > +	struct sctp_ep_common *epb;
> > +	struct sctp_association *assoc;
> > +	struct hlist_node *node;
> > +	struct list_head *pos;
> > +	int    hash = *(loff_t *)v;
> > +
> > +	if (hash >= sctp_assoc_hashsize)
> > +		return -ENOMEM;
> > +
> > +	head = &sctp_assoc_hashtable[hash];
> > +	sctp_local_bh_disable();
> > +	read_lock(&head->lock);
> > +	sctp_for_each_hentry(epb, node, &head->chain) {
> > +		assoc = sctp_assoc(epb);
> > +		list_for_each(pos, &assoc->peer.transport_addr_list) {
> > +			struct sctp_transport *tsp;
> > +			tsp = list_entry(pos, struct sctp_transport,
> > +					 transports);
> > +			/*
> > +			 * The remote address (ADDR)
> > +			 */
> > +			tsp->af_specific->seq_dump_addr(seq, &tsp->ipaddr);
> > +			seq_printf(seq, " ");
> > +
> > +			/*
> > +			 * The association ID (ASSOC_ID)
> > +			 */
> > +			seq_printf(seq, "%d ", tsp->asoc->assoc_id);
> > +
> > +			/*
> > +			 * If the Heartbeat is active (HB_ACT)
> > +			 * Note: 1 = Active, 0 = Inactive
> > +			 */
> > +			seq_printf(seq, "%d ", timer_pending(&tsp->hb_timer));
> > +
> > +			/*
> > +			 * Retransmit time out (RTO)
> > +			 */
> > +			seq_printf(seq, "%lu ", tsp->rto);
> > +
> > +			/*
> > +			 * Maximum path retransmit count (PATH_MAX_RTX)
> > +			 */
> > +			seq_printf(seq, "%d ", tsp->pathmaxrxt);
> > +
> > +			/*
> > +			 * remote address retransmit count (REM_ADDR_RTX)
> > +			 * Note: We don't have a way to tally this at the moment
> > +			 * so lets just leave it as zero for the moment
> > +			 */
> > +			seq_printf(seq, "0 ");
> > +
> > +			/*
> > +			 * remote address start time (START).  This is also not
> > +			 * currently implemented, but we can record it with a
> > +			 * jiffies marker in a subsequent patch
> > +			 */
> > +			seq_printf(seq, "0");
> > +
> > +			seq_printf(seq, "\n");
> > +		}
> > +	}
> > +
> > +	read_unlock(&head->lock);
> > +	sctp_local_bh_enable();
> > +
> > +	return 0;
> > +
> > +}
> > +
> > +static const struct seq_operations sctp_remaddr_ops = {
> > +	.start = sctp_remaddr_seq_start,
> > +	.next  = sctp_remaddr_seq_next,
> > +	.stop  = sctp_remaddr_seq_stop,
> > +	.show  = sctp_remaddr_seq_show,
> > +};
> > +
> > +/* Cleanup the proc fs entry for 'remaddr' object. */
> > +void sctp_remaddr_proc_exit(void)
> > +{
> > +	remove_proc_entry("remaddr", proc_net_sctp);
> > +}
> > +
> > +static int sctp_remaddr_seq_open(struct inode *inode, struct file *file)
> > +{
> > +	return seq_open(file, &sctp_remaddr_ops);
> > +}
> > +
> > +static const struct file_operations sctp_remaddr_seq_fops = {
> > +	.open = sctp_remaddr_seq_open,
> > +	.read = seq_read,
> > +	.llseek = seq_lseek,
> > +	.release = seq_release,
> > +};
> > +
> > +int __init sctp_remaddr_proc_init(void)
> > +{
> > +	struct proc_dir_entry *p;
> > +
> > +	p = create_proc_entry("remaddr", S_IRUGO, proc_net_sctp);
> > +	if (!p)
> > +		return -ENOMEM;
> > +	p->proc_fops = &sctp_remaddr_seq_fops;
> > +
> > +	return 0;
> > +}
> > +
> > +void sctp_assoc_proc_exit(void)
> > +{
> > +	remove_proc_entry("remaddr", proc_net_sctp);
> > +}
> > +
> > diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> > index d50f610..15be5cb 100644
> > --- a/net/sctp/protocol.c
> > +++ b/net/sctp/protocol.c
> > @@ -113,6 +113,8 @@ static __init int sctp_proc_init(void)
> >  		goto out_nomem;
> >  	if (sctp_assocs_proc_init())
> >  		goto out_nomem;
> > +	if (sctp_remaddr_proc_init())
> > +		goto out_nomem;
> >  
> >  	return 0;
> >  
> > @@ -129,6 +131,7 @@ static void sctp_proc_exit(void)
> >  	sctp_snmp_proc_exit();
> >  	sctp_eps_proc_exit();
> >  	sctp_assocs_proc_exit();
> > +	sctp_remaddr_proc_exit();
> >  
> >  	if (proc_net_sctp) {
> >  		proc_net_sctp = NULL;
> > -- 
> > /***************************************************
> >  *Neil Horman
> >  *nhorman@tuxdriver.com
> >  *gpg keyid: 1024D / 0x92A74FA1
> >  *http://pgp.mit.edu
> >  ***************************************************/
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> -- 
> /****************************************************
>  * Neil Horman <nhorman@tuxdriver.com>
>  * Software Engineer, Red Hat
>  ****************************************************/
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/

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

* Re: [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote
  2008-04-30 14:46 [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
  2008-05-05 11:32 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC Neil Horman
  2008-05-06 23:29 ` Neil Horman
@ 2008-05-07 12:25 ` Vlad Yasevich
  2008-05-07 17:45 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC Neil Horman
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Vlad Yasevich @ 2008-05-07 12:25 UTC (permalink / raw)
  To: linux-sctp

Neil Horman wrote:
> Hey all-
> 
> Add support for RFC3873 remote address table OID.  Currently the OID's required
> by RFC 3873 cannot be implemented as part of the association table, where they

The way read the spec, the sctpAssocRemAddrTable that you are implementing is not
part of the association table.  It's a separate table and should be reported as
such (the way you are doing here).

> would otherwise naturally belong.  This patch places all the requsite data in a
> separate proc file, /proc/net/sctp/remaddr
>     
> Regards
> Neil 
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> 
> 
> include/net/sctp/sctp.h |    2 
> net/sctp/proc.c         |  144 ++++++++++++++++++++++++++++++++++++++++++++++++
> net/sctp/protocol.c     |    3 +
> 3 files changed, 149 insertions(+)
> 
> diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
> index 34318a3..c1b087d 100644
> --- a/include/net/sctp/sctp.h
> +++ b/include/net/sctp/sctp.h
> @@ -186,6 +186,8 @@ int sctp_eps_proc_init(void);
>  void sctp_eps_proc_exit(void);
>  int sctp_assocs_proc_init(void);
>  void sctp_assocs_proc_exit(void);
> +int sctp_remaddr_proc_init(void);
> +void sctp_remaddr_proc_exit(void);
>  
>  
>  /*
> diff --git a/net/sctp/proc.c b/net/sctp/proc.c
> index 2499732..dc80cd7 100644
> --- a/net/sctp/proc.c
> +++ b/net/sctp/proc.c
> @@ -402,3 +402,147 @@ void sctp_assocs_proc_exit(void)
>  {
>  	remove_proc_entry("assocs", proc_net_sctp);
>  }
> +
> +static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)
> +{
> +	if (*pos >= sctp_assoc_hashsize)
> +		return NULL;
> +
> +	if (*pos < 0)
> +		*pos = 0;
> +
> +	if (*pos = 0)
> +		seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
> +				"REM_ADDR_RTX  START\n");
> +
> +	return (void *)pos;
> +}
> +
> +static void *sctp_remaddr_seq_next(struct seq_file *seq, void *v, loff_t *pos)
> +{
> +	if (++*pos >= sctp_assoc_hashsize)
> +		return NULL;
> +
> +	return pos;
> +}
> +
> +static void sctp_remaddr_seq_stop(struct seq_file *seq, void *v)
> +{
> +	return;
> +}
> +
> +static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
> +{
> +	struct sctp_hashbucket *head;
> +	struct sctp_ep_common *epb;
> +	struct sctp_association *assoc;
> +	struct hlist_node *node;
> +	struct list_head *pos;
> +	int    hash = *(loff_t *)v;
> +
> +	if (hash >= sctp_assoc_hashsize)
> +		return -ENOMEM;
> +
> +	head = &sctp_assoc_hashtable[hash];
> +	sctp_local_bh_disable();
> +	read_lock(&head->lock);
> +	sctp_for_each_hentry(epb, node, &head->chain) {
> +		assoc = sctp_assoc(epb);
> +		list_for_each(pos, &assoc->peer.transport_addr_list) {
> +			struct sctp_transport *tsp;
> +			tsp = list_entry(pos, struct sctp_transport,
> +					 transports);

I think this deserver list_for_each_entry() since we don't use pos for
anything other then iteration of the list.


Otherwise looks good.

-vlad

> +			/*
> +			 * The remote address (ADDR)
> +			 */
> +			tsp->af_specific->seq_dump_addr(seq, &tsp->ipaddr);
> +			seq_printf(seq, " ");
> +
> +			/*
> +			 * The association ID (ASSOC_ID)
> +			 */
> +			seq_printf(seq, "%d ", tsp->asoc->assoc_id);
> +
> +			/*
> +			 * If the Heartbeat is active (HB_ACT)
> +			 * Note: 1 = Active, 0 = Inactive
> +			 */
> +			seq_printf(seq, "%d ", timer_pending(&tsp->hb_timer));
> +
> +			/*
> +			 * Retransmit time out (RTO)
> +			 */
> +			seq_printf(seq, "%lu ", tsp->rto);
> +
> +			/*
> +			 * Maximum path retransmit count (PATH_MAX_RTX)
> +			 */
> +			seq_printf(seq, "%d ", tsp->pathmaxrxt);
> +
> +			/*
> +			 * remote address retransmit count (REM_ADDR_RTX)
> +			 * Note: We don't have a way to tally this at the moment
> +			 * so lets just leave it as zero for the moment
> +			 */
> +			seq_printf(seq, "0 ");
> +
> +			/*
> +			 * remote address start time (START).  This is also not
> +			 * currently implemented, but we can record it with a
> +			 * jiffies marker in a subsequent patch
> +			 */
> +			seq_printf(seq, "0");
> +
> +			seq_printf(seq, "\n");
> +		}
> +	}
> +
> +	read_unlock(&head->lock);
> +	sctp_local_bh_enable();
> +
> +	return 0;
> +
> +}
> +
> +static const struct seq_operations sctp_remaddr_ops = {
> +	.start = sctp_remaddr_seq_start,
> +	.next  = sctp_remaddr_seq_next,
> +	.stop  = sctp_remaddr_seq_stop,
> +	.show  = sctp_remaddr_seq_show,
> +};
> +
> +/* Cleanup the proc fs entry for 'remaddr' object. */
> +void sctp_remaddr_proc_exit(void)
> +{
> +	remove_proc_entry("remaddr", proc_net_sctp);
> +}
> +
> +static int sctp_remaddr_seq_open(struct inode *inode, struct file *file)
> +{
> +	return seq_open(file, &sctp_remaddr_ops);
> +}
> +
> +static const struct file_operations sctp_remaddr_seq_fops = {
> +	.open = sctp_remaddr_seq_open,
> +	.read = seq_read,
> +	.llseek = seq_lseek,
> +	.release = seq_release,
> +};
> +
> +int __init sctp_remaddr_proc_init(void)
> +{
> +	struct proc_dir_entry *p;
> +
> +	p = create_proc_entry("remaddr", S_IRUGO, proc_net_sctp);
> +	if (!p)
> +		return -ENOMEM;
> +	p->proc_fops = &sctp_remaddr_seq_fops;
> +
> +	return 0;
> +}
> +
> +void sctp_assoc_proc_exit(void)
> +{
> +	remove_proc_entry("remaddr", proc_net_sctp);
> +}
> +
> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
> index d50f610..15be5cb 100644
> --- a/net/sctp/protocol.c
> +++ b/net/sctp/protocol.c
> @@ -113,6 +113,8 @@ static __init int sctp_proc_init(void)
>  		goto out_nomem;
>  	if (sctp_assocs_proc_init())
>  		goto out_nomem;
> +	if (sctp_remaddr_proc_init())
> +		goto out_nomem;
>  
>  	return 0;
>  
> @@ -129,6 +131,7 @@ static void sctp_proc_exit(void)
>  	sctp_snmp_proc_exit();
>  	sctp_eps_proc_exit();
>  	sctp_assocs_proc_exit();
> +	sctp_remaddr_proc_exit();
>  
>  	if (proc_net_sctp) {
>  		proc_net_sctp = NULL;


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

* Re: [PATCH] add /proc/net/sctp/remaddr table to complete RFC
  2008-04-30 14:46 [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
                   ` (2 preceding siblings ...)
  2008-05-07 12:25 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote Vlad Yasevich
@ 2008-05-07 17:45 ` Neil Horman
  2008-05-07 20:25 ` Neil Horman
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Neil Horman @ 2008-05-07 17:45 UTC (permalink / raw)
  To: linux-sctp

On Wed, May 07, 2008 at 08:25:57AM -0400, Vlad Yasevich wrote:
> Neil Horman wrote:
>> Hey all-
>>
>> Add support for RFC3873 remote address table OID.  Currently the OID's required
>> by RFC 3873 cannot be implemented as part of the association table, where they
>
> The way read the spec, the sctpAssocRemAddrTable that you are implementing is not
> part of the association table.  It's a separate table and should be reported as
> such (the way you are doing here).
>
>> would otherwise naturally belong.  This patch places all the requsite data in a
>> separate proc file, /proc/net/sctp/remaddr
>>     Regards
>> Neil 
>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>
Thanks vlad, I'll repost with your suggestions incorporated shortly
Neil

>>
>> include/net/sctp/sctp.h |    2 net/sctp/proc.c         |  144 
>> ++++++++++++++++++++++++++++++++++++++++++++++++
>> net/sctp/protocol.c     |    3 +
>> 3 files changed, 149 insertions(+)
>>
>> diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
>> index 34318a3..c1b087d 100644
>> --- a/include/net/sctp/sctp.h
>> +++ b/include/net/sctp/sctp.h
>> @@ -186,6 +186,8 @@ int sctp_eps_proc_init(void);
>>  void sctp_eps_proc_exit(void);
>>  int sctp_assocs_proc_init(void);
>>  void sctp_assocs_proc_exit(void);
>> +int sctp_remaddr_proc_init(void);
>> +void sctp_remaddr_proc_exit(void);
>>    /*
>> diff --git a/net/sctp/proc.c b/net/sctp/proc.c
>> index 2499732..dc80cd7 100644
>> --- a/net/sctp/proc.c
>> +++ b/net/sctp/proc.c
>> @@ -402,3 +402,147 @@ void sctp_assocs_proc_exit(void)
>>  {
>>  	remove_proc_entry("assocs", proc_net_sctp);
>>  }
>> +
>> +static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)
>> +{
>> +	if (*pos >= sctp_assoc_hashsize)
>> +		return NULL;
>> +
>> +	if (*pos < 0)
>> +		*pos = 0;
>> +
>> +	if (*pos = 0)
>> +		seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
>> +				"REM_ADDR_RTX  START\n");
>> +
>> +	return (void *)pos;
>> +}
>> +
>> +static void *sctp_remaddr_seq_next(struct seq_file *seq, void *v, loff_t *pos)
>> +{
>> +	if (++*pos >= sctp_assoc_hashsize)
>> +		return NULL;
>> +
>> +	return pos;
>> +}
>> +
>> +static void sctp_remaddr_seq_stop(struct seq_file *seq, void *v)
>> +{
>> +	return;
>> +}
>> +
>> +static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
>> +{
>> +	struct sctp_hashbucket *head;
>> +	struct sctp_ep_common *epb;
>> +	struct sctp_association *assoc;
>> +	struct hlist_node *node;
>> +	struct list_head *pos;
>> +	int    hash = *(loff_t *)v;
>> +
>> +	if (hash >= sctp_assoc_hashsize)
>> +		return -ENOMEM;
>> +
>> +	head = &sctp_assoc_hashtable[hash];
>> +	sctp_local_bh_disable();
>> +	read_lock(&head->lock);
>> +	sctp_for_each_hentry(epb, node, &head->chain) {
>> +		assoc = sctp_assoc(epb);
>> +		list_for_each(pos, &assoc->peer.transport_addr_list) {
>> +			struct sctp_transport *tsp;
>> +			tsp = list_entry(pos, struct sctp_transport,
>> +					 transports);
>
> I think this deserver list_for_each_entry() since we don't use pos for
> anything other then iteration of the list.
>
>
> Otherwise looks good.
>
> -vlad
>
>> +			/*
>> +			 * The remote address (ADDR)
>> +			 */
>> +			tsp->af_specific->seq_dump_addr(seq, &tsp->ipaddr);
>> +			seq_printf(seq, " ");
>> +
>> +			/*
>> +			 * The association ID (ASSOC_ID)
>> +			 */
>> +			seq_printf(seq, "%d ", tsp->asoc->assoc_id);
>> +
>> +			/*
>> +			 * If the Heartbeat is active (HB_ACT)
>> +			 * Note: 1 = Active, 0 = Inactive
>> +			 */
>> +			seq_printf(seq, "%d ", timer_pending(&tsp->hb_timer));
>> +
>> +			/*
>> +			 * Retransmit time out (RTO)
>> +			 */
>> +			seq_printf(seq, "%lu ", tsp->rto);
>> +
>> +			/*
>> +			 * Maximum path retransmit count (PATH_MAX_RTX)
>> +			 */
>> +			seq_printf(seq, "%d ", tsp->pathmaxrxt);
>> +
>> +			/*
>> +			 * remote address retransmit count (REM_ADDR_RTX)
>> +			 * Note: We don't have a way to tally this at the moment
>> +			 * so lets just leave it as zero for the moment
>> +			 */
>> +			seq_printf(seq, "0 ");
>> +
>> +			/*
>> +			 * remote address start time (START).  This is also not
>> +			 * currently implemented, but we can record it with a
>> +			 * jiffies marker in a subsequent patch
>> +			 */
>> +			seq_printf(seq, "0");
>> +
>> +			seq_printf(seq, "\n");
>> +		}
>> +	}
>> +
>> +	read_unlock(&head->lock);
>> +	sctp_local_bh_enable();
>> +
>> +	return 0;
>> +
>> +}
>> +
>> +static const struct seq_operations sctp_remaddr_ops = {
>> +	.start = sctp_remaddr_seq_start,
>> +	.next  = sctp_remaddr_seq_next,
>> +	.stop  = sctp_remaddr_seq_stop,
>> +	.show  = sctp_remaddr_seq_show,
>> +};
>> +
>> +/* Cleanup the proc fs entry for 'remaddr' object. */
>> +void sctp_remaddr_proc_exit(void)
>> +{
>> +	remove_proc_entry("remaddr", proc_net_sctp);
>> +}
>> +
>> +static int sctp_remaddr_seq_open(struct inode *inode, struct file *file)
>> +{
>> +	return seq_open(file, &sctp_remaddr_ops);
>> +}
>> +
>> +static const struct file_operations sctp_remaddr_seq_fops = {
>> +	.open = sctp_remaddr_seq_open,
>> +	.read = seq_read,
>> +	.llseek = seq_lseek,
>> +	.release = seq_release,
>> +};
>> +
>> +int __init sctp_remaddr_proc_init(void)
>> +{
>> +	struct proc_dir_entry *p;
>> +
>> +	p = create_proc_entry("remaddr", S_IRUGO, proc_net_sctp);
>> +	if (!p)
>> +		return -ENOMEM;
>> +	p->proc_fops = &sctp_remaddr_seq_fops;
>> +
>> +	return 0;
>> +}
>> +
>> +void sctp_assoc_proc_exit(void)
>> +{
>> +	remove_proc_entry("remaddr", proc_net_sctp);
>> +}
>> +
>> diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
>> index d50f610..15be5cb 100644
>> --- a/net/sctp/protocol.c
>> +++ b/net/sctp/protocol.c
>> @@ -113,6 +113,8 @@ static __init int sctp_proc_init(void)
>>  		goto out_nomem;
>>  	if (sctp_assocs_proc_init())
>>  		goto out_nomem;
>> +	if (sctp_remaddr_proc_init())
>> +		goto out_nomem;
>>   	return 0;
>>  @@ -129,6 +131,7 @@ static void sctp_proc_exit(void)
>>  	sctp_snmp_proc_exit();
>>  	sctp_eps_proc_exit();
>>  	sctp_assocs_proc_exit();
>> +	sctp_remaddr_proc_exit();
>>   	if (proc_net_sctp) {
>>  		proc_net_sctp = NULL;

-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/

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

* Re: [PATCH] add /proc/net/sctp/remaddr table to complete RFC
  2008-04-30 14:46 [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
                   ` (3 preceding siblings ...)
  2008-05-07 17:45 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC Neil Horman
@ 2008-05-07 20:25 ` Neil Horman
  2008-07-17 13:52 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Neil Horman @ 2008-05-07 20:25 UTC (permalink / raw)
  To: linux-sctp


Updated patch, taking your comments into account Vlad.

Thanks!



    Add support for RFC3873 remote address table OID.  Currently the OID's required
    by RFC 3873 cannot be implemented as part of the association table, where
    they would otherwise naturally belong.  This patch places all the requsite data
    in a separate proc file, /proc/net/sctp/remaddr
   
 
 include/net/sctp/sctp.h |    2 
 net/sctp/proc.c         |  142 ++++++++++++++++++++++++++++++++++++++++++++++++
 net/sctp/protocol.c     |    3 +
 3 files changed, 147 insertions(+)


    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>

diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h
index 34318a3..c1b087d 100644
--- a/include/net/sctp/sctp.h
+++ b/include/net/sctp/sctp.h
@@ -186,6 +186,8 @@ int sctp_eps_proc_init(void);
 void sctp_eps_proc_exit(void);
 int sctp_assocs_proc_init(void);
 void sctp_assocs_proc_exit(void);
+int sctp_remaddr_proc_init(void);
+void sctp_remaddr_proc_exit(void);
 
 
 /*
diff --git a/net/sctp/proc.c b/net/sctp/proc.c
index 2499732..57a9bfc 100644
--- a/net/sctp/proc.c
+++ b/net/sctp/proc.c
@@ -402,3 +402,145 @@ void sctp_assocs_proc_exit(void)
 {
 	remove_proc_entry("assocs", proc_net_sctp);
 }
+
+static void *sctp_remaddr_seq_start(struct seq_file *seq, loff_t *pos)
+{
+	if (*pos >= sctp_assoc_hashsize)
+		return NULL;
+
+	if (*pos < 0)
+		*pos = 0;
+
+	if (*pos = 0)
+		seq_printf(seq, "ADDR ASSOC_ID HB_ACT RTO MAX_PATH_RTX "
+				"REM_ADDR_RTX  START\n");
+
+	return (void *)pos;
+}
+
+static void *sctp_remaddr_seq_next(struct seq_file *seq, void *v, loff_t *pos)
+{
+	if (++*pos >= sctp_assoc_hashsize)
+		return NULL;
+
+	return pos;
+}
+
+static void sctp_remaddr_seq_stop(struct seq_file *seq, void *v)
+{
+	return;
+}
+
+static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
+{
+	struct sctp_hashbucket *head;
+	struct sctp_ep_common *epb;
+	struct sctp_association *assoc;
+	struct hlist_node *node;
+	struct sctp_transport *tsp;
+	int    hash = *(loff_t *)v;
+
+	if (hash >= sctp_assoc_hashsize)
+		return -ENOMEM;
+
+	head = &sctp_assoc_hashtable[hash];
+	sctp_local_bh_disable();
+	read_lock(&head->lock);
+	sctp_for_each_hentry(epb, node, &head->chain) {
+		assoc = sctp_assoc(epb);
+		list_for_each_entry(tsp, &assoc->peer.transport_addr_list,
+					transports) {
+			/*
+			 * The remote address (ADDR)
+			 */
+			tsp->af_specific->seq_dump_addr(seq, &tsp->ipaddr);
+			seq_printf(seq, " ");
+
+			/*
+			 * The association ID (ASSOC_ID)
+			 */
+			seq_printf(seq, "%d ", tsp->asoc->assoc_id);
+
+			/*
+			 * If the Heartbeat is active (HB_ACT)
+			 * Note: 1 = Active, 0 = Inactive
+			 */
+			seq_printf(seq, "%d ", timer_pending(&tsp->hb_timer));
+
+			/*
+			 * Retransmit time out (RTO)
+			 */
+			seq_printf(seq, "%lu ", tsp->rto);
+
+			/*
+			 * Maximum path retransmit count (PATH_MAX_RTX)
+			 */
+			seq_printf(seq, "%d ", tsp->pathmaxrxt);
+
+			/*
+			 * remote address retransmit count (REM_ADDR_RTX)
+			 * Note: We don't have a way to tally this at the moment
+			 * so lets just leave it as zero for the moment
+			 */
+			seq_printf(seq, "0 ");
+
+			/*
+			 * remote address start time (START).  This is also not
+			 * currently implemented, but we can record it with a
+			 * jiffies marker in a subsequent patch
+			 */
+			seq_printf(seq, "0");
+
+			seq_printf(seq, "\n");
+		}
+	}
+
+	read_unlock(&head->lock);
+	sctp_local_bh_enable();
+
+	return 0;
+
+}
+
+static const struct seq_operations sctp_remaddr_ops = {
+	.start = sctp_remaddr_seq_start,
+	.next  = sctp_remaddr_seq_next,
+	.stop  = sctp_remaddr_seq_stop,
+	.show  = sctp_remaddr_seq_show,
+};
+
+/* Cleanup the proc fs entry for 'remaddr' object. */
+void sctp_remaddr_proc_exit(void)
+{
+	remove_proc_entry("remaddr", proc_net_sctp);
+}
+
+static int sctp_remaddr_seq_open(struct inode *inode, struct file *file)
+{
+	return seq_open(file, &sctp_remaddr_ops);
+}
+
+static const struct file_operations sctp_remaddr_seq_fops = {
+	.open = sctp_remaddr_seq_open,
+	.read = seq_read,
+	.llseek = seq_lseek,
+	.release = seq_release,
+};
+
+int __init sctp_remaddr_proc_init(void)
+{
+	struct proc_dir_entry *p;
+
+	p = create_proc_entry("remaddr", S_IRUGO, proc_net_sctp);
+	if (!p)
+		return -ENOMEM;
+	p->proc_fops = &sctp_remaddr_seq_fops;
+
+	return 0;
+}
+
+void sctp_assoc_proc_exit(void)
+{
+	remove_proc_entry("remaddr", proc_net_sctp);
+}
+
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index d50f610..15be5cb 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -113,6 +113,8 @@ static __init int sctp_proc_init(void)
 		goto out_nomem;
 	if (sctp_assocs_proc_init())
 		goto out_nomem;
+	if (sctp_remaddr_proc_init())
+		goto out_nomem;
 
 	return 0;
 
@@ -129,6 +131,7 @@ static void sctp_proc_exit(void)
 	sctp_snmp_proc_exit();
 	sctp_eps_proc_exit();
 	sctp_assocs_proc_exit();
+	sctp_remaddr_proc_exit();
 
 	if (proc_net_sctp) {
 		proc_net_sctp = NULL;
-- 
/****************************************************
 * Neil Horman <nhorman@tuxdriver.com>
 * Software Engineer, Red Hat
 ****************************************************/

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

* Re: [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID
  2008-04-30 14:46 [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
                   ` (4 preceding siblings ...)
  2008-05-07 20:25 ` Neil Horman
@ 2008-07-17 13:52 ` Neil Horman
  2008-07-17 14:24 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote Vlad Yasevich
  2008-07-17 17:46 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
  7 siblings, 0 replies; 9+ messages in thread
From: Neil Horman @ 2008-07-17 13:52 UTC (permalink / raw)
  To: linux-sctp

On Wed, Apr 30, 2008 at 10:46:06AM -0400, Neil Horman wrote:
> Hey all-
> 
> Add support for RFC3873 remote address table OID.  Currently the OID's required
> by RFC 3873 cannot be implemented as part of the association table, where they
> would otherwise naturally belong.  This patch places all the requsite data in a
> separate proc file, /proc/net/sctp/remaddr
>     
> Regards
> Neil 
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> 
> 
Vlad, Sorry to bother you, but whatever happened to this patch?  I posted the
correction you asked for, but I don't see this in your tree anywhere.  Is there
something else you're waiting on?

Thanks!
Neil



-- 
/***************************************************
 *Neil Horman
 *nhorman@tuxdriver.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/

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

* Re: [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote
  2008-04-30 14:46 [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
                   ` (5 preceding siblings ...)
  2008-07-17 13:52 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
@ 2008-07-17 14:24 ` Vlad Yasevich
  2008-07-17 17:46 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
  7 siblings, 0 replies; 9+ messages in thread
From: Vlad Yasevich @ 2008-07-17 14:24 UTC (permalink / raw)
  To: linux-sctp

Neil Horman wrote:
> On Wed, Apr 30, 2008 at 10:46:06AM -0400, Neil Horman wrote:
>> Hey all-
>>
>> Add support for RFC3873 remote address table OID.  Currently the OID's required
>> by RFC 3873 cannot be implemented as part of the association table, where they
>> would otherwise naturally belong.  This patch places all the requsite data in a
>> separate proc file, /proc/net/sctp/remaddr
>>     
>> Regards
>> Neil 
>>
>> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
>>
>>
> Vlad, Sorry to bother you, but whatever happened to this patch?  I posted the
> correction you asked for, but I don't see this in your tree anywhere.  Is there
> something else you're waiting on?
> 
> Thanks!
> Neil
> 

Nope.  It went into net-next.

http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commit;h c2c1fd6c842caf70dcb1d94b9d58861949fd3d

-vlad



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

* Re: [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID
  2008-04-30 14:46 [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
                   ` (6 preceding siblings ...)
  2008-07-17 14:24 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote Vlad Yasevich
@ 2008-07-17 17:46 ` Neil Horman
  7 siblings, 0 replies; 9+ messages in thread
From: Neil Horman @ 2008-07-17 17:46 UTC (permalink / raw)
  To: linux-sctp

On Thu, Jul 17, 2008 at 10:24:19AM -0400, Vlad Yasevich wrote:
> Neil Horman wrote:
> > On Wed, Apr 30, 2008 at 10:46:06AM -0400, Neil Horman wrote:
> >> Hey all-
> >>
> >> Add support for RFC3873 remote address table OID.  Currently the OID's required
> >> by RFC 3873 cannot be implemented as part of the association table, where they
> >> would otherwise naturally belong.  This patch places all the requsite data in a
> >> separate proc file, /proc/net/sctp/remaddr
> >>     
> >> Regards
> >> Neil 
> >>
> >> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> >>
> >>
> > Vlad, Sorry to bother you, but whatever happened to this patch?  I posted the
> > correction you asked for, but I don't see this in your tree anywhere.  Is there
> > something else you're waiting on?
> > 
> > Thanks!
> > Neil
> > 
> 
> Nope.  It went into net-next.
> 
> http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commit;h c2c1fd6c842caf70dcb1d94b9d58861949fd3d
> 
> -vlad
> 
Cool, thanks!
Neil

-- 
/***************************************************
 *Neil Horman
 *nhorman@tuxdriver.com
 *gpg keyid: 1024D / 0x92A74FA1
 *http://pgp.mit.edu
 ***************************************************/

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

end of thread, other threads:[~2008-07-17 17:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-30 14:46 [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
2008-05-05 11:32 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC Neil Horman
2008-05-06 23:29 ` Neil Horman
2008-05-07 12:25 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote Vlad Yasevich
2008-05-07 17:45 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC Neil Horman
2008-05-07 20:25 ` Neil Horman
2008-07-17 13:52 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman
2008-07-17 14:24 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote Vlad Yasevich
2008-07-17 17:46 ` [PATCH] add /proc/net/sctp/remaddr table to complete RFC remote address table OID Neil Horman

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).