diff options
author | thompsa <thompsa@FreeBSD.org> | 2007-10-12 03:03:16 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2007-10-12 03:03:16 +0000 |
commit | 077949141caa2f215bb8b94d2cba31674587b28c (patch) | |
tree | 908c6a5aeed13f75ebfa9619c33c491919471528 /sys/net/if_lagg.h | |
parent | d238007fea9089738bdf8f57181f1c613ddac4bb (diff) | |
download | FreeBSD-src-077949141caa2f215bb8b94d2cba31674587b28c.zip FreeBSD-src-077949141caa2f215bb8b94d2cba31674587b28c.tar.gz |
Fix two panics in lagg.
1. The locking was changed to shared but roundrobin mode still updated a
pointer in the softc with the next tx interface to use. This will panic
under high load. Change this to an atomically incremented sequence number in
order to choose the tx port in round robin.
2. IFQ_HANDOFF will free the mbuf if the queue is full, this will then be freed
again by lagg_start() and panic. Reorganised the error handling and freeing
to fix this.
MFC after: 3 days
Diffstat (limited to 'sys/net/if_lagg.h')
-rw-r--r-- | sys/net/if_lagg.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/if_lagg.h b/sys/net/if_lagg.h index ed888e6..2b25118 100644 --- a/sys/net/if_lagg.h +++ b/sys/net/if_lagg.h @@ -176,6 +176,7 @@ struct lagg_softc { struct lagg_port *sc_primary; /* primary port */ struct ifmedia sc_media; /* media config */ caddr_t sc_psc; /* protocol data */ + uint32_t sc_seq; /* sequence counter */ SLIST_HEAD(__tplhd, lagg_port) sc_ports; /* list of interfaces */ SLIST_ENTRY(lagg_softc) sc_entries; |