Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Sep 2011 20:26:16 +0530
From:      Naresh <gbal.naresh@gmail.com>
To:        "freebsd-drivers@freebsd.org" <freebsd-drivers@freebsd.org>
Subject:   Multiple TX queue support in nic driver
Message-ID:  <A804CA3D-A00B-49DA-9F01-912F24635BD6@gmail.com>

next in thread | raw e-mail | index | archive | help
Hi All,

I am working on a 10G Ethernet driver.  I have a requirement to support mult=
iple TX queues. I looked into IXGBE and CXGB drivers for reference, I have s=
ome questions regarding the implementation.

1) For supporting multiple TXQs, I see the above mentioned drivers create a r=
ing buffer in the driver for each hardware TX queue, and queue the packets f=
rom stack to the ring buffer before queueing on the hardware queue. I don't u=
nderstand why to create a ring buffer for supporting multiple TXQS. There mi=
ght be a very good reason for them to do that way, but I am unable to get th=
at.

Is it ok to queue the packets to hardware queue directly based on the flowid=
 supplied in the mbuf  packet header in if_transmit routine ?

2) Regarding flowid, for the first TX packet the flowid is not set and the p=
acket goes out on the default TX queue and when the corresponding RX respons=
e comes to hardware it queues   the packet to appropriate RXQ based on the r=
ss hash. The driver then before posting RX packet to stack it should set the=
 flowid in packet to RXQ index.
After that the TX packets from stack for that TCP connection will come with f=
lowid supplied by us. Is this understanding correct ?

Can some one please help me on this?

Thank you all for being patient in reading this long post.

Thanks,
Naresh.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A804CA3D-A00B-49DA-9F01-912F24635BD6>