diff options
author | Dan McDonald <danmcd@joyent.com> | 2020-02-25 17:44:41 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-25 17:44:41 -0500 |
commit | 15928b62d653d40c29bbe08498913c3ac86e46d5 (patch) | |
tree | fd02e1c0cb41876daa91d7434fe356d9946427f2 | |
parent | 4181a95d1ef42cebe8397bbc6005d867cda5a0d5 (diff) | |
download | illumos-joyent-15928b62d653d40c29bbe08498913c3ac86e46d5.tar.gz |
OS-7184 IPMP broken by OS-4683 (#261)
Reviewed by: Jason King <jbk@joyent.com>
Reviewed by: Cody Mello <melloc@writev.io>
Approved by: Mike Zeller <mike.zeller@joyent.com>
-rw-r--r-- | usr/src/uts/common/inet/ip.h | 2 | ||||
-rw-r--r-- | usr/src/uts/common/inet/ip/ip.c | 2 | ||||
-rw-r--r-- | usr/src/uts/common/inet/ip/ip_if.c | 15 |
3 files changed, 5 insertions, 14 deletions
diff --git a/usr/src/uts/common/inet/ip.h b/usr/src/uts/common/inet/ip.h index e9a3fcdeeb..89574da71f 100644 --- a/usr/src/uts/common/inet/ip.h +++ b/usr/src/uts/common/inet/ip.h @@ -1730,8 +1730,6 @@ typedef struct ill_s { * Capabilities related fields. */ uint_t ill_dlpi_capab_state; /* State of capability query, IDCS_* */ - kcondvar_t ill_dlpi_capab_cv; /* CV for broadcasting state changes */ - kmutex_t ill_dlpi_capab_lock; /* Lock for accessing above Cond Var */ uint_t ill_capab_pending_cnt; uint64_t ill_capabilities; /* Enabled capabilities, ILL_CAPAB_* */ ill_hcksum_capab_t *ill_hcksum_capab; /* H/W cksumming capabilities */ diff --git a/usr/src/uts/common/inet/ip/ip.c b/usr/src/uts/common/inet/ip/ip.c index 760454861b..8cbc98c817 100644 --- a/usr/src/uts/common/inet/ip/ip.c +++ b/usr/src/uts/common/inet/ip/ip.c @@ -4124,8 +4124,6 @@ ip_modclose(ill_t *ill) rw_destroy(&ill->ill_mcast_lock); mutex_destroy(&ill->ill_mcast_serializer); list_destroy(&ill->ill_nce); - cv_destroy(&ill->ill_dlpi_capab_cv); - mutex_destroy(&ill->ill_dlpi_capab_lock); /* * Now we are done with the module close pieces that diff --git a/usr/src/uts/common/inet/ip/ip_if.c b/usr/src/uts/common/inet/ip/ip_if.c index 24e4c200d4..cb3cd011c3 100644 --- a/usr/src/uts/common/inet/ip/ip_if.c +++ b/usr/src/uts/common/inet/ip/ip_if.c @@ -1394,10 +1394,11 @@ ill_capability_wait(ill_t *ill) while (ill->ill_capab_pending_cnt != 0 && (ill->ill_state_flags & ILL_CONDEMNED) == 0) { - mutex_enter(&ill->ill_dlpi_capab_lock); + /* This may enable blocked callers of ill_capability_done(). */ ipsq_exit(ill->ill_phyint->phyint_ipsq); - cv_wait(&ill->ill_dlpi_capab_cv, &ill->ill_dlpi_capab_lock); - mutex_exit(&ill->ill_dlpi_capab_lock); + /* Pause a bit (1msec) before we re-enter the squeue. */ + delay(drv_usectohz(1000000)); + /* * If ipsq_enter() fails, someone set ILL_CONDEMNED * while we dropped the squeue. Indicate such to the caller. @@ -3513,9 +3514,6 @@ ill_init_common(ill_t *ill, queue_t *q, boolean_t isv6, boolean_t is_loopback, ill->ill_max_buf = ND_MAX_Q; ill->ill_refcnt = 0; - cv_init(&ill->ill_dlpi_capab_cv, NULL, CV_DEFAULT, NULL); - mutex_init(&ill->ill_dlpi_capab_lock, NULL, MUTEX_DEFAULT, NULL); - return (0); } @@ -12935,6 +12933,7 @@ void ill_capability_done(ill_t *ill) { ASSERT(ill->ill_capab_pending_cnt != 0); + ASSERT(IAM_WRITER_ILL(ill)); ill_dlpi_done(ill, DL_CAPABILITY_REQ); @@ -12942,10 +12941,6 @@ ill_capability_done(ill_t *ill) if (ill->ill_capab_pending_cnt == 0 && ill->ill_dlpi_capab_state == IDCS_OK) ill_capability_reset_alloc(ill); - - mutex_enter(&ill->ill_dlpi_capab_lock); - cv_broadcast(&ill->ill_dlpi_capab_cv); - mutex_exit(&ill->ill_dlpi_capab_lock); } /* |