Skip to content

Commit

Permalink
OS-7184 IPMP broken by OS-4683 (#261)
Browse files Browse the repository at this point in the history
Reviewed by: Jason King <jbk@joyent.com>
Reviewed by: Cody Mello <melloc@writev.io>
Approved by: Mike Zeller <mike.zeller@joyent.com>
  • Loading branch information
Dan McDonald committed Feb 25, 2020
1 parent 4181a95 commit 15928b6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
2 changes: 0 additions & 2 deletions usr/src/uts/common/inet/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 0 additions & 2 deletions usr/src/uts/common/inet/ip/ip.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 5 additions & 10 deletions usr/src/uts/common/inet/ip/ip_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -12935,17 +12933,14 @@ 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);

ill->ill_capab_pending_cnt--;
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);
}

/*
Expand Down

0 comments on commit 15928b6

Please sign in to comment.