[intel] Allow for the use of advanced TX descriptors

Intel virtual function NICs almost work with the use of "legacy"
transmit and receive descriptors (which are backwards compatible right
back to the original Intel Gigabit NICs).

Unfortunately the "TX switching" feature (which allows for VM<->VM
traffic to be looped back within the NIC itself) does not work when a
legacy TX descriptor is used: the packet is instead sent onto the
wire.

Fix by allowing for the use of an "advanced" TX descriptor (containing
exactly the same information as is found in the "legacy" descriptor).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2015-05-16 14:26:00 +01:00
parent 28ce9b6cc0
commit 9e2121be0d
3 changed files with 126 additions and 42 deletions
+4 -2
View File
@@ -396,8 +396,10 @@ static int intelx_probe ( struct pci_device *pci ) {
netdev->dev = &pci->dev;
memset ( intel, 0, sizeof ( *intel ) );
intel->port = PCI_FUNC ( pci->busdevfn );
intel_init_ring ( &intel->tx, INTEL_NUM_TX_DESC, INTELX_TD );
intel_init_ring ( &intel->rx, INTEL_NUM_RX_DESC, INTELX_RD );
intel_init_ring ( &intel->tx, INTEL_NUM_TX_DESC, INTELX_TD,
intel_describe_tx );
intel_init_ring ( &intel->rx, INTEL_NUM_RX_DESC, INTELX_RD,
intel_describe_rx );
/* Fix up PCI device */
adjust_pci_device ( pci );