Print this page
sctp: align to cache line


 428 /*
 429  * Bind hash array size and hash function.  The size must be a power
 430  * of 2 and lport must be in host byte order.
 431  */
 432 #define SCTP_BIND_FANOUT_SIZE   2048
 433 #define SCTP_BIND_HASH(lport)   (((lport) * 31) & (SCTP_BIND_FANOUT_SIZE - 1))
 434 
 435 /* options that SCTP negotiates during association establishment */
 436 #define SCTP_PRSCTP_OPTION      0x01
 437 
 438 /*
 439  * Listener hash array size and hash function.  The size must be a power
 440  * of 2 and lport must be in host byte order.
 441  */
 442 #define SCTP_LISTEN_FANOUT_SIZE 512
 443 #define SCTP_LISTEN_HASH(lport) (((lport) * 31) & (SCTP_LISTEN_FANOUT_SIZE - 1))
 444 
 445 typedef struct sctp_tf_s {
 446         struct sctp_s   *tf_sctp;
 447         kmutex_t        tf_lock;



 448 } sctp_tf_t;
 449 
 450 /* Round up the value to the nearest mss. */
 451 #define MSS_ROUNDUP(value, mss)         ((((value) - 1) / (mss) + 1) * (mss))
 452 
 453 extern sin_t    sctp_sin_null;  /* Zero address for quick clears */
 454 extern sin6_t   sctp_sin6_null; /* Zero address for quick clears */
 455 
 456 #define SCTP_IS_DETACHED(sctp)          ((sctp)->sctp_detached)
 457 
 458 /* Data structure used to track received TSNs */
 459 typedef struct sctp_set_s {
 460         struct sctp_set_s *next;
 461         struct sctp_set_s *prev;
 462         uint32_t begin;
 463         uint32_t end;
 464 } sctp_set_t;
 465 
 466 /* Data structure used to track TSNs for PR-SCTP */
 467 typedef struct sctp_ftsn_set_s {




 428 /*
 429  * Bind hash array size and hash function.  The size must be a power
 430  * of 2 and lport must be in host byte order.
 431  */
 432 #define SCTP_BIND_FANOUT_SIZE   2048
 433 #define SCTP_BIND_HASH(lport)   (((lport) * 31) & (SCTP_BIND_FANOUT_SIZE - 1))
 434 
 435 /* options that SCTP negotiates during association establishment */
 436 #define SCTP_PRSCTP_OPTION      0x01
 437 
 438 /*
 439  * Listener hash array size and hash function.  The size must be a power
 440  * of 2 and lport must be in host byte order.
 441  */
 442 #define SCTP_LISTEN_FANOUT_SIZE 512
 443 #define SCTP_LISTEN_HASH(lport) (((lport) * 31) & (SCTP_LISTEN_FANOUT_SIZE - 1))
 444 
 445 typedef struct sctp_tf_s {
 446         struct sctp_s   *tf_sctp;
 447         kmutex_t        tf_lock;
 448 #define SF_CACHEL_PAD   64
 449         uchar_t         tf_pad[SF_CACHEL_PAD - (sizeof (struct sctp_s *) +
 450                             sizeof (kmutex_t))];
 451 } sctp_tf_t;
 452 
 453 /* Round up the value to the nearest mss. */
 454 #define MSS_ROUNDUP(value, mss)         ((((value) - 1) / (mss) + 1) * (mss))
 455 
 456 extern sin_t    sctp_sin_null;  /* Zero address for quick clears */
 457 extern sin6_t   sctp_sin6_null; /* Zero address for quick clears */
 458 
 459 #define SCTP_IS_DETACHED(sctp)          ((sctp)->sctp_detached)
 460 
 461 /* Data structure used to track received TSNs */
 462 typedef struct sctp_set_s {
 463         struct sctp_set_s *next;
 464         struct sctp_set_s *prev;
 465         uint32_t begin;
 466         uint32_t end;
 467 } sctp_set_t;
 468 
 469 /* Data structure used to track TSNs for PR-SCTP */
 470 typedef struct sctp_ftsn_set_s {