aboutsummaryrefslogtreecommitdiff
path: root/sys/netatm
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2004-06-14 18:16:22 +0000
committerRobert Watson <rwatson@FreeBSD.org>2004-06-14 18:16:22 +0000
commitc0b99ffa021c0be74d6ab90a6eccfe511be8bb19 (patch)
tree38ab74987dd7d2d27fad4ea4e4772c7d36baf7d4 /sys/netatm
parentfb6dad913a34b899ddff899af697c0fc3176942e (diff)
downloadsrc-c0b99ffa021c0be74d6ab90a6eccfe511be8bb19.tar.gz
src-c0b99ffa021c0be74d6ab90a6eccfe511be8bb19.zip
The socket field so_state is used to hold a variety of socket related
flags relating to several aspects of socket functionality. This change breaks out several bits relating to send and receive operation into a new per-socket buffer field, sb_state, in order to facilitate locking. This is required because, in order to provide more granular locking of sockets, different state fields have different locking properties. The following fields are moved to sb_state: SS_CANTRCVMORE (so_state) SS_CANTSENDMORE (so_state) SS_RCVATMARK (so_state) Rename respectively to: SBS_CANTRCVMORE (so_rcv.sb_state) SBS_CANTSENDMORE (so_snd.sb_state) SBS_RCVATMARK (so_rcv.sb_state) This facilitates locking by isolating fields to be located with other identically locked fields, and permits greater granularity in socket locking by avoiding storing fields with different locking semantics in the same short (avoiding locking conflicts). In the future, we may wish to coallesce sb_state and sb_flags; for the time being I leave them separate and there is no additional memory overhead due to the packing/alignment of shorts in the socket buffer structure.
Notes
Notes: svn path=/head/; revision=130480
Diffstat (limited to 'sys/netatm')
-rw-r--r--sys/netatm/atm_aal5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netatm/atm_aal5.c b/sys/netatm/atm_aal5.c
index 81fcce8af7dc..04e5d7e1f84e 100644
--- a/sys/netatm/atm_aal5.c
+++ b/sys/netatm/atm_aal5.c
@@ -767,7 +767,7 @@ atm_aal5_cpcs_data(tok, m)
* that there's room in the socket buffer
*/
if (((so->so_state & SS_ISCONNECTED) == 0) ||
- (so->so_state & SS_CANTRCVMORE) ||
+ (so->so_rcv.sb_state & SBS_CANTRCVMORE) ||
(len > sbspace(&so->so_rcv))) {
atm_sock_stat.as_indrop[atp->atp_type]++;
KB_FREEALL(m);