History log of /drivers/net/ethernet/sfc/siena_sriov.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
2c61c8a787fc3382edefd8c7ad3e0f74c81e5302 02-Mar-2012 Robert Stonehouse <rstonehouse@solarflare.com> sfc: Fix calculation of vf_i in map_vi_index()

This was broken during refactoring to use efx_vf_size().

[bwh: Keep using efx_vf_size()]
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/siena_sriov.c
01cb543db8a2d2dbcea5f357365ce1327ac46193 21-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Correct validation of peer_page_count in efx_vfdi_set_status_page()

efx_vfdi_set_status_page() validates the peer page count by
calculating the size of a request containing that many addresses and
comparing that with the maximum valid request size (4KB). The
calculation involves a multiplication that may overflow on a 32-bit
system.

We use kcalloc() to allocate memory to store the addresses; that also
does a multiplication and it does check for integer overflow, so any
values larger than 0x1fffffff will be rejected. However, values in
the range [0x1fffffffc, 0x1fffffff] pass boh tests and result in an
attempt to allocate nearly 4GB on the heap. This should be rejected
rather quickly as it's obviously impossible on a 32-bit system, and
indeed the maximum possible heap allocation is 32MB. Still, let's
make absolutely sure by fixing the initial validation.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/siena_sriov.c
cd2d5b529cdb9bd274f3e4bc68d37d4d63b7f383 14-Feb-2012 Ben Hutchings <bhutchings@solarflare.com> sfc: Add SR-IOV back-end support for SFC9000 family

On the SFC9000 family, each port has 1024 Virtual Interfaces (VIs),
each with an RX queue, a TX queue, an event queue and a mailbox
register. These may be assigned to up to 127 SR-IOV virtual functions
per port, with up to 64 VIs per VF.

We allocate an extra channel (IRQ and event queue only) to receive
requests from VF drivers.

There is a per-port limit of 4 concurrent RX queue flushes, and queue
flushes may be initiated by the MC in response to a Function Level
Reset (FLR) of a VF. Therefore, when SR-IOV is in use, we submit all
flush requests via the MC.

The RSS indirection table is shared with VFs, so the number of RX
queues used in the PF is limited to the number of VIs per VF.

This is almost entirely the work of Steve Hodgson, formerly
shodgson@solarflare.com.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
/drivers/net/ethernet/sfc/siena_sriov.c