ix(intel) vs mlxen(mellanox) 10Gb performance
Gleb Smirnoff
glebius at FreeBSD.org
Thu Aug 20 08:10:34 UTC 2015
Yonghyeon,
On Thu, Aug 20, 2015 at 11:30:24AM +0900, Yonghyeon PYUN wrote:
Y> > > >> Maybe it can be controlled by some kind of flag, if all the three TSO
Y> > > >> limits should include the TCP/IP/ethernet headers too. I'm pretty sure
Y> > > >> we want both versions.
Y> > > >>
Y> > > >
Y> > > > Hmm, I'm afraid it's already complex. Drivers have to tell almost
Y> > > > the same information to both bus_dma(9) and network stack.
Y> > >
Y> > > Don't forget that not all drivers in the tree set the TSO limits before
Y> > > if_attach(), so possibly the subtraction of one TSO fragment needs to go
Y> > > into ip_output() ....
Y> > >
Y> > Ok, I realized that some drivers may not know the answers before ether_ifattach(),
Y> > due to the way they are configured/written (I saw the use of if_hw_tsomax_update()
Y> > in the patch).
Y>
Y> I was not able to find an interface that configures TSO parameters
Y> after if_t conversion. I'm under the impression
Y> if_hw_tsomax_update() is not designed to use this way. Probably we
Y> need a better one?(CCed to Gleb).
Yes. In the projects/ifnet all the TSO stuff is configured differently.
I'd really appreciate if other developers look there and review it,
try it, give some input.
Here is a snippet from net/if.h in projects/ifnet:
/*
* Structure describing TSO properties of an interface. Known both to ifnet
* layer and TCP. Most interfaces point to a static tsomax in ifdriver
* definition. However, vlan(4) and lagg(4) require a dynamic tsomax.
*/
struct iftsomax {
uint32_t tsomax_bytes; /* TSO total burst length limit in bytes */
uint32_t tsomax_segcount; /* TSO maximum segment count */
uint32_t tsomax_segsize; /* TSO maximum segment size in bytes */
};
Now closer to your original question. I haven't yet converted lagg(4), so
haven't yet worked on if_hw_tsomax_update(). I am convinced that it shouldn't
be needed for a regular driver (save lagg(4).
A proper driver should first study its hardware and only then call if_attach().
Correct me if am wrong, please.
Also, I suppose, that a piece of hardware can't change its TSO maximums at
runtime, so I don't see reason for changing them at runtime (save lagg(4)).
--
Totus tuus, Glebius.
More information about the freebsd-net
mailing list