[netdevice] Allow link layer to report broadcast/multicast packets via pull()
Allow the link layer to directly report whether or not a packet is
multicast or broadcast at the time of calling pull(), rather than
relying on heuristics to determine this at a later stage.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
[fcoe] Use only the first instance of a FIP descriptor
Almost all FIP packets contain at most one instance of each
descriptor. A VLAN notification may contain multiple VLAN
descriptors. The FCoE specification does not provide any guidance
regarding prioritisation of VLANs, so we may choose to arbitrarily
choose the first listed VLAN.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
The increase in length in Fibre Channel device names causes the
"selected FCF" message to wrap beyond 80 characters. Fix by using
abbreviations where possible.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
[fcoe] Create Fibre Channel port only when we have selected an FCF
Create the Fibre Channel port only when the FCoE port has selected a
Fibre Channel Forwarder to use. This avoids the confusion of having
an FC port created for the network device on which only VLAN discovery
is performed.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
[fcoe] Request SPMA iff FIP advertisement indicates support for SPMA
We currently set both the FP and SP bits in our FIP FLOGI, to allow
the FCF the choice of selecting either a fabric-provided or a server-
provided MAC address. This complies with the FCoE specification, but
has been observed to result in an FLOGI rejection from some FCFs.
Fix by recording whether or not the FCF supports SPMA, and requesting
only one of FPMA or SPMA in our FIP FLOGI. We choose to prefer SPMA
where available, because many iPXE drivers will not be able to receive
unicast packets sent to a non-default MAC address.
Reported-by: Hadar Hen Zion <hadarh@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
[netdevice] Pass both link-layer addresses in net_tx() and net_rx()
FCoE requires the use of fabric-provided MAC addresses, which breaks
the assumption that the net device's MAC address is implicitly the
source address for net_tx() and the (unicast) destination address for
net_rx().
Signed-off-by: Michael Brown <mcb30@ipxe.org>
[fcoe] Disambiguate the various error cases and add a CRC failure message
It seems as though several drivers neglect to strip the Ethernet CRC,
which will cause the FCoE footer to be misplaced and result
(coincidentally) in an "invalid CRC" error from FCoE.
Add a human-visible message indicating this, to aid in diagnosis.
Signed-off-by: Michael Brown <mcb30@ipxe.org>