[mq_bpf] status report #5

Takuya ASADA syuu at dokukino.com
Sat Jul 2 01:22:59 UTC 2011


Sorry for late the report...I thought to send the report after
submitting changes, but I late to fix bugs and make it work...

*Project summary
The project goal is to support multiqueue network interface on BPF,
and provide interfaces for multithreaded packet processing using BPF.
Modern high performance NICs have multiple receive/send queues and RSS
feature, this allows to process packet concurrently on multiple
processors.
Main purpose of the project is to support these hardware and get
benefit of parallelism.

Here's status update from last week:
*queue len, queue affinity ioctls moved to the device ioctl
http://p4web.freebsd.org/@md=d&cd=//&c=xHa@/195501?ac=10
http://p4web.freebsd.org/@@195608?ac=10

I realized hardware queue information is not really belongs to BPF,
which belongs to the device.
So I decided to try move these ioctls to the device driver's ioctl,
and access via socket descriptor just like what ifconfig does.

I removed following ioctls from bpf.h:
BIOCRXQLEN
BIOCTXQLEN
BIOCRXQAFFINITY
BIOCTXQAFFINITY

And I added following ioctls to sockio.h:
SIOCGIFQLEN
SIOCGIFRXQAFFINITY
SIOCGIFTXQAFFINITY

To handle these ioctls, and also access these info from BPF, I added
these functions to struct ifnet:
int (*if_get_rxqueue_len)(struct ifnet *);
int (*if_get_txqueue_len)(struct ifnet *);
int (*if_get_rxqueue_affinity)(struct ifnet *, int);
int (*if_get_txqueue_affinity)(struct ifnet *, int);

Also, I added the code to show up queue info on ifconfig command.

It's still working progress, there's some issues:
- ifconfig shows invalid affinity value on igb(4)
- SOFTRSS doesn't work, fixing
- multi queue bpf is not well tested after the change


More information about the soc-status mailing list