diff options
| author | Michael Brown | 2019-04-27 21:12:01 +0200 |
|---|---|---|
| committer | Michael Brown | 2019-04-27 21:25:00 +0200 |
| commit | fe680c8228563369804948010954128aacb7db74 (patch) | |
| tree | 65e6035ee970a69550bb44ee2e07d47c1c85d314 /src/include/ipxe | |
| parent | [pci] Add support for PCI MSI-X interrupts (diff) | |
| download | ipxe-fe680c8228563369804948010954128aacb7db74.tar.gz ipxe-fe680c8228563369804948010954128aacb7db74.tar.xz ipxe-fe680c8228563369804948010954128aacb7db74.zip | |
[vlan] Provide vlan_netdev_rx() and vlan_netdev_rx_err()
The Hermon driver uses vlan_find() to identify the appropriate VLAN
device for packets that are received with the VLAN tag already
stripped out by the hardware. Generalise this capability and expose
it for use by other network card drivers.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe')
| -rw-r--r-- | src/include/ipxe/vlan.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/ipxe/vlan.h b/src/include/ipxe/vlan.h index 439e0c16d..7f93439b3 100644 --- a/src/include/ipxe/vlan.h +++ b/src/include/ipxe/vlan.h @@ -10,6 +10,8 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL ); +#include <ipxe/netdevice.h> + /** A VLAN header */ struct vlan_header { /** Tag control information */ @@ -59,12 +61,14 @@ struct vlan_header { */ #define VLAN_PRIORITY_IS_VALID( priority ) ( (priority) <= 7 ) -extern struct net_device * vlan_find ( struct net_device *trunk, - unsigned int tag ); extern unsigned int vlan_tag ( struct net_device *netdev ); extern int vlan_can_be_trunk ( struct net_device *trunk ); extern int vlan_create ( struct net_device *trunk, unsigned int tag, unsigned int priority ); extern int vlan_destroy ( struct net_device *netdev ); +extern void vlan_netdev_rx ( struct net_device *netdev, unsigned int tag, + struct io_buffer *iobuf ); +extern void vlan_netdev_rx_err ( struct net_device *netdev, unsigned int tag, + struct io_buffer *iobuf, int rc ); #endif /* _IPXE_VLAN_H */ |
