if_epair.c (295126) | if_epair.c (298995) |
---|---|
1/*- 2 * Copyright (c) 2008 The FreeBSD Foundation 3 * Copyright (c) 2009-2010 Bjoern A. Zeeb <bz@FreeBSD.org> 4 * All rights reserved. 5 * 6 * This software was developed by CK Software GmbH under sponsorship 7 * from the FreeBSD Foundation. 8 * --- 34 unchanged lines hidden (view full) --- 43 * to re-do them in case we move the interface between network stacks 44 * in a private if_reassign function. 45 * In case we bridge to a real interface/network or between indepedent 46 * epairs on multiple stacks/machines, we may need this. 47 * For now let the user handle that case. 48 */ 49 50#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2008 The FreeBSD Foundation 3 * Copyright (c) 2009-2010 Bjoern A. Zeeb <bz@FreeBSD.org> 4 * All rights reserved. 5 * 6 * This software was developed by CK Software GmbH under sponsorship 7 * from the FreeBSD Foundation. 8 * --- 34 unchanged lines hidden (view full) --- 43 * to re-do them in case we move the interface between network stacks 44 * in a private if_reassign function. 45 * In case we bridge to a real interface/network or between indepedent 46 * epairs on multiple stacks/machines, we may need this. 47 * For now let the user handle that case. 48 */ 49 50#include <sys/cdefs.h> |
51__FBSDID("$FreeBSD: head/sys/net/if_epair.c 295126 2016-02-01 17:41:21Z glebius $"); | 51__FBSDID("$FreeBSD: head/sys/net/if_epair.c 298995 2016-05-03 18:05:43Z pfg $"); |
52 53#include <sys/param.h> 54#include <sys/kernel.h> 55#include <sys/malloc.h> 56#include <sys/mbuf.h> 57#include <sys/module.h> 58#include <sys/refcount.h> 59#include <sys/queue.h> --- 449 unchanged lines hidden (view full) --- 509 m_freem(m); 510 return (0); 511 } 512 len = m->m_pkthdr.len; 513 mflags = m->m_flags; 514 DPRINTF("packet %s -> %s\n", ifp->if_xname, oifp->if_xname); 515 516#ifdef ALTQ | 52 53#include <sys/param.h> 54#include <sys/kernel.h> 55#include <sys/malloc.h> 56#include <sys/mbuf.h> 57#include <sys/module.h> 58#include <sys/refcount.h> 59#include <sys/queue.h> --- 449 unchanged lines hidden (view full) --- 509 m_freem(m); 510 return (0); 511 } 512 len = m->m_pkthdr.len; 513 mflags = m->m_flags; 514 DPRINTF("packet %s -> %s\n", ifp->if_xname, oifp->if_xname); 515 516#ifdef ALTQ |
517 /* Support ALTQ via the clasic if_start() path. */ | 517 /* Support ALTQ via the classic if_start() path. */ |
518 IF_LOCK(&ifp->if_snd); 519 if (ALTQ_IS_ENABLED(&ifp->if_snd)) { 520 ALTQ_ENQUEUE(&ifp->if_snd, m, NULL, error); 521 if (error) 522 if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); 523 IF_UNLOCK(&ifp->if_snd); 524 if (!error) { 525 if_inc_counter(ifp, IFCOUNTER_OBYTES, len); --- 485 unchanged lines hidden --- | 518 IF_LOCK(&ifp->if_snd); 519 if (ALTQ_IS_ENABLED(&ifp->if_snd)) { 520 ALTQ_ENQUEUE(&ifp->if_snd, m, NULL, error); 521 if (error) 522 if_inc_counter(ifp, IFCOUNTER_OQDROPS, 1); 523 IF_UNLOCK(&ifp->if_snd); 524 if (!error) { 525 if_inc_counter(ifp, IFCOUNTER_OBYTES, len); --- 485 unchanged lines hidden --- |