diff options
| author | Robert Mustacchi <rm@joyent.com> | 2017-03-09 18:20:30 +0000 |
|---|---|---|
| committer | Robert Mustacchi <rm@joyent.com> | 2017-04-04 18:35:28 +0000 |
| commit | 1ce0087dcd1864944e2608f63d0f2df2f5eb1f1a (patch) | |
| tree | b27ed41ba62c5db8e88d8993ac4851f474c76036 | |
| parent | 4cd8e58f70dec0852b8c53600fdde8ffa1347e2f (diff) | |
| download | illumos-joyent-1ce0087dcd1864944e2608f63d0f2df2f5eb1f1a.tar.gz | |
OS-5980 aggrs state machine in confusing state before mc_start() called
Reviewed by: Alex Wilson <alex.wilson@joyent.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Approved by: Patrick Mooney <pmooney@pfmooney.com>
| -rw-r--r-- | usr/src/uts/common/io/aggr/aggr_grp.c | 28 | ||||
| -rw-r--r-- | usr/src/uts/common/io/aggr/aggr_lacp.c | 3 |
2 files changed, 15 insertions, 16 deletions
diff --git a/usr/src/uts/common/io/aggr/aggr_grp.c b/usr/src/uts/common/io/aggr/aggr_grp.c index 3554e111c1..ad66e342bd 100644 --- a/usr/src/uts/common/io/aggr/aggr_grp.c +++ b/usr/src/uts/common/io/aggr/aggr_grp.c @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2015 Joyent, Inc. + * Copyright (c) 2017, Joyent, Inc. */ /* @@ -122,7 +122,6 @@ static void aggr_rem_pseudo_rx_group(aggr_port_t *, aggr_pseudo_rx_group_t *); static int aggr_pseudo_disable_intr(mac_intr_handle_t); static int aggr_pseudo_enable_intr(mac_intr_handle_t); static int aggr_pseudo_start_ring(mac_ring_driver_t, uint64_t); -static void aggr_pseudo_stop_ring(mac_ring_driver_t); static int aggr_addmac(void *, const uint8_t *); static int aggr_remmac(void *, const uint8_t *); static mblk_t *aggr_rx_poll(void *, int); @@ -1006,23 +1005,22 @@ aggr_pseudo_enable_intr(mac_intr_handle_t ih) return (mac_hwring_enable_intr(rr_ring->arr_hw_rh)); } +/* + * Here we need to start the pseudo-ring. As MAC already ensures that the + * underlying device is set up, all we need to do is save the ring generation. + * + * Note, we don't end up wanting to use the underlying mac_hwring_start/stop + * functions here as those don't actually stop and start the ring, they just + * quiesce the ring. Regardless of whether the aggr is logically up or not, we + * want to make sure that we can receive traffic for LACP. + */ static int aggr_pseudo_start_ring(mac_ring_driver_t arg, uint64_t mr_gen) { aggr_pseudo_rx_ring_t *rr_ring = (aggr_pseudo_rx_ring_t *)arg; - int err; - - err = mac_hwring_start(rr_ring->arr_hw_rh); - if (err == 0) - rr_ring->arr_gen = mr_gen; - return (err); -} -static void -aggr_pseudo_stop_ring(mac_ring_driver_t arg) -{ - aggr_pseudo_rx_ring_t *rr_ring = (aggr_pseudo_rx_ring_t *)arg; - mac_hwring_stop(rr_ring->arr_hw_rh); + rr_ring->arr_gen = mr_gen; + return (0); } /* @@ -2269,7 +2267,7 @@ aggr_fill_ring(void *arg, mac_ring_type_t rtype, const int rg_index, infop->mri_driver = (mac_ring_driver_t)rx_ring; infop->mri_start = aggr_pseudo_start_ring; - infop->mri_stop = aggr_pseudo_stop_ring; + infop->mri_stop = NULL; infop->mri_intr = aggr_mac_intr; infop->mri_poll = aggr_rx_poll; diff --git a/usr/src/uts/common/io/aggr/aggr_lacp.c b/usr/src/uts/common/io/aggr/aggr_lacp.c index a0d566d12b..7dcd3bfb95 100644 --- a/usr/src/uts/common/io/aggr/aggr_lacp.c +++ b/usr/src/uts/common/io/aggr/aggr_lacp.c @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, Joyent, Inc. */ /* @@ -606,7 +607,7 @@ lacp_xmit_sm(aggr_port_t *portp) ASSERT(MAC_PERIM_HELD(portp->lp_grp->lg_mh)); /* LACP_OFF state not in specification so check here. */ - if (!pl->sm.lacp_on || !pl->NTT || !portp->lp_started) + if (!pl->sm.lacp_on || !pl->NTT) return; /* |
