lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 29 Oct 2012 12:49:51 +0100 From: Javier Domingo <javierdo1@...il.com> To: Francois Romieu <romieu@...zoreil.com> Cc: netdev@...r.kernel.org Subject: Re: Information about napi_struct and net_device Hi Francois, I have been reading the code you recommended, and I think I must have misexplained myself. I am not developing a driver, I am updating a patch that we use at our research group, in which we modify linux to make our custom packet processing, getting all the packets from the NICs into a custom queue for processing. It will obviously not going to be integrated in the linux kernel, because its way to work is just useful to us, thought when we have something that works, we have planned to distribute it. I work with net_device, because I mainly use its fields, but I provide functions to enable/disable capturing from a specific net_device. Now, as napi_struct has appeared, I can't no longer use the netif_rx_disable/enable functions, but I still need to know how to get the already created napi_struct from my net_device pointers. I think I have been looking in a too low level, Regards, Javier Domingo 2012/10/29 Francois Romieu <romieu@...zoreil.com>: > Javier Domingo <javierdo1@...il.com> : > [...] >> inside of the net_device structure, I know I can take >> the net_device pointer as documented in [3], but how may I obtain the >> napi_struct from the netdevice? or I am doing it the wrong way? > > You are doing it the wrong way. The napi_struct you need is not embedded > here. See > > $ less +/napi drivers/net/ethernet/realtek/8139cp.c > > (first match in struct cp_private). > > You should really read one of the existing drivers. > > -- > Ueimor -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists