From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: [PATCH 1/2] sctp: turn flags in 'struct sctp_association' into bit
Date: Fri, 04 Sep 2009 06:33:19 +0000 [thread overview]
Message-ID: <4AA0B4AF.6070103@cn.fujitsu.com> (raw)
This shrinks the size of struct sctp_association a little.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
include/net/sctp/structs.h | 21 +++++++++------------
1 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index a48d80e..42d00ce 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1568,13 +1568,13 @@ struct sctp_association {
__u32 sack_cnt;
/* These are capabilities which our peer advertised. */
- __u8 ecn_capable; /* Can peer do ECN? */
- __u8 ipv4_address; /* Peer understands IPv4 addresses? */
- __u8 ipv6_address; /* Peer understands IPv6 addresses? */
- __u8 hostname_address;/* Peer understands DNS addresses? */
- __u8 asconf_capable; /* Does peer support ADDIP? */
- __u8 prsctp_capable; /* Can peer do PR-SCTP? */
- __u8 auth_capable; /* Is peer doing SCTP-AUTH? */
+ __u8 ecn_capable:1, /* Can peer do ECN? */
+ ipv4_address:1, /* Peer understands IPv4 addresses? */
+ ipv6_address:1, /* Peer understands IPv6 addresses? */
+ hostname_address:1, /* Peer understands DNS addresses? */
+ asconf_capable:1, /* Does peer support ADDIP? */
+ prsctp_capable:1, /* Can peer do PR-SCTP? */
+ auth_capable:1; /* Is peer doing SCTP-AUTH? */
__u32 adaptation_ind; /* Adaptation Code point. */
@@ -1913,11 +1913,8 @@ struct sctp_association {
__u16 active_key_id;
- /* Need to send an ECNE Chunk? */
- char need_ecne;
-
- /* Is it a temporary association? */
- char temp;
+ __u8 need_ecne:1, /* Need to send an ECNE Chunk? */
+ temp:1; /* Is it a temporary association? */
};
--
1.6.2.2
next reply other threads:[~2009-09-04 6:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-04 6:33 Wei Yongjun [this message]
2009-09-04 19:24 ` [PATCH 1/2] sctp: turn flags in 'struct sctp_association' into Vlad Yasevich
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=4AA0B4AF.6070103@cn.fujitsu.com \
--to=yjwei@cn.fujitsu.com \
--cc=linux-sctp@vger.kernel.org \
/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.