| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Previously, when transmitting short runs of packets via cxgbe_nm_tx(),
we would wait until a large number of packets were buffered before
scheduling a task to clean transmit buffers.
Obtained from: np
|
|
|
|
|
|
| |
PR: 253069
MFC after: 1 week
Sponsored by: Chelsio Communications
|
|
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
|
|
|
|
|
| |
Reviewed by: np
Sponsored by: Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D38597
|
|
|
|
|
|
|
| |
Mostly trailing whitespace and spaces before tabs.
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D37350
|
|
|
|
|
|
|
|
| |
hw.cxgbe.cong_drop=2 will generate backpressure *and* drop frames for
queues that are congested.
MFC after: 2 weeks
Sponsored by: Chelsio Communications
|
|
|
|
|
|
|
|
| |
The firmware takes the type into account when setting up the PCIe
channel for the queue.
MFC after: 1 week
Sponsored by: Chelsio Communications
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The driver uses both software resources (locks, callouts, memory for
descriptors and for bookkeeping, sysctls, etc.) and hardware resources
(VIs, DMA queues, TCAM entries, etc.) to operate the NIC. This commit
splits the single *_ALLOCATED flag used to track all these resources
into separate *_SW_ALLOCATED and *_HW_ALLOCATED flags.
This is the simplified pseudocode that now applies to most queues (foo
can be ctrlq/txq/rxq/ofld_txq/ofld_rxq):
/* Idempotent */
alloc_foo
{
if (!SW_ALLOCATED)
init_iq/init_eq/init_fl no-fail sw init
alloc_iq_fl/alloc_eq/alloc_wrq may-fail sw alloc
add_foo_sysctls, etc. no-fail post-alloc items
if (!HW_ALLOCATED)
alloc_iq_fl_hwq/alloc_eq_hwq hw resource allocation
}
/* Idempotent */
free_foo
{
if (!HW_ALLOCATED)
free_iq_fl_hwq/free_eq_hwq release hw resources
if (!SW_ALLOCATED)
free_iq_fl/free_eq/free_wrq release sw resources
}
The routines that take the driver to FULL_INIT_DONE and VI_INIT_DONE and
back are now all idempotent. The quiesce routines pay attention to the
HW_ALLOCATED flag and will not wait on the hardware for pidx/cidx
updates and other completions if this flag is not set.
MFC after: 1 month
Sponsored by: Chelsio Communications
|
|
|
|
|
|
|
|
| |
These routines to handle 8b and 16b types were added in r289773 5+ years
ago.
MFC after: 2 weeks
Sponsored by: Chelsio Communications
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is common for freelists to be starving when a netmap application
stops. Mailbox commands to free queues can hang in such a situation.
Avoid that by not freeing the queues when netmap is switched off.
Instead, use an alternate method to stop the queues without releasing
the context ids. If netmap is enabled again later then the same queue
is reinitialized for use. Move alloc_nm_rxq and txq to t4_netmap.c
while here.
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=368296
|
|
|
|
|
|
|
|
|
|
|
|
| |
r367917 fixed the backpressure on the netmap rxq being stopped but that
doesn't help if some other netmap rxq is starved (because it is stopping
too although the driver doesn't know this yet) and blocks the pipeline.
An alternate fix that works in all cases will be checked in instead.
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=368283
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The netmap application using the driver is responsible for replenishing
the receive freelists and they may be totally depleted when the
application exits. Packets in flight, if any, might block the pipeline
in case there aren't enough buffers left in the freelist. Avoid this by
filling up the freelists with a driver allocated buffer.
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=367917
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The firmware can allocate ingress and egress context ids anywhere from
its configured range. Size the iq/eq maps to match the entire range
instead of assuming that the firmware always allocates the first
available context id.
Reported by: Baptiste Wicht @ Verisign
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=366929
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bind the netmap tx queues to a special '0xff' scheduling class which
makes the firmware skip some processing related to rate limiting on the
outgoing traffic. Future firmwares will do this automatically.
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=366247
|
|
|
|
| |
Notes:
svn path=/head/; revision=366246
|
|
|
|
|
|
|
|
|
|
| |
maximum burst size used when fetching descriptors from the list.
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=366245
|
|
|
|
|
|
|
|
|
| |
the interface is down.
MFC after: 1 week
Notes:
svn path=/head/; revision=366244
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Only active netmap receive queues should be in the RSS lookup table.
- The RSS table should be restored for NIC operation when the last
active netmap queue is switched off, not the first one.
- Support repeated netmap ON/OFF on a subset of the queues. This works
whether the the queues being enabled and disabled are the only ones
active or not. Some kring indexes have to be reset in the driver for
the second case.
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=366242
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were quite a few places where port_info was being accessed only to
get to the adapter.
Reviewed by: jhb@
MFC after: 1 week
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D25432
Notes:
svn path=/head/; revision=362616
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reduces the lines bouncing around between the driver rx ithread and
the netmap rxsync thread. There is no net change in the size of the
struct (it continues to waste a lot of space).
This kind of split was originally proposed in D17869 by Marc De La
Gueronniere @ Verisign, Inc.
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=359159
|
|
|
|
|
|
|
|
|
|
|
|
| |
the hardware.
hw.cxgbe.nm_txcsum=1
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=357553
|
|
|
|
|
|
|
|
|
|
|
| |
The cong_drop setting will apply to queues created after the setting is
changed and not to existing queues.
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=357552
|
|
|
|
|
|
|
|
| |
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=357551
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies the driver's rx fast path as well as the bookkeeping
code that tracks various rx buffer sizes and layouts.
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=357481
|
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=355673
|
|
|
|
|
|
|
|
|
|
|
| |
TX_PKTS2 is more efficient within the firmware and this improves netmap
Tx by a few Mpps in some common scenarios.
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=355580
|
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=354106
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After the fix contained in r341144, cxgbe does not need anymore
to set the IFCAP_NETMAP flag manually.
Reviewed by: np
Approved by: gnn (mentor)
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D17987
Notes:
svn path=/head/; revision=341145
|
|
|
|
|
|
|
|
|
|
| |
Reviewed by: np
MFC after: 1 month
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D18360
Notes:
svn path=/head/; revision=341098
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A kernel panic can occur if the cxgbe interface is DOWN
when activating netmap. This patch prevents the driver
from freeing up cxgbe netmap resources when they have not
been allocated.
Submitted by: Nicolas Witkowski <nwitkowski@verisign.com>
Reviewed by: np
MFC after: 1 week
Sponsored by: Verisign, Inc.
Differential Revision: https://reviews.freebsd.org/D17802
Notes:
svn path=/head/; revision=340375
|
|
|
|
|
|
|
|
|
|
|
|
| |
interface into two groups. Filters can be used to match traffic
and distribute it across a group.
hw.cxgbe.nm_split_rss
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=339749
|
|
|
|
|
|
|
| |
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=339705
|
|
|
|
|
|
|
|
|
|
| |
cases.
Reported by: Coverity (CIDs 1009398, 1009400, 1009401, 1357325, 1394783). All false positives.
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=338166
|
|
|
|
|
|
|
|
|
|
| |
freelists and one for those without.
MFH: 3 weeks
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=337609
|
|
|
|
|
|
|
|
|
| |
netmap tx queues. There is no change in default behavior.
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=337553
|
|
|
|
|
|
|
|
|
|
| |
freelists of netmap receive queues. This is primarily to test various
congestion scenarios in the chip.
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=335243
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
of descriptors processed. Add the ability to gather a certain maximum
number of frames in the driver's rx before waking up netmap rx. If
there aren't enough frames then netmap rx will be woken up as usual.
hw.cxgbe.nm_rx_nframes
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=335241
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Changelist:
- Turn tx_rings and rx_rings arrays into arrays of pointers to kring
structs. This patch includes fixes for ixv, ixl, ix, re, cxgbe, iflib,
vtnet and ptnet drivers to cope with the change.
- Generalize the nm_config() callback to accept a struct containing many
parameters.
- Introduce NKR_FAKERING to support buffers sharing (used for netmap
pipes)
- Improved API for external VALE modules.
- Various bug fixes and improvements to the netmap memory allocator,
including support for externally (userspace) allocated memory.
- Refactoring of netmap pipes: now linked rings share the same netmap
buffers, with a separate set of kring pointers (rhead, rcur, rtail).
Buffer swapping does not need to happen anymore.
- Large refactoring of the control API towards an extensible solution;
the goal is to allow the addition of more commands and extension of
existing ones (with new options) without the need of hacks or the
risk of running out of configuration space.
A new NIOCCTRL ioctl has been added to handle all the requests of the
new control API, which cover all the functionalities so far supported.
The netmap API bumps from 11 to 12 with this patch. Full backward
compatibility is provided for the old control command (NIOCREGIF), by
means of a new netmap_legacy module. Many parts of the old netmap.h
header has now been moved to netmap_legacy.h (included by netmap.h).
Approved by: hrs (mentor)
Notes:
svn path=/head/; revision=332423
|
|
|
|
|
|
|
|
|
| |
functional impact intended.
Submitted by: Vincenzo Maffione <v.maffione@gmail.com>
Notes:
svn path=/head/; revision=329675
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
leaves the firmware event queue (fwq) as the only queue that can take
interrupts for others.
This simplifies cfg_itype_and_nqueues and queue allocation in the driver
at the cost of a little (never?) used configuration. It also allows
service_iq to be split into two specialized variants in the future.
MFC after: 2 months
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=327093
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do not attempt to initialize netmap queues that are already initialized
or aren't supposed to be initialized. Similarly, do not free queues
that are not initialized or aren't supposed to be freed.
PR: 217156
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=319986
|
|
|
|
|
|
|
|
|
| |
any more (since r307394). Do it in the driver instead.
MFC after: 1 week
Notes:
svn path=/head/; revision=309725
|
|
|
|
|
|
|
|
|
|
| |
message inside a FW_MSG. The base NIC already deals with updates in
either form.
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=306273
|
|
|
|
| |
Notes:
svn path=/head/; revision=306063
|
|
|
|
|
|
|
| |
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=305702
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
VF devices use a different register layout than PF devices. Storing
the offset in a value in the softc allows code to be shared between the
PF and VF drivers.
Reviewed by: np
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D7389
Notes:
svn path=/head/; revision=303647
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
vcxgbe/vcxl interfaces and retire the 'n' interfaces. The main
cxgbe/cxl interfaces and tunables related to them are not affected by
any of this and will continue to operate as usual.
The driver used to create an additional 'n' interface for every
cxgbe/cxl interface if "device netmap" was in the kernel. The 'n'
interface shared the wire with the main interface but was otherwise
autonomous (with its own MAC address, etc.). It did not have normal
tx/rx but had a specialized netmap-only data path. r291665 added
another set of virtual interfaces (the 'v' interfaces) to the driver.
These had normal tx/rx but no netmap support.
This revision consolidates the features of both the interfaces into the
'v' interface which now has a normal data path, TOE support, and native
netmap support. The 'v' interfaces need to be created explicitly with
the hw.cxgbe.num_vis tunable. This means "device netmap" will not
result in the automatic creation of any virtual interfaces.
The following tunables can be used to override the default number of
queues allocated for each 'v' interface. nofld* = 0 will disable TOE on
the virtual interface and nnm* = 0 to will disable native netmap
support.
# number of normal NIC queues
hw.cxgbe.ntxq_vi
hw.cxgbe.nrxq_vi
# number of TOE queues
hw.cxgbe.nofldtxq_vi
hw.cxgbe.nofldrxq_vi
# number of netmap queues
hw.cxgbe.nnmtxq_vi
hw.cxgbe.nnmrxq_vi
hw.cxgbe.nnm{t,r}xq{10,1}g tunables have been removed.
--- tl;dr version ---
The workflow for netmap on cxgbe starting with FreeBSD 11 is:
1) "device netmap" in the kernel config.
2) "hw.cxgbe.num_vis=2" in loader.conf. num_vis > 2 is ok too, you'll
end up with multiple autonomous netmap-capable interfaces for every
port.
3) "dmesg | grep vcxl | grep netmap" to verify that the interface has
netmap queues.
4) Use any of the 'v' interfaces for netmap. pkt-gen -i vcxl<n>... .
One major improvement is that the netmap interface has a normal data
path as expected.
5) Just ignore the cxl interfaces if you want to use netmap only. No
need to bring them up. The vcxl interfaces are completely independent
and everything should just work.
---------------------
Approved by: re@ (gjb@)
Relnotes: Yes
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=302110
|
|
|
|
|
|
|
| |
No functional change.
Notes:
svn path=/head/; revision=298848
|
|
|
|
|
|
|
|
|
|
| |
Move the code that reads all the parameters to t4_init_sge_params in the
shared code. Use these per-adapter values instead of globals.
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=296478
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
update to the latest internal shared code.
- Add a chip_params structure to keep track of hardware constants for
all generations of Terminators handled by cxgbe.
- Update t4_hw_pci_read_cfg4 to work with T6.
- Update the hardware debug sysctls (hidden within dev.<tNnex>.<n>.misc.*) to
work with T6. Most of the changes are in the decoders for the CIM
logic analyzer and the MPS TCAM.
- Acquire the regwin lock around indirect register accesses.
Obtained from: Chelsio Communications
Sponsored by: Chelsio Communications
Notes:
svn path=/head/; revision=296383
|