if_hatm_rx.c (257176) | if_hatm_rx.c (271849) |
---|---|
1/*- 2 * Copyright (c) 2001-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * 29 * ForeHE driver. 30 * 31 * Receive. 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2001-2003 3 * Fraunhofer Institute for Open Communication Systems (FhG Fokus). 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 18 unchanged lines hidden (view full) --- 27 * Author: Hartmut Brandt <harti@freebsd.org> 28 * 29 * ForeHE driver. 30 * 31 * Receive. 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/dev/hatm/if_hatm_rx.c 257176 2013-10-26 17:58:36Z glebius $"); | 35__FBSDID("$FreeBSD: head/sys/dev/hatm/if_hatm_rx.c 271849 2014-09-19 03:51:26Z glebius $"); |
36 37#include "opt_inet.h" 38#include "opt_natm.h" 39 40#include <sys/types.h> 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/kernel.h> --- 100 unchanged lines hidden (view full) --- 144 if (!(flags & HE_REGM_RBRQ_END_PDU)) 145 return; 146 147 if (flags & HE_REGM_RBRQ_CRC_ERROR) { 148 if (vcc->chain) 149 m_freem(vcc->chain); 150 vcc->chain = vcc->last = NULL; 151 sc->istats.crc_error++; | 36 37#include "opt_inet.h" 38#include "opt_natm.h" 39 40#include <sys/types.h> 41#include <sys/param.h> 42#include <sys/systm.h> 43#include <sys/kernel.h> --- 100 unchanged lines hidden (view full) --- 144 if (!(flags & HE_REGM_RBRQ_END_PDU)) 145 return; 146 147 if (flags & HE_REGM_RBRQ_CRC_ERROR) { 148 if (vcc->chain) 149 m_freem(vcc->chain); 150 vcc->chain = vcc->last = NULL; 151 sc->istats.crc_error++; |
152 sc->ifp->if_ierrors++; | 152 if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1); |
153 return; 154 } 155 if (flags & HE_REGM_RBRQ_LEN_ERROR) { 156 if (vcc->chain) 157 m_freem(vcc->chain); 158 vcc->chain = vcc->last = NULL; 159 sc->istats.len_error++; | 153 return; 154 } 155 if (flags & HE_REGM_RBRQ_LEN_ERROR) { 156 if (vcc->chain) 157 m_freem(vcc->chain); 158 vcc->chain = vcc->last = NULL; 159 sc->istats.len_error++; |
160 sc->ifp->if_ierrors++; | 160 if_inc_counter(sc->ifp, IFCOUNTER_IERRORS, 1); |
161 return; 162 } 163 164#ifdef HATM_DEBUG 165 if (sc->debug & DBG_DUMP) { 166 struct mbuf *tmp; 167 168 for (tmp = vcc->chain; tmp != NULL; tmp = tmp->m_next) { --- 66 unchanged lines hidden (view full) --- 235 236 vpi = HE_VPI(cid); 237 vci = HE_VCI(cid); 238 239 ATM_PH_FLAGS(&aph) = vcc->param.flags & 0xff; 240 ATM_PH_VPI(&aph) = vpi; 241 ATM_PH_SETVCI(&aph, vci); 242 | 161 return; 162 } 163 164#ifdef HATM_DEBUG 165 if (sc->debug & DBG_DUMP) { 166 struct mbuf *tmp; 167 168 for (tmp = vcc->chain; tmp != NULL; tmp = tmp->m_next) { --- 66 unchanged lines hidden (view full) --- 235 236 vpi = HE_VPI(cid); 237 vci = HE_VCI(cid); 238 239 ATM_PH_FLAGS(&aph) = vcc->param.flags & 0xff; 240 ATM_PH_VPI(&aph) = vpi; 241 ATM_PH_SETVCI(&aph, vci); 242 |
243 sc->ifp->if_ipackets++; | 243 if_inc_counter(sc->ifp, IFCOUNTER_IPACKETS, 1); |
244 /* this is in if_atmsubr.c */ | 244 /* this is in if_atmsubr.c */ |
245 /* sc->ifp->if_ibytes += len; */ | 245 /* if_inc_counter(sc->ifp, IFCOUNTER_IBYTES, len); */ |
246 247 vcc->ibytes += len; 248 vcc->ipackets++; 249 250#if 0 251 { 252 struct mbuf *tmp; 253 --- 78 unchanged lines hidden --- | 246 247 vcc->ibytes += len; 248 vcc->ipackets++; 249 250#if 0 251 { 252 struct mbuf *tmp; 253 --- 78 unchanged lines hidden --- |