Re: Question on KPI / NKE : ifp->snd
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com struct my_ifqueue { void *ifq_head; void *ifq_tail; int ifq_len; int ifq_maxlen; int ifq_drops; }; struct my_driver_softc_stuff { struct my_ifqueue snd_queue; struct my_ifqueue rcv_queue; . . . }; -josh On May 4, 2005, at 1:39 PM, Steven Palm wrote: Hi all, Thanks, This email sent to jgraessley@apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com The send and receive queue structures were removed from the ifnet structure. The structures weren't actually used by the stack, they were just their for drivers convenience. We intended to leave the ifqueue structure in the header files so drivers could create their own queues that they store in their own private storage area, usually hanging of softc. Unfortunately, these structures didn't make it in to the headers, so you can define your own. You can use the IF_*_MBUF macros in sys/kpi_mbuf.h to enqueue mbufs on the queues created above. To enqueue, use IF_ENQUEUE_MBUF. To prepend the queue with a new mbuf, use IF_PREPEND_MBUF. Finally, to dequeue an mbuf, use IF_DEQUEUE_MBUF. Not sure if -kernel or -drivers is the right list, please direct me if I guessed wrong. -drivers mentioned hardware drivers, and this is not talking to hardware, but a pure software network interface. I'm plodding my way through trying to convert the tun/tap driver over to the new KPI's. Maybe this is more work than I thought, but so far I've been replacing the mutex, mbuf, and ifnet stuff with the new "equivalents", however the tun/tap code is doing some work with the ifqueues on the interface, and I can see no API call to get this information, and you can not access the ifnet->snd structure element directly (for good reason, I know). I must be daft and overlooking it, or there is much more rework required than I was hoping was in there. Anyway, this is a learning project for me, surely Mattias will finish the rework before I do, even if it takes him a few weeks. :-) But, hope is good, and I may get it to work eventually and will have learned something in the process. Steve _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/jgraessley% 40apple.com smime.p7s
participants (1)
-
Josh Graessley