All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-sctp@vger.kernel.org, Neil Horman <nhorman@tuxdriver.com>,
	Vlad Yasevich <vyasevich@gmail.com>,
	Xin Long <lucien.xin@gmail.com>,
	David Laight <David.Laight@ACULAB.COM>
Subject: [PATCH net-next 05/10] sctp: introduce sctp_chunk_stream_no
Date: Thu, 28 Sep 2017 17:25:18 -0300	[thread overview]
Message-ID: <0dd42e7d58493629797cdf69528090c8e5852b27.1506536044.git.marcelo.leitner@gmail.com> (raw)
In-Reply-To: <cover.1506536044.git.marcelo.leitner@gmail.com>

Add a helper to fetch the stream number from a given chunk.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
 include/net/sctp/structs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 9b2b30b3ba4dfd10c24c3e06ed80779180a06baf..c48f7999fe9b80c5b5e41910a3608059b94140a7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -642,6 +642,11 @@ void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *,
 		     union sctp_addr *);
 const union sctp_addr *sctp_source(const struct sctp_chunk *chunk);
 
+static inline __u16 sctp_chunk_stream_no(struct sctp_chunk *ch)
+{
+	return ntohs(ch->subh.data_hdr->stream);
+}
+
 enum {
 	SCTP_ADDR_NEW,		/* new address added to assoc/ep */
 	SCTP_ADDR_SRC,		/* address can be used as source */
-- 
2.13.5

WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: netdev@vger.kernel.org
Cc: linux-sctp@vger.kernel.org, Neil Horman <nhorman@tuxdriver.com>,
	Vlad Yasevich <vyasevich@gmail.com>,
	Xin Long <lucien.xin@gmail.com>,
	David Laight <David.Laight@ACULAB.COM>
Subject: [PATCH net-next 05/10] sctp: introduce sctp_chunk_stream_no
Date: Thu, 28 Sep 2017 20:25:18 +0000	[thread overview]
Message-ID: <0dd42e7d58493629797cdf69528090c8e5852b27.1506536044.git.marcelo.leitner@gmail.com> (raw)
In-Reply-To: <cover.1506536044.git.marcelo.leitner@gmail.com>

Add a helper to fetch the stream number from a given chunk.

Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
---
 include/net/sctp/structs.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 9b2b30b3ba4dfd10c24c3e06ed80779180a06baf..c48f7999fe9b80c5b5e41910a3608059b94140a7 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -642,6 +642,11 @@ void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *,
 		     union sctp_addr *);
 const union sctp_addr *sctp_source(const struct sctp_chunk *chunk);
 
+static inline __u16 sctp_chunk_stream_no(struct sctp_chunk *ch)
+{
+	return ntohs(ch->subh.data_hdr->stream);
+}
+
 enum {
 	SCTP_ADDR_NEW,		/* new address added to assoc/ep */
 	SCTP_ADDR_SRC,		/* address can be used as source */
-- 
2.13.5


  parent reply	other threads:[~2017-09-28 20:25 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 20:25 [PATCH net-next 00/10] Introduce SCTP Stream Schedulers Marcelo Ricardo Leitner
2017-09-28 20:25 ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 01/10] sctp: silence warns on sctp_stream_init allocations Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 02/10] sctp: factor out stream->out allocation Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 03/10] sctp: factor out stream->in allocation Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-29 10:04   ` David Laight
2017-09-29 13:05     ` 'Marcelo Ricardo Leitner'
2017-09-29 13:05       ` 'Marcelo Ricardo Leitner'
2017-09-28 20:25 ` [PATCH net-next 04/10] sctp: introduce struct sctp_stream_out_ext Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` Marcelo Ricardo Leitner [this message]
2017-09-28 20:25   ` [PATCH net-next 05/10] sctp: introduce sctp_chunk_stream_no Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 06/10] sctp: introduce stream scheduler foundations Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 07/10] sctp: add sockopt to get/set stream scheduler Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-29 16:47   ` Neil Horman
2017-09-29 16:47     ` Neil Horman
2017-09-29 17:14     ` Marcelo Ricardo Leitner
2017-09-29 17:14       ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 08/10] sctp: add sockopt to get/set stream scheduler parameters Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 09/10] sctp: introduce priority based stream scheduler Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-29 16:54   ` Neil Horman
2017-09-29 16:54     ` Neil Horman
2017-09-29 17:10     ` Marcelo Ricardo Leitner
2017-09-29 17:10       ` Marcelo Ricardo Leitner
2017-09-28 20:25 ` [PATCH net-next 10/10] sctp: introduce round robin " Marcelo Ricardo Leitner
2017-09-28 20:25   ` Marcelo Ricardo Leitner
2017-09-30 16:52 ` [PATCH net-next 00/10] Introduce SCTP Stream Schedulers Xin Long
2017-09-30 16:52   ` Xin Long

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0dd42e7d58493629797cdf69528090c8e5852b27.1506536044.git.marcelo.leitner@gmail.com \
    --to=marcelo.leitner@gmail.com \
    --cc=David.Laight@ACULAB.COM \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.