Changeset 35066 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/linux
- Timestamp:
- Dec 14, 2010 11:37:21 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r33752 r35066 1006 1006 { 1007 1007 dev_hold(pDev); 1008 Log(("vboxNetFltLinuxRetainNetDev: Device %p(%s) retained. ref=%d\n", pDev, pDev->name, atomic_read(&pDev->refcnt))); 1008 Log(("vboxNetFltLinuxRetainNetDev: Device %p(%s) retained. ref=%d\n", 1009 pDev, pDev->name, 1010 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) 1011 netdev_refcnt_read(pDev) 1012 #else 1013 atomic_read(&pDev->refcnt) 1014 #endif 1015 )); 1009 1016 } 1010 1017 } … … 1035 1042 { 1036 1043 dev_put(pDev); 1037 Log(("vboxNetFltLinuxReleaseNetDev: Device %p(%s) released. ref=%d\n", pDev, pDev->name, atomic_read(&pDev->refcnt))); 1044 Log(("vboxNetFltLinuxReleaseNetDev: Device %p(%s) released. ref=%d\n", 1045 pDev, pDev->name, 1046 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) 1047 netdev_refcnt_read(pDev) 1048 #else 1049 atomic_read(&pDev->refcnt) 1050 #endif 1051 )); 1038 1052 } 1039 1053 Log(("vboxNetFltLinuxReleaseNetDev - done\n")); … … 1978 1992 RTSpinlockReleaseNoInts(pThis->hSpinlock, &Tmp); 1979 1993 1980 Log(("vboxNetFltLinuxAttachToInterface: Device %p(%s) retained. ref=%d\n", pDev, pDev->name, atomic_read(&pDev->refcnt))); 1981 Log(("vboxNetFltLinuxAttachToInterface: Got pDev=%p pThis=%p pThis->u.s.pDev=%p\n", pDev, pThis, ASMAtomicUoReadPtrT(&pThis->u.s.pDev, struct net_device *))); 1994 Log(("vboxNetFltLinuxAttachToInterface: Device %p(%s) retained. ref=%d\n", 1995 pDev, pDev->name, 1996 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) 1997 netdev_refcnt_read(pDev) 1998 #else 1999 atomic_read(&pDev->refcnt) 2000 #endif 2001 )); 2002 Log(("vboxNetFltLinuxAttachToInterface: Got pDev=%p pThis=%p pThis->u.s.pDev=%p\n", 2003 pDev, pThis, ASMAtomicUoReadPtrT(&pThis->u.s.pDev, struct net_device *))); 1982 2004 1983 2005 /* Get the mac address while we still have a valid net_device reference. */ … … 2048 2070 RTSpinlockReleaseNoInts(pThis->hSpinlock, &Tmp); 2049 2071 dev_put(pDev); 2050 Log(("vboxNetFltLinuxAttachToInterface: Device %p(%s) released. ref=%d\n", pDev, pDev->name, atomic_read(&pDev->refcnt))); 2072 Log(("vboxNetFltLinuxAttachToInterface: Device %p(%s) released. ref=%d\n", 2073 pDev, pDev->name, 2074 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) 2075 netdev_refcnt_read(pDev) 2076 #else 2077 atomic_read(&pDev->refcnt) 2078 #endif 2079 )); 2051 2080 } 2052 2081 … … 2080 2109 #endif 2081 2110 Log(("vboxNetFltLinuxUnregisterDevice: this=%p: Packet handler removed, xmit queue purged.\n", pThis)); 2082 Log(("vboxNetFltLinuxUnregisterDevice: Device %p(%s) released. ref=%d\n", pDev, pDev->name, atomic_read(&pDev->refcnt))); 2111 Log(("vboxNetFltLinuxUnregisterDevice: Device %p(%s) released. ref=%d\n", 2112 pDev, pDev->name, 2113 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) 2114 netdev_refcnt_read(pDev) 2115 #else 2116 atomic_read(&pDev->refcnt) 2117 #endif 2118 )); 2083 2119 dev_put(pDev); 2084 2120 … … 2383 2419 #endif 2384 2420 Log(("vboxNetFltOsDeleteInstance: this=%p: Packet handler removed, xmit queue purged.\n", pThis)); 2385 Log(("vboxNetFltOsDeleteInstance: Device %p(%s) released. ref=%d\n", pDev, pDev->name, atomic_read(&pDev->refcnt))); 2421 Log(("vboxNetFltOsDeleteInstance: Device %p(%s) released. ref=%d\n", 2422 pDev, pDev->name, 2423 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37) 2424 netdev_refcnt_read(pDev) 2425 #else 2426 atomic_read(&pDev->refcnt) 2427 #endif 2428 )); 2386 2429 dev_put(pDev); 2387 2430 }
Note:
See TracChangeset
for help on using the changeset viewer.