Deleted Added
full compact
ieee8023ad_lacp.c (236062) ieee8023ad_lacp.c (243882)
1/* $NetBSD: ieee8023ad_lacp.c,v 1.3 2005/12/11 12:24:54 christos Exp $ */
2
3/*-
4 * Copyright (c)2005 YAMAMOTO Takashi,
5 * Copyright (c)2008 Andrew Thompson <thompsa@FreeBSD.org>
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/* $NetBSD: ieee8023ad_lacp.c,v 1.3 2005/12/11 12:24:54 christos Exp $ */
2
3/*-
4 * Copyright (c)2005 YAMAMOTO Takashi,
5 * Copyright (c)2008 Andrew Thompson <thompsa@FreeBSD.org>
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/net/ieee8023ad_lacp.c 236062 2012-05-26 08:09:01Z thompsa $");
31__FBSDID("$FreeBSD: head/sys/net/ieee8023ad_lacp.c 243882 2012-12-05 08:04:20Z glebius $");
32
33#include <sys/param.h>
34#include <sys/callout.h>
35#include <sys/mbuf.h>
36#include <sys/systm.h>
37#include <sys/malloc.h>
38#include <sys/kernel.h> /* hz */
39#include <sys/socket.h> /* for net/if.h */

--- 303 unchanged lines hidden (view full) ---

343{
344 struct lagg_port *lgp = lp->lp_lagg;
345 struct mbuf *m;
346 struct lacpdu *du;
347 int error;
348
349 LACP_LOCK_ASSERT(lp->lp_lsc);
350
32
33#include <sys/param.h>
34#include <sys/callout.h>
35#include <sys/mbuf.h>
36#include <sys/systm.h>
37#include <sys/malloc.h>
38#include <sys/kernel.h> /* hz */
39#include <sys/socket.h> /* for net/if.h */

--- 303 unchanged lines hidden (view full) ---

343{
344 struct lagg_port *lgp = lp->lp_lagg;
345 struct mbuf *m;
346 struct lacpdu *du;
347 int error;
348
349 LACP_LOCK_ASSERT(lp->lp_lsc);
350
351 m = m_gethdr(M_DONTWAIT, MT_DATA);
351 m = m_gethdr(M_NOWAIT, MT_DATA);
352 if (m == NULL) {
353 return (ENOMEM);
354 }
355 m->m_len = m->m_pkthdr.len = sizeof(*du);
356
357 du = mtod(m, struct lacpdu *);
358 memset(du, 0, sizeof(*du));
359

--- 37 unchanged lines hidden (view full) ---

397{
398 struct lagg_port *lgp = lp->lp_lagg;
399 struct mbuf *m;
400 struct markerdu *mdu;
401 int error;
402
403 LACP_LOCK_ASSERT(lp->lp_lsc);
404
352 if (m == NULL) {
353 return (ENOMEM);
354 }
355 m->m_len = m->m_pkthdr.len = sizeof(*du);
356
357 du = mtod(m, struct lacpdu *);
358 memset(du, 0, sizeof(*du));
359

--- 37 unchanged lines hidden (view full) ---

397{
398 struct lagg_port *lgp = lp->lp_lagg;
399 struct mbuf *m;
400 struct markerdu *mdu;
401 int error;
402
403 LACP_LOCK_ASSERT(lp->lp_lsc);
404
405 m = m_gethdr(M_DONTWAIT, MT_DATA);
405 m = m_gethdr(M_NOWAIT, MT_DATA);
406 if (m == NULL) {
407 return (ENOMEM);
408 }
409 m->m_len = m->m_pkthdr.len = sizeof(*mdu);
410
411 mdu = mtod(m, struct markerdu *);
412 memset(mdu, 0, sizeof(*mdu));
413

--- 1526 unchanged lines hidden ---
406 if (m == NULL) {
407 return (ENOMEM);
408 }
409 m->m_len = m->m_pkthdr.len = sizeof(*mdu);
410
411 mdu = mtod(m, struct markerdu *);
412 memset(mdu, 0, sizeof(*mdu));
413

--- 1526 unchanged lines hidden ---