summaryrefslogtreecommitdiffstats
path: root/src/net/netdevice.c
Commit message (Collapse)AuthorAgeFilesLines
* [undi] Fill in ProtType correctly in PXENV_UNDI_ISRMichael Brown2008-08-201-2/+26
| | | | | | | | | Determine the network-layer packet type and fill it in for UNDI clients. This is required by some NBPs such as emBoot's winBoot/i. This change requires refactoring the link-layer portions of the gPXE netdevice API, so that it becomes possible to strip the link-layer header without passing the packet up the network stack.
* [Settings] Use a settings applicator to configure IPv4 routes.Michael Brown2008-03-211-3/+4
|
* [Settings] Add per-netdevice settings blockMichael Brown2008-03-201-0/+14
| | | | | | | | | Add a configuration settings block for each net device. This will provide the parent scope for settings applicable only to that network device (e.g. non-volatile options stored on the NIC, options obtained via DHCP, etc.). Expose the MAC address as a setting.
* Force a netdevice poll in net_tx() before attempting to transmitMichael Brown2007-10-041-0/+8
| | | | | packet, to work around the problem whereby small TX rings get backed up because we haven't yet poll()ed for TX completions.
* Minor debug message improvement.Michael Brown2007-09-211-2/+3
|
* Use net_device_operations structure and netdev_nullify() to allow forMichael Brown2007-07-071-14/+19
| | | | | | | | | | | safe dropping of the netdev ref by the driver while other refs still exist. Add netdev_irq() method. Net device open()/close() methods should no longer enable or disable IRQs. Remove rx_quota; it wasn't used anywhere and added too much complexity to implementing correct interrupt-masking behaviour in pxe_undi.c.
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* Allow recording of TX and RX errors to aid in end-user debugging.Michael Brown2007-07-051-16/+48
|
* Use a linker-table based system to automatically mark and start upMichael Brown2007-07-031-8/+1Star
| | | | | permanent processes, rather than requiring each one to have its own initialisation function.
* Implemented (untested) PXENV_START_UNDI.Michael Brown2007-07-031-4/+6
|
* Add trivial net device statistics (TX and RX packet count), reportedMichael Brown2007-07-031-0/+9
| | | | via UNDI API and also by ifstat command; may be useful for debugging.
* Kill off hotplug.h and just make net devices normal reference-countedMichael Brown2007-06-271-25/+49
| | | | | | structures. DHCP still broken and #if 0'd out.
* Modify process semantics; rescheduling is now automatic.Michael Brown2007-05-261-5/+2Star
| | | | | | Add reference-counting to processes. Add timer_running() test.
* pkbuff->iobuf changeoverMichael Brown2007-05-191-47/+47
| | | | | | | | Achieved via Perl using: perl -pi -e 's/pk_buff/io_buffer/g; s/Packet buffer/I\/O buffer/ig; ' \ -e 's/pkbuff\.h/iobuf.h/g; s/pkb_/iob_/g; s/_pkb/_iob/g; ' \ -e 's/pkb/iobuf/g; s/PKB/IOB/g;'
* Updated ISAPnP, EISA, MCA and ISA buses to current device model.Michael Brown2007-03-101-1/+1
| | | | | | | ISA 3c509 is currently non-functional, although the EISA (3c509-eisa) and MCA (3c529) variants should build OK. None of this code is yet tested.
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-191-1/+1
|
* Use total free memory as advertised window. This seems to be sufficientMichael Brown2007-01-181-2/+7
| | | | to avoid drops even on slow NICs.
* Remove the one-packet-per-poll-cycle limit; it seems to no longer beMichael Brown2007-01-181-24/+5Star
| | | | needed now that performance is up.
* Switch from calloc() to malloc()+memset() to match the practices usedMichael Brown2007-01-181-1/+4
| | | | almost everywhere else.
* I hate NULL pointer dereferences.Michael Brown2007-01-111-0/+4
|
* Add find_pci_netdev()Michael Brown2007-01-101-0/+18
|
* Add "name" field to struct device to allow human-readable hardware deviceMichael Brown2007-01-101-4/+8
| | | | | | | | | | | names. Add "dev" pointer in struct net_device to tie network interfaces back to a hardware device. Force natural alignment of data types in __table() macros. This seems to prevent gcc from taking the unilateral decision to occasionally increase their alignment (which screws up the table packing).
* Added network interface management commandsMichael Brown2007-01-101-21/+1Star
|
* Add "name" field to network device, to facilitate netdev commands.Michael Brown2007-01-101-4/+28
|
* Add RX quotas to the net device poll() method. This avoids the problemMichael Brown2007-01-091-13/+27
| | | | | | of alloc_pkb() exhaustion when e.g. an iSCSI-booted DOS session is left idle for a long time at the C:\ prompt and builds up a huge packet backlog.
* Added net device TX queue; this will be needed to support the PXE UNDI APIMichael Brown2007-01-091-50/+101
| | | | | | (which will need us to wait for TX completions). Added debug autocolourisation to netdevice.c
* Make open() and close() an official part of the netdevice API.Michael Brown2007-01-041-5/+61
| | | | Call netdevice's poll() and transmit() methods only when device is open.
* Use hotplug support to notify persistent reference holders when aMichael Brown2007-01-041-0/+4
| | | | net_device is unregistered.
* Use stdlib.h for malloc() instead of malloc.h.Michael Brown2006-12-201-1/+1
|
* We don't actually have a stdio.h header file. Our printf() functions areMichael Brown2006-09-271-1/+0Star
| | | | | | | | defined in vsprintf.h. (This may change, since vsprintf.h is a non-standard name, but for now it's the one to use.) There should be no need to include vsprintf.h just for DBG() statements, since include/compiler.h forces it in for a debug build anyway.
* added stdio.h to includes for DBG compilationMarty Connor2006-09-271-0/+1
|
* Clarified packet ownership transfer between a few functions.Michael Brown2006-08-091-3/+5
| | | | | | | | | | | | | Added a large number of missing calls to free_pkb(). In the case of UDP, no received packets were ever freed, which lead to memory exhaustion remarkably quickly once pxelinux started up. In general, any function with _rx() in its name which accepts a pk_buff *must* either call free_pkb() or pass the pkb to another _rx() function (e.g. the next layer up the stack). Since the UDP (and TCP) layers don't pass packet buffers up to the higher-layer protocols (the "applications"), they must free the packet buffer after calling the application's newdata() method.
* Remove the static IP address hack from netdevice.c, and change theMichael Brown2006-07-201-20/+0Star
| | | | default test to the DHCP test.
* Simplify RX data path.Michael Brown2006-06-181-146/+154
| | | | | | | | | | Kill off the static single net device and move to proper dynamic registration (which we need with the new device model). Break the (flawed) assumption that all network-layer protocols can use ARP; such network-layer protocols (i.e. IPv4) must now register as an ARP protocol using ARP_NET_PROTOCOL() and provide a single method for checking the existence of a local network-layer address.
* Simplify TX datapath.Michael Brown2006-06-161-83/+46Star
|
* Avoid causing TX overflow on small TX queues.Michael Brown2006-05-271-3/+9
|
* Move init.h to gpxe/init.h.Michael Brown2006-04-301-5/+3Star
|
* Change semantics of network API so that packet-absorbing calls *always*Michael Brown2006-04-291-33/+76
| | | | | | | | | | | take ownership of the packet, rather than doing so only if they return success. This breaks semantic compatibility with Linux's hard_start_xmit() method, but means that we don't have to worry so much about error cases. Split mechanism of processing received packets (net_rx_process()) out from policy (net_step()), preparatory to putting net_step() in a separate object.
* Network layer now works as a proof of conceptMichael Brown2006-04-281-41/+77
|
* Network API now allows for multiple network devices (although theMichael Brown2006-04-241-86/+171
| | | | | | | | | | | | | implementation allows for only one, and does so without compromising on the efficiency of static allocation). Link-layer protocols are cleanly separated from the device drivers. Network-layer protocols are cleanly separated from individual network devices. Link-layer and network-layer protocols are cleanly separated from each other.
* First sketch of a new net device API.Michael Brown2006-04-191-0/+163