summaryrefslogtreecommitdiffstats
path: root/sys/dev/cxgb
Commit message (Collapse)AuthorAgeFilesLines
* Fix cxgb(4) panic with jumbo frames.np2009-07-091-2/+1
| | | | | Reviewed by: kmacy Approved by: re (kib), gnn (mentor)
* Use if_maddr_rlock() instead of IF_ADDR_LOCK() to protect access torwatson2009-06-261-3/+2
| | | | | | | if_multiaddrs in if_cxgb. Approved by: re (kib) MFC after: 6 weeks
* mvec routines should have no knowledge of the SG engine.np2009-06-253-17/+17
| | | | | Reviewed by: kmacy Approved by: gnn (mentor)
* Various ifmedia related fixes in cxgb(4), including:np2009-06-241-109/+118
| | | | | | | | | - build ifmedia list based on phy->caps, not string comparisons. - rebuild media list when a transceiver change is detected. - return EOPNOTSUPP instead of ENXIO in cxgb_media_status. Approved by: gnn (mentor) MFC after: 2 weeks.
* After cleaning up rt_tables from vnet.h and cleaning up opt_route.hbz2009-06-231-1/+0
| | | | | a lot of files no longer need route.h either. Garbage collect them. While here remove now unneeded vnet.h #includes as well.
* Fix cxgb's ifmedia ioctl handling. Also fixed a comment.np2009-06-221-7/+3
| | | | | Reviewed by: kmacy Approved by: gnn (mentor)
* Add a new function, ifa_ifwithaddr_check(), which rather than returningrwatson2009-06-221-3/+4
| | | | | | | | | | a pointer to an ifaddr matching the passed socket address, returns a boolean indicating whether one was present. In the (near) future, ifa_ifwithaddr() will return a referenced ifaddr rather than a raw ifaddr pointer, and the new wrapper will allow callers that care only about the boolean condition to avoid having to free that reference. MFC after: 3 weeks
* fix !x86 cxgb compilekmacy2009-06-211-1/+1
|
* fix typo in conditionalkmacy2009-06-201-1/+1
|
* - fix dma map handling for !x86 casekmacy2009-06-203-13/+15
| | | | - fix allocation failure handing in refill_fl
* Greatly simplify cxgb by removing almost all of the custom mbuf management logickmacy2009-06-199-2464/+1135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - remove mbuf iovec - useful, but adds too much complexity when isolated to the driver - remove driver private caching - insufficient benefit over UMA to justify the added complexity and maintenance overhead - remove separate logic for managing multiple transmit queues, with the new drbr routines the control flow can be made to much more closely resemble legacy drivers - remove dedicated service threads, with per-cpu callouts one can get the same benefit much more simply by registering a callout 1 tick in the future if there are still buffered packets - remove embedded mbuf usage - Jeffr's changes will (I hope) soon be integrated greatly reducing the overhead of using kernel APIs for reference counting clusters - add hysteresis to descriptor coalescing logic - add coalesce threshold sysctls to allow users to decide at run-time between optimizing for forwarding / UDP or optimizing for TCP - add once per second watchdog to effectively close the very rare races occurring from coalescing - incorporate Navdeep's changes to the initialization path required to convert port and adapter locks back to ordinary mutexes (silencing BPF LOR complaints) - enable prefetches in get_packet and tx cleaning Reviewed by: navdeep@ MFC after: 2 weeks
* r193336 moved ifq_detach to if_free which broke if_alloc followedsam2009-06-151-2/+2
| | | | | | | | by if_free (w/o doing if_attach); move ifq_attach to if_alloc and rename ifq_attach/detach to ifq_init/ifq_delete to better identify their purpose Reviewed by: jhb, kmacy
* Re-add the send queue tunable for people who do not use buffering.gnn2009-06-111-1/+10
| | | | | Reviewed by: jhb MFC after: 3 days
* Add a missing error statistic, the number of FCS errors on receive.gnn2009-06-101-0/+1
| | | | | Reviewed by: jhb MFC after: 1 day
* - add drbr routines for accessing #qentries and conditionally dequeueingkmacy2009-06-091-1/+1
| | | | - track bytes enqueued in buf_ring
* After r193232 rt_tables in vnet.h are no longer indirectly dependent onbz2009-06-081-2/+0
| | | | | | | | | the ROUTETABLES kernel option thus there is no need to include opt_route.h anymore in all consumers of vnet.h and no longer depend on it for module builds. Remove the hidden include in flowtable.h as well and leave the two explicit #includes in ip_input.c and ip_output.c.
* Rework socket upcalls to close some races with setup/teardown of upcalls.jhb2009-06-011-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Each socket upcall is now invoked with the appropriate socket buffer locked. It is not permissible to call soisconnected() with this lock held; however, so socket upcalls now return an integer value. The two possible values are SU_OK and SU_ISCONNECTED. If an upcall returns SU_ISCONNECTED, then the soisconnected() will be invoked on the socket after the socket buffer lock is dropped. - A new API is provided for setting and clearing socket upcalls. The API consists of soupcall_set() and soupcall_clear(). - To simplify locking, each socket buffer now has a separate upcall. - When a socket upcall returns SU_ISCONNECTED, the upcall is cleared from the receive socket buffer automatically. Note that a SO_SND upcall should never return SU_ISCONNECTED. - All this means that accept filters should now return SU_ISCONNECTED instead of calling soisconnected() directly. They also no longer need to explicitly clear the upcall on the new socket. - The HTTP accept filter still uses soupcall_set() to manage its internal state machine, but other accept filters no longer have any explicit knowlege of socket upcall internals aside from their return value. - The various RPC client upcalls currently drop the socket buffer lock while invoking soreceive() as a temporary band-aid. The plan for the future is to add a new flag to allow soreceive() to be called with the socket buffer locked. - The AIO callback for socket I/O is now also invoked with the socket buffer locked. Previously sowakeup() would drop the socket buffer lock only to call aio_swake() which immediately re-acquired the socket buffer lock for the duration of the function call. Discussed with: rwatson, rmacklem
* Update VNET base pointer setting macro to use a correct source ofzec2009-06-011-1/+1
| | | | | | vnet context. Approved by: julian (mentor)
* Rework interrupt bringup and teardown.gnn2009-05-271-135/+128
| | | | | | | | | | | | | Calculate the exact number of vectors we'll use before calling pci_alloc_msix. Don't grab nine all the time. Call cxgb_setup_interrupts once per T3, not once per port. Ditto for cxgb_teardown_interrupts. Don't leak resources when interrupt setup fails in the middle. Obtained from: Navdeep Parhar MFC after: 10 days
* Partial reversion of previous commit. The CXGB_SHUTDOWN flag does NOTgnn2009-05-221-4/+0
| | | | | | | need to be inverted when doing an ifconfig down of an interface. Pointed out by: Navdeep Parhar MFC after: 1 week
* Fix a possible panic cxgb_controller_attach() routine that would occurgnn2009-05-221-6/+12
| | | | | | | | | | | | only if prepping the adapter failed. Slight adjustment to comments. Fix a bug whereby downing the interface didn't preven it from processing packets. Submitted by: Navdeep Parhar MFC after: 1 week
* Integrate three changes from Chelsio.gnn2009-05-216-178/+172
| | | | | | | | | | 1) Add a sysctl that will say what type of PHYs exist on the card. 2) Fix a bug that occurs when an AEL 2005 PHY resets without a transciever in the card. 3) Unify the PHY link detection code. Obtained from: Navdeep Parhar MFC after: 10 days
* Modified the attach and detach routines to handle bringing ports upgnn2009-05-211-85/+146
| | | | | | | | and down more cleanly. This addresses a problem where if we have the link flap during boot the driver would lock up the system. Reviewed by: jhb MFC after: 1 week
* We no longer need to use d_thread_t, migrate to struct thread *.imp2009-05-201-2/+2
|
* fix bug introduced by last changekmacy2009-05-121-1/+1
| | | | Submitted by: Navdeep Parhar
* Change the curvnet variable from a global const struct vnet *,zec2009-05-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | previously always pointing to the default vnet context, to a dynamically changing thread-local one. The currvnet context should be set on entry to networking code via CURVNET_SET() macros, and reverted to previous state via CURVNET_RESTORE(). Recursions on curvnet are permitted, though strongly discuouraged. This change should have no functional impact on nooptions VIMAGE kernel builds, where CURVNET_* macros expand to whitespace. The curthread->td_vnet (aka curvnet) variable's purpose is to be an indicator of the vnet context in which the current network-related operation takes place, in case we cannot deduce the current vnet context from any other source, such as by looking at mbuf's m->m_pkthdr.rcvif->if_vnet, sockets's so->so_vnet etc. Moreover, so far curvnet has turned out to be an invaluable consistency checking aid: it helps to catch cases when sockets, ifnets or any other vnet-aware structures may have leaked from one vnet to another. The exact placement of the CURVNET_SET() / CURVNET_RESTORE() macros was a result of an empirical iterative process, whith an aim to reduce recursions on CURVNET_SET() to a minimum, while still reducing the scope of CURVNET_SET() to networking only operations - the alternative would be calling CURVNET_SET() on each system call entry. In general, curvnet has to be set in three typicall cases: when processing socket-related requests from userspace or from within the kernel; when processing inbound traffic flowing from device drivers to upper layers of the networking stack, and when executing timer-driven networking functions. This change also introduces a DDB subcommand to show the list of all vnet instances. Approved by: julian (mentor)
* simplify by removing dead codekmacy2009-04-271-49/+4
|
* Update stats in struct tcpstat using two new macros, TCPSTAT_ADD() andrwatson2009-04-111-1/+1
| | | | | | | | TCPSTAT_INC(), rather than directly manipulating the fields across the kernel. This will make it easier to change the implementation of these statistics, such as using per-CPU versions of the data structures. MFC after: 3 days
* Import "flowid" support for serializing flows across transmit queueskmacy2009-04-101-0/+1
| | | | Reviewed by: rwatson and jeli
* Minor updates to the Chelsio driver, including removing an LOR.gnn2009-03-232-10/+15
| | | | | | Submitted by: Navdeep Parhar at Chelsio Reviewed by: gnn MFC after: 3 weeks
* Fix a bug in the recent update to the Chelsio driver.gnn2009-03-211-0/+1
| | | | | | | | The tick routine was not being restarted in the init_locked routine which could resulted in loss of carrier when updating the MTU. Submitted by: Navdeep Parhar at Chelsio MFC after: 3 weeks
* Prefer ENETDOWN to ENXIO when returning queuing errors due to a linkrwatson2009-03-101-5/+5
| | | | | | | down, interface down, etc, with if_cxgb's if_transmit routine. MFC after: 3 days Reviewed by: kmacy
* Update the Chelsio driver to the latest bits from Chelsiognn2009-03-1014-6854/+9869
| | | | | | | | | | | | Firmware upgraded to 7.1.0 (from 5.0.0). T3C EEPROM and SRAM added; Code to update eeprom/sram fixed. fl_empty and rx_fifo_ovfl counters can be observed via sysctl. Two new cxgbtool commands to get uP logic analyzer info and uP IOQs Synced up with Chelsio's "common code" (as of 03/03/09) Submitted by: Navdeep Parhar at Chelsio Reviewed by: gnn MFC after: 2 weeks
* For all files including net/vnet.h directly include opt_route.h andbz2009-02-271-0/+3
| | | | | | | | | | | | | | net/route.h. Remove the hidden include of opt_route.h and net/route.h from net/vnet.h. We need to make sure that both opt_route.h and net/route.h are included before net/vnet.h because of the way MRT figures out the number of FIBs from the kernel option. If we do not, we end up with the default number of 1 when including net/vnet.h and array sizes are wrong. This does not change the list of files which depend on opt_route.h but we can identify them now more easily.
* Check in the actual module recognition code for the Chelsiognn2008-12-182-36/+175
| | | | | | driver. Obtained from: Chelsio Inc.
* Use inc_flags instead of the inc_isipv6 alias which so farbz2008-12-171-3/+0
| | | | | | | | | | | | | | had been the only flag with random usage patterns. Switch inc_flags to be used as a real bit field by using INC_ISIPV6 with bitops to check for the 'isipv6' condition. While here fix a place or two where in case of v4 inc_flags were not properly initialized before.[1] Found by: rwatson during review [1] Discussed with: rwatson Reviewed by: rwatson MFC after: 4 weeks
* This main goals of this project are:qingli2008-12-152-27/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. separating L2 tables (ARP, NDP) from the L3 routing tables 2. removing as much locking dependencies among these layers as possible to allow for some parallelism in the search operations 3. simplify the logic in the routing code, The most notable end result is the obsolescent of the route cloning (RTF_CLONING) concept, which translated into code reduction in both IPv4 ARP and IPv6 NDP related modules, and size reduction in struct rtentry{}. The change in design obsoletes the semantics of RTF_CLONING, RTF_WASCLONE and RTF_LLINFO routing flags. The userland applications such as "arp" and "ndp" have been modified to reflect those changes. The output from "netstat -r" shows only the routing entries. Quite a few developers have contributed to this project in the past: Glebius Smirnoff, Luigi Rizzo, Alessandro Cerri, and Andre Oppermann. And most recently: - Kip Macy revised the locking code completely, thus completing the last piece of the puzzle, Kip has also been conducting active functional testing - Sam Leffler has helped me improving/refactoring the code, and provided valuable reviews - Julian Elischer setup the perforce tree for me and has helped me maintaining that branch before the svn conversion
* Bug fix to support N310 version of Chelsio cards (board ID 1088).gnn2008-12-062-3/+12
| | | | | Obtained from: Chelsio Inc. MFC after: 3 days
* Re submit code to print the part and serial number for Chelsio cards.gnn2008-12-051-0/+7
| | | | | | The original code was accidentally removed in another commit. MFC after: 1 day
* Fix a bug with the ael1006 PHY. The bug shows up as persistent but incompletegnn2008-12-041-0/+10
| | | | | | | | packet loss, of between 10-30%. The fix is to put the PHY into and take it out of local loopback mode when resetting the interface. Obtained from: Chelsio Inc. MFC after: 3 days
* Rather than using hidden includes (with cicular dependencies),bz2008-12-022-0/+6
| | | | | | | | | | | directly include only the header files needed. This reduces the unneeded spamming of various headers into lots of files. For now, this leaves us with very few modules including vnet.h and thus needing to depend on opt_route.h. Reviewed by: brooks, gnn, des, zec, imp Sponsored by: The FreeBSD Foundation
* Bug fix from Chelsio which addresses the issue of the device resettinggnn2008-12-021-25/+2
| | | | | | | | | when it sees only received packets. In some cases where a device only recieves data it mistakenly thinks that its transmitting side is broken and resets the device. Obtained from: Chelsio Inc. MFC after: 3 days
* - fix bug where dnsperf would stop transmitting after a few secondskmacy2008-12-021-57/+32
| | | | | | | | | | | - break complex conditionals in to multiple lines to avoid wrapping - remove copious unused debug statements - be more aggressive about cleaning in the calling thread - eliminate usage of ENOSPC - increase number of iterations that cxgbsp can do - eliminate "initerr" usage to simplify ENOBUFS handling - when coalescing pass all packets to BPF - always set overrun if hardware queue is full
* The pkthdr field is flowid not rss_hashkmacy2008-12-021-1/+1
|
* - fix multiqueue conditionalkmacy2008-12-021-2/+2
| | | | | | - don't leak mbuf tags in the non-conditional case Found by: Navdeep Parhar
* integrate use after free fixes from private branchkmacy2008-12-021-54/+44
| | | | Found by: kkenn@
* null out m_next when marshalling a packetkmacy2008-12-011-1/+3
|
* Update internal mac stats every time the tick task is calledkmacy2008-12-011-25/+16
| | | | | if we don't do this "netstat -w 1" will frequently see negative differences in packets sent
* don't manually track statisticskmacy2008-12-011-6/+0
|
* Proper fix for tracking ifnet statisticskmacy2008-12-011-0/+52
|
OpenPOWER on IntegriCloud