]> git.ipfire.org Git - thirdparty/ipxe.git/log
thirdparty/ipxe.git
14 years ago[vlan] Use "-" instead of "." as separator in VLAN device names
Michael Brown [Wed, 1 Dec 2010 17:15:52 +0000 (17:15 +0000)] 
[vlan] Use "-" instead of "." as separator in VLAN device names

VLAN device names have the form "netX.Y", e.g. "net0.5" for VLAN 5 on
net0.  This use of "." conflicts with the use of "." as the
hierarchical separator in settings block names, with the result that
VLAN device settings cannot be accessed by name.

It would be trivial to treat the VLAN device settings as being a child
of the trunk device settings, but this would cause the VLAN device
settings to be applied to the trunk device: for example, setting
"net0.5/ip" would then apply the IP address to both net0.5 and net0.

Fix by changing the VLAN device name to use "-" instead of ".": the
VLAN device "net0.5" is now "net0-5".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Apply settings block name in register_settings()
Michael Brown [Wed, 1 Dec 2010 16:34:23 +0000 (16:34 +0000)] 
[settings] Apply settings block name in register_settings()

Pass the settings block name as a parameter to register_settings(),
rather than defining it with settings_init() (and then possibly
changing it by directly manipulating settings->name).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[iscsi] Disambiguate the common EINVAL cases
Michael Brown [Wed, 1 Dec 2010 01:23:50 +0000 (01:23 +0000)] 
[iscsi] Disambiguate the common EINVAL cases

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dns] Disambiguate "no nameserver" and "no DNS record" errors
Michael Brown [Wed, 1 Dec 2010 00:47:09 +0000 (00:47 +0000)] 
[dns] Disambiguate "no nameserver" and "no DNS record" errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Fix inconsistent information in HERMON_SET_PORT_GENERAL_PARAM
Michael Brown [Mon, 29 Nov 2010 17:18:49 +0000 (17:18 +0000)] 
[hermon] Fix inconsistent information in HERMON_SET_PORT_GENERAL_PARAM

pptx and pfctx should not be set together, nor should pprx and pfcrx.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[script] Remove "Aborting on <line>" message
Michael Brown [Mon, 29 Nov 2010 14:38:03 +0000 (14:38 +0000)] 
[script] Remove "Aborting on <line>" message

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Match user expectations for &&, ||, goto, and exit
Michael Brown [Mon, 29 Nov 2010 14:19:59 +0000 (14:19 +0000)] 
[cmdline] Match user expectations for &&, ||, goto, and exit

The && and || operators should be left-associative, since that is how
they are treated in most other languages (including C and Unix
shell).  For example, in the command:

  dhcp net0 && goto dhcp_ok || echo No DHCP on net0

if the "dhcp net0" fails then the "echo" should be executed.

After an "exit" or a successful "goto", further commands on the same
line should never be executed.  For example:

  goto somewhere && echo This should never be printed
  exit 0 && echo This should never be printed
  exit 1 && echo This should never be printed

An "exit" should cause the current shell or script to terminate and
return the specified exit status to its caller.  For example:

  chain test.ipxe && echo Success || echo Failure
    [in test.ipxe]
    #!ipxe
    exit 0

should echo "Success".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[parseopt] Allow "0x"-prefixed hexadecimal values in integer-valued options
Michael Brown [Mon, 29 Nov 2010 14:18:43 +0000 (14:18 +0000)] 
[parseopt] Allow "0x"-prefixed hexadecimal values in integer-valued options

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[shell] Add "shell" command
Michael Brown [Sun, 28 Nov 2010 21:09:33 +0000 (21:09 +0000)] 
[shell] Add "shell" command

The "shell" command allows a script to enter an interactive shell,
which is potentially useful for troubleshooting.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Really use __builtin_offsetof() when available
Arkadiusz Miskiewicz [Sun, 28 Nov 2010 18:28:15 +0000 (18:28 +0000)] 
[build] Really use __builtin_offsetof() when available

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Use __builtin_offsetof() when available
Michael Brown [Sun, 28 Nov 2010 17:26:27 +0000 (17:26 +0000)] 
[build] Use __builtin_offsetof() when available

Some newer versions of gcc (observed with a patched gcc 4.5.1) seem to
treat our offsetof() implementation as not being a compile-time
constant.  Fix by using __builtin_offsetof() when available.  (As with
the original offsetof() macro, this code is copied from the Linux
kernel's stddef.h.)

Reported-by: Arkadiusz Miskiewicz <arekm@maven.pl>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hermon] Enable priority flow control on the FCoE priority
Michael Brown [Sat, 27 Nov 2010 20:38:35 +0000 (20:38 +0000)] 
[hermon] Enable priority flow control on the FCoE priority

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Use only the first instance of a FIP descriptor
Michael Brown [Sat, 27 Nov 2010 15:48:01 +0000 (15:48 +0000)] 
[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>
14 years ago[vlan] Treat VLAN 0 as valid
Michael Brown [Sat, 27 Nov 2010 15:23:46 +0000 (15:23 +0000)] 
[vlan] Treat VLAN 0 as valid

VLAN headers are allowed to contain a VLAN tag of zero, indicating
that the header specifies only a priority and that the packet does not
belong to any VLAN.  The easiest way to handle this is to treat VLAN 0
as being a normal VLAN.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Tidy up debug message
Michael Brown [Sat, 27 Nov 2010 16:03:51 +0000 (16:03 +0000)] 
[fcoe] Tidy up debug message

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>
14 years ago[fc] Allow Fibre Channel ports to be explicitly named
Michael Brown [Sat, 27 Nov 2010 14:37:53 +0000 (14:37 +0000)] 
[fc] Allow Fibre Channel ports to be explicitly named

Use the network interface name as the Fibre Channel port name.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcoe] Create Fibre Channel port only when we have selected an FCF
Michael Brown [Sat, 27 Nov 2010 14:21:08 +0000 (14:21 +0000)] 
[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>
14 years ago[fcoe] Add support for FIP VLAN discovery
Michael Brown [Fri, 26 Nov 2010 01:06:32 +0000 (01:06 +0000)] 
[fcoe] Add support for FIP VLAN discovery

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Provide vlan_can_be_trunk()
Michael Brown [Fri, 26 Nov 2010 00:58:36 +0000 (00:58 +0000)] 
[vlan] Provide vlan_can_be_trunk()

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Add non-error debug messages
Michael Brown [Thu, 25 Nov 2010 23:50:41 +0000 (23:50 +0000)] 
[vlan] Add non-error debug messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Allow duplicate VLAN creation attempts
Michael Brown [Thu, 25 Nov 2010 23:45:30 +0000 (23:45 +0000)] 
[vlan] Allow duplicate VLAN creation attempts

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[nvo] Allow fragment list to be omitted
Michael Brown [Thu, 25 Nov 2010 00:05:20 +0000 (00:05 +0000)] 
[nvo] Allow fragment list to be omitted

Allow the fragment list to be omitted when calling nvo_init().
Omitting the list will cause the whole of the NVS device to be used
for NVO storage.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Add a mechanism for using a PCI VPD field as an NVS device
Michael Brown [Wed, 24 Nov 2010 23:59:53 +0000 (23:59 +0000)] 
[pci] Add a mechanism for using a PCI VPD field as an NVS device

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Add support for reading and writing PCI Vital Product Data (VPD)
Michael Brown [Wed, 24 Nov 2010 21:01:24 +0000 (21:01 +0000)] 
[pci] Add support for reading and writing PCI Vital Product Data (VPD)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pci] Standardise debug message format
Michael Brown [Wed, 24 Nov 2010 16:59:46 +0000 (16:59 +0000)] 
[pci] Standardise debug message format

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Fix multi-layer variable expansion (again)
Michael Brown [Tue, 23 Nov 2010 00:18:11 +0000 (00:18 +0000)] 
[cmdline] Fix multi-layer variable expansion (again)

Expansion of the (admittedly perverse) "aaa}bbb${ccc" will currently
fail because expand_command() does not check that the closing "}"
occurs later than the opening "${".

Fix by ensuring that the most recent opening "${" is used to match
against the first *subsequent* closing "}".

Total cost of this change: -12 bytes, bringing the overall cost of
this feature to -4 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Fix multi-layer variable expansion
Michael Brown [Mon, 22 Nov 2010 21:31:00 +0000 (21:31 +0000)] 
[cmdline] Fix multi-layer variable expansion

Expansion of ${${foo}} will currently fail, because the first
opening "${" will be incorrectly matched against the first closing
"}", leading to an attempt to expand the variable "${foo".

Fix by ensuring that the most recent opening "${" is used to match
against the first closing "}".

Total cost: 8 bytes.  :)

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Allow "set" command to take an empty value
Michael Brown [Mon, 22 Nov 2010 21:11:03 +0000 (21:11 +0000)] 
[settings] Allow "set" command to take an empty value

Allow "set <variable>" to be used to set the variable to an empty
value, if permitted by the setting type.  Note that some settings
backends do not differentiate between an empty value and a
non-existent value, so this may or may not be equivalent to "clear
<variable>".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Merge "netboot" command into "autoboot"
Michael Brown [Mon, 22 Nov 2010 21:04:30 +0000 (21:04 +0000)] 
[autoboot] Merge "netboot" command into "autoboot"

Allow "autoboot" to accept an optional list of network devices, and
remove the "netboot" command.  This saves around 130 bytes.

The "netboot" command has existed for approximately 48 hours, so its
removal should not cause backwards compatibility issues for anyone.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Add "isset" command
Michael Brown [Mon, 22 Nov 2010 20:41:17 +0000 (20:41 +0000)] 
[cmdline] Add "isset" command

The "isset" command can be used to determine whether or not a setting
is present.  For example:

  isset ${net0/ip} || dhcp net0   # If we have no IP address, try DHCP

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[script] Allow "exit" to exit a script
Michael Brown [Mon, 22 Nov 2010 20:20:33 +0000 (20:20 +0000)] 
[script] Allow "exit" to exit a script

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[script] Implement "goto" in iPXE scripts
Michael Brown [Mon, 22 Nov 2010 04:19:24 +0000 (04:19 +0000)] 
[script] Implement "goto" in iPXE scripts

Allow script labels to be defined using the syntax

  :<labelname>

(nothing else allowed on the line, including whitespace).  Labels are
ignored during script execution, but can be used as the target of the
"goto" command.  For example:

  #!ipxe

  goto machine_${net0/ip} || goto machine_default

  # Linux kernel boot
  :machine_10.0.0.101
  :machine_10.0.0.102
  set filename http://my.boot.server/vmlinuz
  goto done

  # Default configuration
  :machine_default
  set filename pxelinux.0
  goto done

  # Boot selected configuration
  :done
  chain ${filename}

Originally-implemented-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Originally-implemented-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[cmdline] Add trivial logical operators to iPXE command lines
Michael Brown [Mon, 22 Nov 2010 01:47:07 +0000 (01:47 +0000)] 
[cmdline] Add trivial logical operators to iPXE command lines

Make the "||" and "&&" operators available within iPXE commands.  For
example:

   dhcp net0 || set net0/ip 192.168.0.2

would attempt to acquire an IP address via DHCP, falling back to a
static address if DHCP fails.

As a side-effect, comments may now be appended to any line.  For
example:

  dhcp net0 || set net0/ip 192.168.0.2   # Try DHCP first, then static

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pxe] Remove startpxe and stoppxe commands from default builds
Michael Brown [Sun, 21 Nov 2010 23:40:40 +0000 (23:40 +0000)] 
[pxe] Remove startpxe and stoppxe commands from default builds

These commands exist primarily for debugging and are not generally
useful, so save 137 bytes by removing them by default.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[legal] Add some missing FILE_LICENCE declarations
Michael Brown [Sun, 21 Nov 2010 23:35:50 +0000 (23:35 +0000)] 
[legal] Add some missing FILE_LICENCE declarations

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[image] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 20:38:00 +0000 (20:38 +0000)] 
[image] Use generic option-parsing library

Total saving: 548 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[login] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 20:02:54 +0000 (20:02 +0000)] 
[login] Use generic option-parsing library

Total cost: 7 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[route] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 19:58:45 +0000 (19:58 +0000)] 
[route] Use generic option-parsing library

Total saving: 71 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[san] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 19:55:51 +0000 (19:55 +0000)] 
[san] Use generic option-parsing library

Total saving: 73 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[time] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 19:48:00 +0000 (19:48 +0000)] 
[time] Use generic option-parsing library

Total saving: 88 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[lotest] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 19:40:32 +0000 (19:40 +0000)] 
[lotest] Use generic option-parsing library

Total saving: 145 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[gdb] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 19:29:58 +0000 (19:29 +0000)] 
[gdb] Use generic option-parsing library

Total saving: 42 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 19:06:06 +0000 (19:06 +0000)] 
[fc] Use generic option-parsing library

Total saving: 111 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[digest] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 18:37:54 +0000 (18:37 +0000)] 
[digest] Use generic option-parsing library

Total saving: 68 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[dhcp] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 18:18:01 +0000 (18:18 +0000)] 
[dhcp] Use generic option-parsing library

Total saving: 329 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[ifmgmt] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 22:14:28 +0000 (22:14 +0000)] 
[ifmgmt] Use generic option-parsing library

Total cost: 66 bytes

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 16:57:58 +0000 (16:57 +0000)] 
[settings] Use generic option-parsing library

Total cost: 75 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 16:39:36 +0000 (16:39 +0000)] 
[autoboot] Use generic option-parsing library

Total saving: 32 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Use generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 16:28:05 +0000 (16:28 +0000)] 
[vlan] Use generic option-parsing library

Total saving: 261 bytes.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[parseopt] Add generic option-parsing library
Michael Brown [Sun, 21 Nov 2010 15:58:30 +0000 (15:58 +0000)] 
[parseopt] Add generic option-parsing library

Command implementations tend to include a substantial amount of common
boilerplate code revolving around the parsing of command-line options
and arguments.  This increases the size cost of each command.

Introduce an option-parsing library that abstracts out the common
operations involved in command implementations.  This enables the size
of each individual command to be reduced, and also enhances
consistency between commands.

Total size of the library is 704 bytes, to be amortised across all
command implementations.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Add "netboot" command
Michael Brown [Sat, 20 Nov 2010 17:20:03 +0000 (17:20 +0000)] 
[autoboot] Add "netboot" command

Originally-implemented-by: michael-dev@fami-braun.de
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[vlan] Add support for IEEE 802.1Q VLANs
Michael Brown [Fri, 19 Nov 2010 00:23:26 +0000 (00:23 +0000)] 
[vlan] Add support for IEEE 802.1Q VLANs

Originally-implemented-by: michael-dev@fami-braun.de
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[lotest] Fix endianness in status message
Michael Brown [Sat, 20 Nov 2010 05:08:25 +0000 (05:08 +0000)] 
[lotest] Fix endianness in status message

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[lotest] Use network device receive queue freezing
Michael Brown [Sat, 20 Nov 2010 05:03:06 +0000 (05:03 +0000)] 
[lotest] Use network device receive queue freezing

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pxe] Use network device receive queue freezing
Michael Brown [Sat, 20 Nov 2010 16:47:49 +0000 (16:47 +0000)] 
[pxe] Use network device receive queue freezing

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[netdevice] Allow per-device receive queue processing to be frozen
Michael Brown [Sat, 20 Nov 2010 04:56:25 +0000 (04:56 +0000)] 
[netdevice] Allow per-device receive queue processing to be frozen

Several use cases (e.g. the UNDI API and the EFI SNP API) require
access to the raw network device receive queue, and so currently use
manual calls to netdev_poll() on a specific network device in order to
prevent received packets from being processed by the network stack.

As an alternative, provide a flag that allows receive queue processing
to be frozen on a per-device basis.  When receive queue processing is
frozen, packets will be enqueued as normal, but will not be
automatically dequeued and passed up the network stack.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[undi] Support underlying UNDI devices that don't support interrupts
Michael Brown [Fri, 19 Nov 2010 18:48:00 +0000 (18:48 +0000)] 
[undi] Support underlying UNDI devices that don't support interrupts

Some network cards do not generate interrupts when operated via the
UNDI API.  Allow for this by waiting for the ISR to be triggered only
if the PXE stack advertises that it supports interrupts.  When the PXE
stack does not advertise interrupt support, we skip the call to
PXENV_UNDI_ISR_IN_START and just poll the device using
PXENV_UNDI_ISR_IN_PROCESS.  This matches the observed behaviour of at
least one other PXE NBP (emBoot's winBoot/i), so there is a reasonable
chance of this working.

Originally-implemented-by: Muralidhar Appalla <Muralidhar.Appalla@emulex.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[tcp] Remove obsolete constants
Michael Brown [Fri, 19 Nov 2010 15:50:30 +0000 (15:50 +0000)] 
[tcp] Remove obsolete constants

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[tcp] Use MAX_LL_NET_HEADER_LEN instead of defining our own MAX_HDR_LEN
Michael Brown [Fri, 19 Nov 2010 15:50:02 +0000 (15:50 +0000)] 
[tcp] Use MAX_LL_NET_HEADER_LEN instead of defining our own MAX_HDR_LEN

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[udp] Remove obsolete constants
Michael Brown [Fri, 19 Nov 2010 15:48:05 +0000 (15:48 +0000)] 
[udp] Remove obsolete constants

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[udp] Use MAX_LL_NET_HEADER_LEN instead of defining our own UDP_MAX_HLEN
Michael Brown [Fri, 19 Nov 2010 15:45:41 +0000 (15:45 +0000)] 
[udp] Use MAX_LL_NET_HEADER_LEN instead of defining our own UDP_MAX_HLEN

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[netdevice] Add MAX_NET_HEADER_LEN and MAX_LL_NET_HEADER_LEN
Michael Brown [Fri, 19 Nov 2010 15:45:01 +0000 (15:45 +0000)] 
[netdevice] Add MAX_NET_HEADER_LEN and MAX_LL_NET_HEADER_LEN

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[pxe] Always allow MAX_LL_HEADER_LEN for the link-layer header
Michael Brown [Fri, 19 Nov 2010 15:37:08 +0000 (15:37 +0000)] 
[pxe] Always allow MAX_LL_HEADER_LEN for the link-layer header

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[efi] Always allow MAX_LL_HEADER_LEN for the link-layer header
Michael Brown [Fri, 19 Nov 2010 15:32:05 +0000 (15:32 +0000)] 
[efi] Always allow MAX_LL_HEADER_LEN for the link-layer header

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[lotest] Move lotest.h to correct directory
Michael Brown [Thu, 18 Nov 2010 23:30:50 +0000 (23:30 +0000)] 
[lotest] Move lotest.h to correct directory

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[lacp] Fix dumping of raw LACP packets
Michael Brown [Thu, 18 Nov 2010 17:41:44 +0000 (17:41 +0000)] 
[lacp] Fix dumping of raw LACP packets

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[netdevice] Use net device name in debugging messages
Michael Brown [Thu, 18 Nov 2010 17:41:02 +0000 (17:41 +0000)] 
[netdevice] Use net device name in debugging messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[settings] Add "hexhyp" setting type
Michael Brown [Sat, 13 Nov 2010 00:22:23 +0000 (00:22 +0000)] 
[settings] Add "hexhyp" setting type

Provide a "hexhyp" setting type, which functions identically to the
"hex" setting type except that it uses a hyphen instead of a colon as
the byte delimiter.

For example, if ${mac} expands to "52:54:00:12:34:56", then
${mac:hexhyp} will expand to "52-54-00-12-34-56".

Originally-implemented-by: Jarrod Johnson <jarrod.b.johnson@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[bzimage] Increase maximum command-line size to 0x7ff
Jarrod Johnson [Sat, 13 Nov 2010 00:10:35 +0000 (00:10 +0000)] 
[bzimage] Increase maximum command-line size to 0x7ff

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[forcedeth] Exit poll() as early as possible if no work to do
Thomas Miletich [Fri, 12 Nov 2010 00:12:17 +0000 (00:12 +0000)] 
[forcedeth] Exit poll() as early as possible if no work to do

Fix incorrect authorship attribution on commit f122515 ("[forcedeth]
Exit poll() as early as possible if no work to do").

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[forcedeth] Exit poll() as early as possible if no work to do
Michael Brown [Thu, 11 Nov 2010 23:57:10 +0000 (23:57 +0000)] 
[forcedeth] Exit poll() as early as possible if no work to do

Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[tcp] Set PSH flag only on packets containing data
Michael Brown [Thu, 11 Nov 2010 01:14:05 +0000 (01:14 +0000)] 
[tcp] Set PSH flag only on packets containing data

Suggested-by: Yelena Kadach <klenusik@hotmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[list] Fix typographical error from previous commit
Shao Miller [Tue, 9 Nov 2010 02:11:32 +0000 (02:11 +0000)] 
[list] Fix typographical error from previous commit

Fix typographical error from commit ea631f6 ("[list] Add
list_first_entry()").  The symptom was PXELINUX 3.86 causing a stack
overflow under VMware.

Tested-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Add support for Fibre Channel name server lookups
Michael Brown [Thu, 4 Nov 2010 03:31:15 +0000 (03:31 +0000)] 
[fc] Add support for Fibre Channel name server lookups

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Hold ULP's peer reference while ULP exists
Michael Brown [Fri, 5 Nov 2010 23:13:22 +0000 (23:13 +0000)] 
[fc] Hold ULP's peer reference while ULP exists

Allow fc_ulp_decrement() to guarantee to fc_peer_decrement() that the
peer reference remains valid for the duration of the call, by ensuring
that ulp->peer remains valid while ulp is valid.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Allow peers and ULPs to log out when usage count reaches zero
Michael Brown [Fri, 5 Nov 2010 05:50:08 +0000 (05:50 +0000)] 
[fc] Allow peers and ULPs to log out when usage count reaches zero

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Hold reference to peers and ULPs while calling fc_link_examine()
Michael Brown [Thu, 4 Nov 2010 03:28:29 +0000 (03:28 +0000)] 
[fc] Hold reference to peers and ULPs while calling fc_link_examine()

Allow link examination methods to safely assume that their
self-reference remains valid for the duration of the method call.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Log out correct port ID after a successful LOGO request
Michael Brown [Fri, 5 Nov 2010 04:18:17 +0000 (04:18 +0000)] 
[fc] Log out correct port ID after a successful LOGO request

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Support Fibre Channel ECHO
Michael Brown [Thu, 4 Nov 2010 02:49:07 +0000 (02:49 +0000)] 
[fc] Support Fibre Channel ECHO

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcp] Use EINVAL for URI parsing errors and EPROTO for protocol errors
Michael Brown [Fri, 5 Nov 2010 04:09:29 +0000 (04:09 +0000)] 
[fcp] Use EINVAL for URI parsing errors and EPROTO for protocol errors

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[retry] Process at most one timer's expiry in each call to retry_step()
Michael Brown [Mon, 8 Nov 2010 03:06:14 +0000 (03:06 +0000)] 
[retry] Process at most one timer's expiry in each call to retry_step()

Calling a timer's expiry method may cause arbitrary consequences,
including arbitrary modifications of the list of retry timers.
list_for_each_entry_safe() guards against only deletion of the current
list entry; it provides no protection against other list
modifications.  In particular, if a timer's expiry method causes the
subsequent timer in the list to be deleted, then the next loop
iteration will access a timer that may no longer exist.

This is a particularly nasty bug, since absolutely none of the
list-manipulation or reference-counting assertion checks will be
triggered.  (The first assertion failure happens on the next iteration
through list_for_each_entry(), showing that the list has become
corrupted but providing no clue as to when this happened.)

Fix by stopping traversal of the list of retry timers as soon as we
hit an expired timer.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[malloc] Avoid immediately clobbering reference count when freeing memory
Michael Brown [Fri, 5 Nov 2010 22:37:00 +0000 (22:37 +0000)] 
[malloc] Avoid immediately clobbering reference count when freeing memory

Rearrange the fields in struct memory_block (without altering
MIN_MEMBLOCK_SIZE) so that the "count" field of a reference-counted
object is left intact when the memory containing the object is freed.
This allows for the possibility of detecting reference-counting errors
such as double-freeing.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[refcnt] Check reference validity on each use of ref_get() and ref_put()
Michael Brown [Fri, 5 Nov 2010 22:24:46 +0000 (22:24 +0000)] 
[refcnt] Check reference validity on each use of ref_get() and ref_put()

Check that the reference count is valid (i.e. non-negative) on each
call to ref_get() and ref_put(), using an assert() at the point of
use.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[malloc] Use list_for_each_entry_safe() when we may delete a list entry
Michael Brown [Sat, 6 Nov 2010 00:31:02 +0000 (00:31 +0000)] 
[malloc] Use list_for_each_entry_safe() when we may delete a list entry

free_memblock() currently uses list_for_each_entry() to iterate over
the free list, and may delete an entry over which it iterates.  While
there is no way that the deleted list entry could be overwritten
before we reference it, this does rely upon list_del() leaving the
"next" pointer intact, which is not guaranteed.  Discovered while
tracking down a list-corruption bug (as a result of having modified
list_del() to sanitise the deleted list entry).

Fix by using list_for_each_entry_safe().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[list] Add list_first_entry()
Michael Brown [Mon, 8 Nov 2010 02:51:18 +0000 (02:51 +0000)] 
[list] Add list_first_entry()

There are several points in the iPXE codebase where
list_for_each_entry() is (ab)used to extract only the first entry from
a list.  Add a macro list_first_entry() to make this code easier to
read.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[list] Extend list-manipulation assertions to all list-handling functions
Michael Brown [Fri, 5 Nov 2010 23:49:12 +0000 (23:49 +0000)] 
[list] Extend list-manipulation assertions to all list-handling functions

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[process] Include step() function pointer in process debugging messages
Michael Brown [Sun, 7 Nov 2010 18:51:15 +0000 (18:51 +0000)] 
[process] Include step() function pointer in process debugging messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcp] Avoid quoting exchange ID before exchange is created
Michael Brown [Wed, 3 Nov 2010 01:55:53 +0000 (01:55 +0000)] 
[fcp] Avoid quoting exchange ID before exchange is created

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fcp] Fix potential memory leaks on error paths
Michael Brown [Wed, 3 Nov 2010 01:48:38 +0000 (01:48 +0000)] 
[fcp] Fix potential memory leaks on error paths

Functions that instantiate objects generally own one reference to the
object being created.  The error paths must therefore usually call
ref_put() to release this reference.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[build] Add FreeBSD location for isolinux
Michael Brown [Tue, 2 Nov 2010 23:19:15 +0000 (23:19 +0000)] 
[build] Add FreeBSD location for isolinux

Reported-by: Jedrzej Kalinowski <kalinoj1@iem.pw.edu.pl>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[romprefix] Add missing addr32 prefix
Michael Brown [Fri, 29 Oct 2010 00:45:21 +0000 (01:45 +0100)] 
[romprefix] Add missing addr32 prefix

Reported-by: Jedrzej Kalinowski <kalinoj1@iem.pw.edu.pl>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Introduce "skip-san-boot" option
Dave Hansen [Thu, 21 Oct 2010 22:03:42 +0000 (15:03 -0700)] 
[autoboot] Introduce "skip-san-boot" option

For some install-to-SAN scenarios, the OS needs to be able to reboot
to reread the partition table.  On this second boot attempt, the SAN
disk will not be empty and so iPXE will attempt to boot from it,
rather than falling back to the OS' installation media.

Work around this problem by introducing the "skip-san-boot" option,
similar in spirit to "keep-san".

Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[autoboot] Improve visibility of error messages
Michael Brown [Thu, 21 Oct 2010 22:33:41 +0000 (23:33 +0100)] 
[autoboot] Improve visibility of error messages

Improve the visibility of error messages by removing the redundant
final printing of the URL being booted.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[scsi] Wait for a successful TEST UNIT READY command
Michael Brown [Sat, 16 Oct 2010 12:53:38 +0000 (13:53 +0100)] 
[scsi] Wait for a successful TEST UNIT READY command

Some SCSI targets (observed with an EMC CLARiiON Fibre Channel target)
will not respond to commands correctly until a TEST UNIT READY has
been issued.  In particular, a READ CAPACITY (10) command will return
with a success status, but no capacity data.

Fix by issuing a TEST UNIT READY command automatically, and delaying
further SCSI commands until the TEST UNIT READY has succeeded.

Reported-by: Hadar Hen Zion <hadarh@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[fc] Do not use the command reference number in FCP_CMND IUs
Michael Brown [Tue, 19 Oct 2010 17:35:46 +0000 (18:35 +0100)] 
[fc] Do not use the command reference number in FCP_CMND IUs

The FCP command reference number is intended to be used for
controlling precise delivery of FCP commands, rather than being an
essentially arbitrary tag field (as with iSCSI and SRP).

Use the Fibre Channel local exchange ID as the tag for FCP commands,
instead of the FCP command reference.  The local exchange ID does not
appear within the FCP IU itself, but does appear within the FC frame
header; debug traces can therefore still be correlated with packet
captures.

Reported-by: Hadar Hen Zion <hadarh@mellanox.co.il>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[hci] Use http://ipxe.org/<errno> instead of raw error numbers
Michael Brown [Tue, 19 Oct 2010 05:14:22 +0000 (06:14 +0100)] 
[hci] Use http://ipxe.org/<errno> instead of raw error numbers

Users tend to gloss over cryptic-looking error messages such as

  "Boot failed: Exec format error (Error 0x2e852001)"

In particular, users tend not to report the error number, which is the
single most useful piece of diagnostic information in an iPXE error
message.  Try replacing the "Error 0x2e852001" portion with a URL,
giving

  "Boot failed: Exec format error (http://ipxe.org/2e852001)"

in the hope that users will, upon seeing something that is
recognisably a URL, try viewing it in a web browser.  Such users will
be greeted by a web page containing a more detailed description of the
error (automatically generated from the einfo text), including links
to each line of code that might generate the error, and a section for
additional user-contributed notes.  At the time of writing, a user who
visits http://ipxe.org/2e852001 would see a note saying

  "This error usually indicates that the SAN disk is empty, and does
   not yet contain a bootable operating system."

which may be more useful than "Exec format error (Error 0x2e852001)".

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[contrib] Remove extraneous errcodedb files
Michael Brown [Tue, 19 Oct 2010 01:27:06 +0000 (02:27 +0100)] 
[contrib] Remove extraneous errcodedb files

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[int13] Dump out MBR at DBGLVL_EXTRA
Michael Brown [Mon, 18 Oct 2010 13:51:15 +0000 (14:51 +0100)] 
[int13] Dump out MBR at DBGLVL_EXTRA

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[iscsi] Ensure ISID is consistent within an iSCSI session
Michael Brown [Mon, 18 Oct 2010 13:37:11 +0000 (14:37 +0100)] 
[iscsi] Ensure ISID is consistent within an iSCSI session

Commit 5f4ab0d ("[iscsi] Randomise a portion of the ISID to force new
session instantiation") introduced a regression by randomising the
ISID on each call to iscsi_start_login(), which may be called more
than once per connection, rather than on each call to
iscsi_open_connection(), which is guaranteed to be called only once
per connection.  This is incorrect behaviour that causes our
connection to be rejected by some iSCSI targets (observed with a
COMSTAR target under OpenSolaris).

Fix by generating the ISID in iscsi_open_connection(), and storing the
randomised ISID as part of the session state.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
14 years ago[romprefix] Add missing FILE_LICENCE declaration to undiloader.S
Michael Brown [Mon, 18 Oct 2010 00:33:33 +0000 (01:33 +0100)] 
[romprefix] Add missing FILE_LICENCE declaration to undiloader.S

undiloader.S was originally part of romprefix.S, and so inherits its
licence.

Signed-off-by: Michael Brown <mcb30@ipxe.org>