summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/if_xge.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Rename the macro MCLGETI to MCLGETL and removes the dead parameter ifp.jan2020-12-121-2/+2
| | | | | | OK dlg@, bluhm@ No Opinion mpi@ Not against it claudio@
* Change users of IFQ_SET_MAXLEN() and IFQ_IS_EMPTY() to use the "new" API.patrick2020-07-101-2/+2
| | | | ok dlg@ tobhe@
* Remove an unused header (dev/mii/miivar.h)kevlo2019-07-171-3/+1
| | | | ok stsp@, jsg@
* Remove duplicate line introduced in rev 1.72. Coverity CID 1452888.jsg2017-08-171-2/+1
| | | | ok mikeb@
* Convert to ifq_dequeue and perform m_defrag if the mbuf doesn't fitmikeb2017-06-091-13/+18
| | | | With suggestions from and OK dlg
* move counting if_opackets next to counting if_obytes in if_enqueue.dlg2017-01-221-2/+1
| | | | | | | this means packets are consistently counted in one place, unlike the many and various ways that drivers thought they should do it. ok mpi@ deraadt@
* m_free() and m_freem() test for NULL. Simplify callers which had their ownjsg2016-11-291-3/+2
| | | | | | NULL tests. ok mpi@
* enable reception and transmission of jumbo frames.dlg2016-05-161-11/+7
| | | | | | | xge can go up to 9622 bytes in a frame. support for rx ring moderation is coming. from marisa emerson
* correctly set up byteswapping so this chip works on big endian archsdlg2016-04-281-17/+70
| | | | | | this, plus the m_adj fix before, makes xge work on sparc64 from marisa emerson
* whitespace fixes, no functional changedlg2016-04-271-15/+15
| | | | largely done by marisa emerson
* align rx buffers so ip packets will be aligned correctly for the stackdlg2016-04-271-1/+3
| | | | | | | this matters more for strict alignment archs than the ones xge currently runs on. from marisa emerson
* tweak some command list handlingdlg2016-04-271-91/+23
| | | | | | | | | prefix the arrays with xge_, make them const, and use nitems to iterate over them. move xge_setup_xgxs_xena to iterating over a list of commands instead of doing a long series of register writes in code. from marisa emerson, who tested on both xena and herc boards
* G/C IFQ_SET_READY().mpi2016-04-131-2/+1
|
* replace IFF_OACTIVE manipulation with mpsafe operations.dlg2015-11-251-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | there are two things shared between the network stack and drivers in the send path: the send queue and the IFF_OACTIVE flag. the send queue is now protected by a mutex. this diff makes the oactive functionality mpsafe too. IFF_OACTIVE is part of if_flags. there are two problems with that. firstly, if_flags is a short and we dont have any MI atomic operations to manipulate a short. secondly, while we could make the IFF_OACTIVE operates mpsafe, all changes to other flags would have to be made safe at the same time, otherwise a read-modify-write cycle on their updates could clobber the oactive change. instead, this moves the oactive mark into struct ifqueue and provides an API for changing it. there's ifq_set_oactive, ifq_clr_oactive, and ifq_is_oactive. these are modelled on ifsq_set_oactive, ifsq_clr_oactive, and ifsq_is_oactive in dragonflybsd. this diff includes changes to all the drivers manipulating IFF_OACTIVE to now use the ifsq_{set,clr_is}_oactive API too. ok kettenis@ mpi@ jmatthew@ deraadt@
* You only need <net/if_dl.h> if you're using LLADDR() or a sockaddr_dl.mpi2015-11-241-2/+1
|
* shuffle struct ifqueue so in flight mbufs are protected by a mutex.dlg2015-11-201-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the code is refactored so the IFQ macros call newly implemented ifq functions. the ifq code is split so each discipline (priq and hfsc in our case) is an opaque set of operations that the common ifq code can call. the common code does the locking, accounting (ifq_len manipulation), and freeing of the mbuf if the disciplines enqueue function rejects it. theyre kind of like bufqs in the block layer with their fifo and nscan disciplines. the new api also supports atomic switching of disciplines at runtime. the hfsc setup in pf_ioctl.c has been tweaked to build a complete hfsc_if structure which it attaches to the send queue in a single operation, rather than attaching to the interface up front and building up a list of queues. the send queue is now mutexed, which raises the expectation that packets can be enqueued or purged on one cpu while another cpu is dequeueing them in a driver for transmission. a lot of drivers use IFQ_POLL to peek at an mbuf and attempt to fit it on the ring before committing to it with a later IFQ_DEQUEUE operation. if the mbuf gets freed in between the POLL and DEQUEUE operations, fireworks will ensue. to avoid this, the ifq api introduces ifq_deq_begin, ifq_deq_rollback, and ifq_deq_commit. ifq_deq_begin allows a driver to take the ifq mutex and get a reference to the mbuf they wish to try and tx. if there's space, they can ifq_deq_commit it to remove the mbuf and release the mutex. if there's no space, ifq_deq_rollback simply releases the mutex. this api was developed to make updating the drivers using IFQ_POLL easy, instead of having to do significant semantic changes to avoid POLL that we cannot test on all the hardware. the common code has been tested pretty hard, and all the driver modifications are straightforward except for de(4). if that breaks it can be dealt with later. ok mpi@ jmatthew@
* Do not include <net/if_vlan_var.h> when it's not necessary.mpi2015-11-141-6/+1
| | | | | | Because of the VLAN hacks in mpw(4) this file still contains the definition of "struct ifvlan" which depends on <sys/refcnt.h> which in turns pull <sys/atomic.h>...
* arp_ifinit() is no longer needed.mpi2015-10-251-4/+1
|
* Increment if_ipackets in if_input().mpi2015-06-241-3/+1
| | | | | | | Note that pseudo-drivers not using if_input() are not affected by this conversion. ok mikeb@, kettenis@, claudio@, dlg@
* Convert moar drivers to if_input().mpi2015-04-301-8/+5
| | | | ok dlg@
* Remove some includes include-what-you-use claims don'tjsg2015-03-141-2/+1
| | | | | | | have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
* unifdef INETtedu2014-12-221-5/+1
|
* Use <sys/endian.h> instead of <machine/endian.h>guenther2014-12-191-2/+2
| | | | ok dlg@ mpi@ bcook@ millert@ miod@
* Fewer <netinet/in_systm.h>mpi2014-07-221-5/+1
|
* Instead of comparing the lower and higher addresses of all the multicastmpi2013-11-261-5/+4
| | | | | | | | | | | entries to decide if the IFF_ALLMULTI flag should be set, check if there is at least one real range between them. This should not change the behavior of any driver but if you encounter any problem, feel free to revert the offending chunk and ping me about it. ok naddy@, dlg@
* Most network drivers include netinet/in_var.h, but apparently theybluhm2013-08-071-2/+1
| | | | | don't have to. Just remove these include lines. Compiled on amd64 i386 sparc64; OK henning@ mikeb@
* mechanic rename M_{TCP|UDP}V4_CSUM_OUT -> M_{TCP|UDP}_CSUM_OUThenning2011-04-051-3/+3
| | | | ok claudio krw
* use nitems(); no binary change for drivers that are compiled on amd64.jasper2011-04-031-3/+3
| | | | ok claudio@
* these files don't need to include proc.h anymore. ok oga for agptedu2010-04-081-2/+1
|
* - consistify cfdriver for the ethernet drivers (0 -> NULL)jasper2009-08-131-2/+2
| | | | ok dlg@
* xge_shutdown is not needed now that interface is stopped, sincederaadt2009-08-101-14/+1
| | | | | xge_shutdown was just calling stop again ok dlg
* Eliminate the redundant bits of code for MTU and multicast handlingbrad2008-11-281-20/+11
| | | | | | | | | | | | | | from the individual drivers now that ether_ioctl() handles this. Shrinks the i386 kernels by.. RAMDISK - 2176 bytes RAMDISKB - 1504 bytes RAMDISKC - 736 bytes Tested by naddy@/okan@/sthen@/brad@/todd@/jmc@ and lots of users. Build tested on almost all archs by todd@/brad@ ok naddy@
* Introduce bpf_mtap_ether(), which for the benefit of bpf listenersnaddy2008-11-091-3/+3
| | | | | | | | | creates the VLAN encapsulation from the tag stored in the mbuf header. Idea from FreeBSD, input from claudio@ and canacar@. Switch all hardware VLAN enabled drivers to the new function. ok claudio@
* Re-add support for RX VLAN tag stripping.brad2008-10-211-5/+15
|
* Switch the existing TX VLAN hardware support over to having thenaddy2008-10-161-9/+4
| | | | | | tag in the header. Convert TX tagging in the drivers. Help and ok brad@
* First step towards cleaning up the Ethernet driver ioctl handling.brad2008-10-021-8/+2
| | | | | | | | | | | | | | | | | | | | Move calling ether_ioctl() from the top of the ioctl function, which at the moment does absolutely nothing, to the default switch case. Thus allowing drivers to define their own ioctl handlers and then falling back on ether_ioctl(). The only functional change this results in at the moment is having all Ethernet drivers returning the proper errno of ENOTTY instead of EINVAL/ENXIO when encountering unknown ioctl's. Shrinks the i386 kernels by.. RAMDISK - 1024 bytes RAMDISKB - 1120 bytes RAMDISKC - 832 bytes Tested by martin@/jsing@/todd@/brad@ Build tested on almost all archs by todd@/brad@ ok jsing@
* remove dead stores and newly created unused variables.chl2008-09-241-2/+2
| | | | | | Found by LLVM/Clang Static Analyzer. ok henning@ brad@
* Use the proper baudrate for 10Gb hw now that it can fit into the buadratebrad2007-09-191-2/+2
| | | | | | field. ok claudio@ dlg@
* fix C++ style commentckuethe2007-05-281-2/+2
| | | | from brad, ok deraadt
* wrap the debug macro in do { } while (0)dlg2007-05-261-3/+3
|
* reformat the softc to make it look like everything else we have.dlg2007-05-261-26/+29
|
* get rid of #define sc_if sc_arpcom.ac_ifdlg2007-05-261-3/+2
|
* this isnt netbsddlg2007-05-261-6/+1
|
* Enable HW Tx checksum offloading and VLAN tag insertion. From brad@.kettenis2007-02-271-7/+24
|
* Don't strip off VLAN tags. From brad@.kettenis2007-02-271-1/+6
|
* remove useless chunks of code that do nothing, since endian adjustmentsbrad2006-10-241-9/+1
| | | | only have to be made for little endian architectures.
* - remove the TODO comments at the top.brad2006-10-231-6/+8
| | | | - add the VLAN headers.
* call xge_stop() at the top of xge_init().brad2006-10-111-2/+13
|
* - Only use the MAC address workaround for the Xframe chipset.brad2006-10-101-46/+120
| | | | | | | | | | | - For the Xfrme II chipset, bring EOI out of reset before XGXS. - Check for the adapter status bit RIC_RUNNING before trying to access any registers with the Xframe II chipset. - Add new DTX_Control values for the Xframe II chipset to initialize the XGXS transciever. - Make sure to clear IFF_RUNNING/IFF_OACTIVE in xge_stop(). From Veena Parat @ Neterion
* only write to the RMAC_CFG_KEY register for the Xframe chipset.brad2006-08-251-10/+20
|