Merge cb8e59cc87
("Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next") into android-mainline
Steps along the way to 5.8-rc1. Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I280c0a50b5e137596b1c327759c6a18675908179
This commit is contained in:
@@ -124,6 +124,19 @@ Description:
|
|||||||
authentication is performed (e.g: 802.1x). 'link_mode' attribute
|
authentication is performed (e.g: 802.1x). 'link_mode' attribute
|
||||||
will also reflect the dormant state.
|
will also reflect the dormant state.
|
||||||
|
|
||||||
|
What: /sys/class/net/<iface>/testing
|
||||||
|
Date: April 2002
|
||||||
|
KernelVersion: 5.8
|
||||||
|
Contact: netdev@vger.kernel.org
|
||||||
|
Description:
|
||||||
|
Indicates whether the interface is under test. Possible
|
||||||
|
values are:
|
||||||
|
0: interface is not being tested
|
||||||
|
1: interface is being tested
|
||||||
|
|
||||||
|
When an interface is under test, it cannot be expected
|
||||||
|
to pass packets as normal.
|
||||||
|
|
||||||
What: /sys/clas/net/<iface>/duplex
|
What: /sys/clas/net/<iface>/duplex
|
||||||
Date: October 2009
|
Date: October 2009
|
||||||
KernelVersion: 2.6.33
|
KernelVersion: 2.6.33
|
||||||
|
@@ -356,7 +356,7 @@
|
|||||||
shot down by NMI
|
shot down by NMI
|
||||||
|
|
||||||
autoconf= [IPV6]
|
autoconf= [IPV6]
|
||||||
See Documentation/networking/ipv6.txt.
|
See Documentation/networking/ipv6.rst.
|
||||||
|
|
||||||
show_lapic= [APIC,X86] Advanced Programmable Interrupt Controller
|
show_lapic= [APIC,X86] Advanced Programmable Interrupt Controller
|
||||||
Limit apic dumping. The parameter defines the maximal
|
Limit apic dumping. The parameter defines the maximal
|
||||||
@@ -638,7 +638,7 @@
|
|||||||
|
|
||||||
See Documentation/admin-guide/serial-console.rst for more
|
See Documentation/admin-guide/serial-console.rst for more
|
||||||
information. See
|
information. See
|
||||||
Documentation/networking/netconsole.txt for an
|
Documentation/networking/netconsole.rst for an
|
||||||
alternative.
|
alternative.
|
||||||
|
|
||||||
uart[8250],io,<addr>[,options]
|
uart[8250],io,<addr>[,options]
|
||||||
@@ -831,7 +831,7 @@
|
|||||||
|
|
||||||
decnet.addr= [HW,NET]
|
decnet.addr= [HW,NET]
|
||||||
Format: <area>[,<node>]
|
Format: <area>[,<node>]
|
||||||
See also Documentation/networking/decnet.txt.
|
See also Documentation/networking/decnet.rst.
|
||||||
|
|
||||||
default_hugepagesz=
|
default_hugepagesz=
|
||||||
[same as hugepagesz=] The size of the default
|
[same as hugepagesz=] The size of the default
|
||||||
@@ -872,7 +872,7 @@
|
|||||||
miss to occur.
|
miss to occur.
|
||||||
|
|
||||||
disable= [IPV6]
|
disable= [IPV6]
|
||||||
See Documentation/networking/ipv6.txt.
|
See Documentation/networking/ipv6.rst.
|
||||||
|
|
||||||
hardened_usercopy=
|
hardened_usercopy=
|
||||||
[KNL] Under CONFIG_HARDENED_USERCOPY, whether
|
[KNL] Under CONFIG_HARDENED_USERCOPY, whether
|
||||||
@@ -912,7 +912,7 @@
|
|||||||
to workaround buggy firmware.
|
to workaround buggy firmware.
|
||||||
|
|
||||||
disable_ipv6= [IPV6]
|
disable_ipv6= [IPV6]
|
||||||
See Documentation/networking/ipv6.txt.
|
See Documentation/networking/ipv6.rst.
|
||||||
|
|
||||||
disable_mtrr_cleanup [X86]
|
disable_mtrr_cleanup [X86]
|
||||||
The kernel tries to adjust MTRR layout from continuous
|
The kernel tries to adjust MTRR layout from continuous
|
||||||
@@ -4956,7 +4956,7 @@
|
|||||||
Set the number of tcp_metrics_hash slots.
|
Set the number of tcp_metrics_hash slots.
|
||||||
Default value is 8192 or 16384 depending on total
|
Default value is 8192 or 16384 depending on total
|
||||||
ram pages. This is used to specify the TCP metrics
|
ram pages. This is used to specify the TCP metrics
|
||||||
cache size. See Documentation/networking/ip-sysctl.txt
|
cache size. See Documentation/networking/ip-sysctl.rst
|
||||||
"tcp_no_metrics_save" section for more details.
|
"tcp_no_metrics_save" section for more details.
|
||||||
|
|
||||||
tdfx= [HW,DRM]
|
tdfx= [HW,DRM]
|
||||||
|
@@ -54,7 +54,7 @@ You will need to create a new device to use ``/dev/console``. The official
|
|||||||
``/dev/console`` is now character device 5,1.
|
``/dev/console`` is now character device 5,1.
|
||||||
|
|
||||||
(You can also use a network device as a console. See
|
(You can also use a network device as a console. See
|
||||||
``Documentation/networking/netconsole.txt`` for information on that.)
|
``Documentation/networking/netconsole.rst`` for information on that.)
|
||||||
|
|
||||||
Here's an example that will use ``/dev/ttyS1`` (COM2) as the console.
|
Here's an example that will use ``/dev/ttyS1`` (COM2) as the console.
|
||||||
Replace the sample values as needed.
|
Replace the sample values as needed.
|
||||||
|
@@ -339,7 +339,9 @@ settings from init_net and for IPv6 we reset all settings to default.
|
|||||||
|
|
||||||
If set to 1, both IPv4 and IPv6 settings are forced to inherit from
|
If set to 1, both IPv4 and IPv6 settings are forced to inherit from
|
||||||
current ones in init_net. If set to 2, both IPv4 and IPv6 settings are
|
current ones in init_net. If set to 2, both IPv4 and IPv6 settings are
|
||||||
forced to reset to their default values.
|
forced to reset to their default values. If set to 3, both IPv4 and IPv6
|
||||||
|
settings are forced to inherit from current ones in the netns where this
|
||||||
|
new netns has been created.
|
||||||
|
|
||||||
Default : 0 (for compatibility reasons)
|
Default : 0 (for compatibility reasons)
|
||||||
|
|
||||||
@@ -353,8 +355,8 @@ socket's buffer. It will not take effect unless PF_UNIX flag is specified.
|
|||||||
|
|
||||||
3. /proc/sys/net/ipv4 - IPV4 settings
|
3. /proc/sys/net/ipv4 - IPV4 settings
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
Please see: Documentation/networking/ip-sysctl.txt and ipvs-sysctl.txt for
|
Please see: Documentation/networking/ip-sysctl.rst and
|
||||||
descriptions of these entries.
|
Documentation/admin-guide/sysctl/net.rst for descriptions of these entries.
|
||||||
|
|
||||||
|
|
||||||
4. Appletalk
|
4. Appletalk
|
||||||
|
@@ -437,6 +437,21 @@ needed::
|
|||||||
See the kernels selftest `Documentation/dev-tools/kselftest.rst`_
|
See the kernels selftest `Documentation/dev-tools/kselftest.rst`_
|
||||||
document for further documentation.
|
document for further documentation.
|
||||||
|
|
||||||
|
To maximize the number of tests passing, the .config of the kernel
|
||||||
|
under test should match the config file fragment in
|
||||||
|
tools/testing/selftests/bpf as closely as possible.
|
||||||
|
|
||||||
|
Finally to ensure support for latest BPF Type Format features -
|
||||||
|
discussed in `Documentation/bpf/btf.rst`_ - pahole version 1.16
|
||||||
|
is required for kernels built with CONFIG_DEBUG_INFO_BTF=y.
|
||||||
|
pahole is delivered in the dwarves package or can be built
|
||||||
|
from source at
|
||||||
|
|
||||||
|
https://github.com/acmel/dwarves
|
||||||
|
|
||||||
|
Some distros have pahole version 1.16 packaged already, e.g.
|
||||||
|
Fedora, Gentoo.
|
||||||
|
|
||||||
Q: Which BPF kernel selftests version should I run my kernel against?
|
Q: Which BPF kernel selftests version should I run my kernel against?
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
A: If you run a kernel ``xyz``, then always run the BPF kernel selftests
|
A: If you run a kernel ``xyz``, then always run the BPF kernel selftests
|
||||||
|
@@ -7,7 +7,7 @@ Filter) facility, with a focus on the extended BPF version (eBPF).
|
|||||||
|
|
||||||
This kernel side documentation is still work in progress. The main
|
This kernel side documentation is still work in progress. The main
|
||||||
textual documentation is (for historical reasons) described in
|
textual documentation is (for historical reasons) described in
|
||||||
`Documentation/networking/filter.txt`_, which describe both classical
|
`Documentation/networking/filter.rst`_, which describe both classical
|
||||||
and extended BPF instruction-set.
|
and extended BPF instruction-set.
|
||||||
The Cilium project also maintains a `BPF and XDP Reference Guide`_
|
The Cilium project also maintains a `BPF and XDP Reference Guide`_
|
||||||
that goes into great technical depth about the BPF Architecture.
|
that goes into great technical depth about the BPF Architecture.
|
||||||
@@ -59,7 +59,7 @@ Testing and debugging BPF
|
|||||||
|
|
||||||
|
|
||||||
.. Links:
|
.. Links:
|
||||||
.. _Documentation/networking/filter.txt: ../networking/filter.txt
|
.. _Documentation/networking/filter.rst: ../networking/filter.txt
|
||||||
.. _man-pages: https://www.kernel.org/doc/man-pages/
|
.. _man-pages: https://www.kernel.org/doc/man-pages/
|
||||||
.. _bpf(2): http://man7.org/linux/man-pages/man2/bpf.2.html
|
.. _bpf(2): http://man7.org/linux/man-pages/man2/bpf.2.html
|
||||||
.. _BPF and XDP Reference Guide: http://cilium.readthedocs.io/en/latest/bpf/
|
.. _BPF and XDP Reference Guide: http://cilium.readthedocs.io/en/latest/bpf/
|
||||||
|
209
Documentation/bpf/ringbuf.rst
Normal file
209
Documentation/bpf/ringbuf.rst
Normal file
@@ -0,0 +1,209 @@
|
|||||||
|
===============
|
||||||
|
BPF ring buffer
|
||||||
|
===============
|
||||||
|
|
||||||
|
This document describes BPF ring buffer design, API, and implementation details.
|
||||||
|
|
||||||
|
.. contents::
|
||||||
|
:local:
|
||||||
|
:depth: 2
|
||||||
|
|
||||||
|
Motivation
|
||||||
|
----------
|
||||||
|
|
||||||
|
There are two distinctive motivators for this work, which are not satisfied by
|
||||||
|
existing perf buffer, which prompted creation of a new ring buffer
|
||||||
|
implementation.
|
||||||
|
|
||||||
|
- more efficient memory utilization by sharing ring buffer across CPUs;
|
||||||
|
- preserving ordering of events that happen sequentially in time, even across
|
||||||
|
multiple CPUs (e.g., fork/exec/exit events for a task).
|
||||||
|
|
||||||
|
These two problems are independent, but perf buffer fails to satisfy both.
|
||||||
|
Both are a result of a choice to have per-CPU perf ring buffer. Both can be
|
||||||
|
also solved by having an MPSC implementation of ring buffer. The ordering
|
||||||
|
problem could technically be solved for perf buffer with some in-kernel
|
||||||
|
counting, but given the first one requires an MPSC buffer, the same solution
|
||||||
|
would solve the second problem automatically.
|
||||||
|
|
||||||
|
Semantics and APIs
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Single ring buffer is presented to BPF programs as an instance of BPF map of
|
||||||
|
type ``BPF_MAP_TYPE_RINGBUF``. Two other alternatives considered, but
|
||||||
|
ultimately rejected.
|
||||||
|
|
||||||
|
One way would be to, similar to ``BPF_MAP_TYPE_PERF_EVENT_ARRAY``, make
|
||||||
|
``BPF_MAP_TYPE_RINGBUF`` could represent an array of ring buffers, but not
|
||||||
|
enforce "same CPU only" rule. This would be more familiar interface compatible
|
||||||
|
with existing perf buffer use in BPF, but would fail if application needed more
|
||||||
|
advanced logic to lookup ring buffer by arbitrary key.
|
||||||
|
``BPF_MAP_TYPE_HASH_OF_MAPS`` addresses this with current approach.
|
||||||
|
Additionally, given the performance of BPF ringbuf, many use cases would just
|
||||||
|
opt into a simple single ring buffer shared among all CPUs, for which current
|
||||||
|
approach would be an overkill.
|
||||||
|
|
||||||
|
Another approach could introduce a new concept, alongside BPF map, to represent
|
||||||
|
generic "container" object, which doesn't necessarily have key/value interface
|
||||||
|
with lookup/update/delete operations. This approach would add a lot of extra
|
||||||
|
infrastructure that has to be built for observability and verifier support. It
|
||||||
|
would also add another concept that BPF developers would have to familiarize
|
||||||
|
themselves with, new syntax in libbpf, etc. But then would really provide no
|
||||||
|
additional benefits over the approach of using a map. ``BPF_MAP_TYPE_RINGBUF``
|
||||||
|
doesn't support lookup/update/delete operations, but so doesn't few other map
|
||||||
|
types (e.g., queue and stack; array doesn't support delete, etc).
|
||||||
|
|
||||||
|
The approach chosen has an advantage of re-using existing BPF map
|
||||||
|
infrastructure (introspection APIs in kernel, libbpf support, etc), being
|
||||||
|
familiar concept (no need to teach users a new type of object in BPF program),
|
||||||
|
and utilizing existing tooling (bpftool). For common scenario of using a single
|
||||||
|
ring buffer for all CPUs, it's as simple and straightforward, as would be with
|
||||||
|
a dedicated "container" object. On the other hand, by being a map, it can be
|
||||||
|
combined with ``ARRAY_OF_MAPS`` and ``HASH_OF_MAPS`` map-in-maps to implement
|
||||||
|
a wide variety of topologies, from one ring buffer for each CPU (e.g., as
|
||||||
|
a replacement for perf buffer use cases), to a complicated application
|
||||||
|
hashing/sharding of ring buffers (e.g., having a small pool of ring buffers
|
||||||
|
with hashed task's tgid being a look up key to preserve order, but reduce
|
||||||
|
contention).
|
||||||
|
|
||||||
|
Key and value sizes are enforced to be zero. ``max_entries`` is used to specify
|
||||||
|
the size of ring buffer and has to be a power of 2 value.
|
||||||
|
|
||||||
|
There are a bunch of similarities between perf buffer
|
||||||
|
(``BPF_MAP_TYPE_PERF_EVENT_ARRAY``) and new BPF ring buffer semantics:
|
||||||
|
|
||||||
|
- variable-length records;
|
||||||
|
- if there is no more space left in ring buffer, reservation fails, no
|
||||||
|
blocking;
|
||||||
|
- memory-mappable data area for user-space applications for ease of
|
||||||
|
consumption and high performance;
|
||||||
|
- epoll notifications for new incoming data;
|
||||||
|
- but still the ability to do busy polling for new data to achieve the
|
||||||
|
lowest latency, if necessary.
|
||||||
|
|
||||||
|
BPF ringbuf provides two sets of APIs to BPF programs:
|
||||||
|
|
||||||
|
- ``bpf_ringbuf_output()`` allows to *copy* data from one place to a ring
|
||||||
|
buffer, similarly to ``bpf_perf_event_output()``;
|
||||||
|
- ``bpf_ringbuf_reserve()``/``bpf_ringbuf_commit()``/``bpf_ringbuf_discard()``
|
||||||
|
APIs split the whole process into two steps. First, a fixed amount of space
|
||||||
|
is reserved. If successful, a pointer to a data inside ring buffer data
|
||||||
|
area is returned, which BPF programs can use similarly to a data inside
|
||||||
|
array/hash maps. Once ready, this piece of memory is either committed or
|
||||||
|
discarded. Discard is similar to commit, but makes consumer ignore the
|
||||||
|
record.
|
||||||
|
|
||||||
|
``bpf_ringbuf_output()`` has disadvantage of incurring extra memory copy,
|
||||||
|
because record has to be prepared in some other place first. But it allows to
|
||||||
|
submit records of the length that's not known to verifier beforehand. It also
|
||||||
|
closely matches ``bpf_perf_event_output()``, so will simplify migration
|
||||||
|
significantly.
|
||||||
|
|
||||||
|
``bpf_ringbuf_reserve()`` avoids the extra copy of memory by providing a memory
|
||||||
|
pointer directly to ring buffer memory. In a lot of cases records are larger
|
||||||
|
than BPF stack space allows, so many programs have use extra per-CPU array as
|
||||||
|
a temporary heap for preparing sample. bpf_ringbuf_reserve() avoid this needs
|
||||||
|
completely. But in exchange, it only allows a known constant size of memory to
|
||||||
|
be reserved, such that verifier can verify that BPF program can't access memory
|
||||||
|
outside its reserved record space. bpf_ringbuf_output(), while slightly slower
|
||||||
|
due to extra memory copy, covers some use cases that are not suitable for
|
||||||
|
``bpf_ringbuf_reserve()``.
|
||||||
|
|
||||||
|
The difference between commit and discard is very small. Discard just marks
|
||||||
|
a record as discarded, and such records are supposed to be ignored by consumer
|
||||||
|
code. Discard is useful for some advanced use-cases, such as ensuring
|
||||||
|
all-or-nothing multi-record submission, or emulating temporary
|
||||||
|
``malloc()``/``free()`` within single BPF program invocation.
|
||||||
|
|
||||||
|
Each reserved record is tracked by verifier through existing
|
||||||
|
reference-tracking logic, similar to socket ref-tracking. It is thus
|
||||||
|
impossible to reserve a record, but forget to submit (or discard) it.
|
||||||
|
|
||||||
|
``bpf_ringbuf_query()`` helper allows to query various properties of ring
|
||||||
|
buffer. Currently 4 are supported:
|
||||||
|
|
||||||
|
- ``BPF_RB_AVAIL_DATA`` returns amount of unconsumed data in ring buffer;
|
||||||
|
- ``BPF_RB_RING_SIZE`` returns the size of ring buffer;
|
||||||
|
- ``BPF_RB_CONS_POS``/``BPF_RB_PROD_POS`` returns current logical possition
|
||||||
|
of consumer/producer, respectively.
|
||||||
|
|
||||||
|
Returned values are momentarily snapshots of ring buffer state and could be
|
||||||
|
off by the time helper returns, so this should be used only for
|
||||||
|
debugging/reporting reasons or for implementing various heuristics, that take
|
||||||
|
into account highly-changeable nature of some of those characteristics.
|
||||||
|
|
||||||
|
One such heuristic might involve more fine-grained control over poll/epoll
|
||||||
|
notifications about new data availability in ring buffer. Together with
|
||||||
|
``BPF_RB_NO_WAKEUP``/``BPF_RB_FORCE_WAKEUP`` flags for output/commit/discard
|
||||||
|
helpers, it allows BPF program a high degree of control and, e.g., more
|
||||||
|
efficient batched notifications. Default self-balancing strategy, though,
|
||||||
|
should be adequate for most applications and will work reliable and efficiently
|
||||||
|
already.
|
||||||
|
|
||||||
|
Design and Implementation
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
This reserve/commit schema allows a natural way for multiple producers, either
|
||||||
|
on different CPUs or even on the same CPU/in the same BPF program, to reserve
|
||||||
|
independent records and work with them without blocking other producers. This
|
||||||
|
means that if BPF program was interruped by another BPF program sharing the
|
||||||
|
same ring buffer, they will both get a record reserved (provided there is
|
||||||
|
enough space left) and can work with it and submit it independently. This
|
||||||
|
applies to NMI context as well, except that due to using a spinlock during
|
||||||
|
reservation, in NMI context, ``bpf_ringbuf_reserve()`` might fail to get
|
||||||
|
a lock, in which case reservation will fail even if ring buffer is not full.
|
||||||
|
|
||||||
|
The ring buffer itself internally is implemented as a power-of-2 sized
|
||||||
|
circular buffer, with two logical and ever-increasing counters (which might
|
||||||
|
wrap around on 32-bit architectures, that's not a problem):
|
||||||
|
|
||||||
|
- consumer counter shows up to which logical position consumer consumed the
|
||||||
|
data;
|
||||||
|
- producer counter denotes amount of data reserved by all producers.
|
||||||
|
|
||||||
|
Each time a record is reserved, producer that "owns" the record will
|
||||||
|
successfully advance producer counter. At that point, data is still not yet
|
||||||
|
ready to be consumed, though. Each record has 8 byte header, which contains the
|
||||||
|
length of reserved record, as well as two extra bits: busy bit to denote that
|
||||||
|
record is still being worked on, and discard bit, which might be set at commit
|
||||||
|
time if record is discarded. In the latter case, consumer is supposed to skip
|
||||||
|
the record and move on to the next one. Record header also encodes record's
|
||||||
|
relative offset from the beginning of ring buffer data area (in pages). This
|
||||||
|
allows ``bpf_ringbuf_commit()``/``bpf_ringbuf_discard()`` to accept only the
|
||||||
|
pointer to the record itself, without requiring also the pointer to ring buffer
|
||||||
|
itself. Ring buffer memory location will be restored from record metadata
|
||||||
|
header. This significantly simplifies verifier, as well as improving API
|
||||||
|
usability.
|
||||||
|
|
||||||
|
Producer counter increments are serialized under spinlock, so there is
|
||||||
|
a strict ordering between reservations. Commits, on the other hand, are
|
||||||
|
completely lockless and independent. All records become available to consumer
|
||||||
|
in the order of reservations, but only after all previous records where
|
||||||
|
already committed. It is thus possible for slow producers to temporarily hold
|
||||||
|
off submitted records, that were reserved later.
|
||||||
|
|
||||||
|
Reservation/commit/consumer protocol is verified by litmus tests in
|
||||||
|
Documentation/litmus_tests/bpf-rb/_.
|
||||||
|
|
||||||
|
One interesting implementation bit, that significantly simplifies (and thus
|
||||||
|
speeds up as well) implementation of both producers and consumers is how data
|
||||||
|
area is mapped twice contiguously back-to-back in the virtual memory. This
|
||||||
|
allows to not take any special measures for samples that have to wrap around
|
||||||
|
at the end of the circular buffer data area, because the next page after the
|
||||||
|
last data page would be first data page again, and thus the sample will still
|
||||||
|
appear completely contiguous in virtual memory. See comment and a simple ASCII
|
||||||
|
diagram showing this visually in ``bpf_ringbuf_area_alloc()``.
|
||||||
|
|
||||||
|
Another feature that distinguishes BPF ringbuf from perf ring buffer is
|
||||||
|
a self-pacing notifications of new data being availability.
|
||||||
|
``bpf_ringbuf_commit()`` implementation will send a notification of new record
|
||||||
|
being available after commit only if consumer has already caught up right up to
|
||||||
|
the record being committed. If not, consumer still has to catch up and thus
|
||||||
|
will see new data anyways without needing an extra poll notification.
|
||||||
|
Benchmarks (see tools/testing/selftests/bpf/benchs/bench_ringbuf.c_) show that
|
||||||
|
this allows to achieve a very high throughput without having to resort to
|
||||||
|
tricks like "notify only every Nth sample", which are necessary with perf
|
||||||
|
buffer. For extreme cases, when BPF program wants more manual control of
|
||||||
|
notifications, commit/discard/output helpers accept ``BPF_RB_NO_WAKEUP`` and
|
||||||
|
``BPF_RB_FORCE_WAKEUP`` flags, which give full control over notifications of
|
||||||
|
data availability, but require extra caution and diligence in using this API.
|
@@ -301,7 +301,8 @@ Helpers
|
|||||||
|
|
||||||
.. kernel-doc:: tools/testing/selftests/kselftest_harness.h
|
.. kernel-doc:: tools/testing/selftests/kselftest_harness.h
|
||||||
:functions: TH_LOG TEST TEST_SIGNAL FIXTURE FIXTURE_DATA FIXTURE_SETUP
|
:functions: TH_LOG TEST TEST_SIGNAL FIXTURE FIXTURE_DATA FIXTURE_SETUP
|
||||||
FIXTURE_TEARDOWN TEST_F TEST_HARNESS_MAIN
|
FIXTURE_TEARDOWN TEST_F TEST_HARNESS_MAIN FIXTURE_VARIANT
|
||||||
|
FIXTURE_VARIANT_ADD
|
||||||
|
|
||||||
Operators
|
Operators
|
||||||
---------
|
---------
|
||||||
|
@@ -1,36 +0,0 @@
|
|||||||
Mediatek pericfg controller
|
|
||||||
===========================
|
|
||||||
|
|
||||||
The Mediatek pericfg controller provides various clocks and reset
|
|
||||||
outputs to the system.
|
|
||||||
|
|
||||||
Required Properties:
|
|
||||||
|
|
||||||
- compatible: Should be one of:
|
|
||||||
- "mediatek,mt2701-pericfg", "syscon"
|
|
||||||
- "mediatek,mt2712-pericfg", "syscon"
|
|
||||||
- "mediatek,mt7622-pericfg", "syscon"
|
|
||||||
- "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon"
|
|
||||||
- "mediatek,mt7629-pericfg", "syscon"
|
|
||||||
- "mediatek,mt8135-pericfg", "syscon"
|
|
||||||
- "mediatek,mt8173-pericfg", "syscon"
|
|
||||||
- "mediatek,mt8183-pericfg", "syscon"
|
|
||||||
- #clock-cells: Must be 1
|
|
||||||
- #reset-cells: Must be 1
|
|
||||||
|
|
||||||
The pericfg controller uses the common clk binding from
|
|
||||||
Documentation/devicetree/bindings/clock/clock-bindings.txt
|
|
||||||
The available clocks are defined in dt-bindings/clock/mt*-clk.h.
|
|
||||||
Also it uses the common reset controller binding from
|
|
||||||
Documentation/devicetree/bindings/reset/reset.txt.
|
|
||||||
The available reset outputs are defined in
|
|
||||||
dt-bindings/reset/mt*-resets.h
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
pericfg: power-controller@10003000 {
|
|
||||||
compatible = "mediatek,mt8173-pericfg", "syscon";
|
|
||||||
reg = <0 0x10003000 0 0x1000>;
|
|
||||||
#clock-cells = <1>;
|
|
||||||
#reset-cells = <1>;
|
|
||||||
};
|
|
@@ -0,0 +1,64 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: "http://devicetree.org/schemas/arm/mediatek/mediatek,pericfg.yaml#"
|
||||||
|
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||||
|
|
||||||
|
title: MediaTek Peripheral Configuration Controller
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
||||||
|
|
||||||
|
description:
|
||||||
|
The Mediatek pericfg controller provides various clocks and reset outputs
|
||||||
|
to the system.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
oneOf:
|
||||||
|
- items:
|
||||||
|
- enum:
|
||||||
|
- mediatek,mt2701-pericfg
|
||||||
|
- mediatek,mt2712-pericfg
|
||||||
|
- mediatek,mt7622-pericfg
|
||||||
|
- mediatek,mt7629-pericfg
|
||||||
|
- mediatek,mt8135-pericfg
|
||||||
|
- mediatek,mt8173-pericfg
|
||||||
|
- mediatek,mt8183-pericfg
|
||||||
|
- mediatek,mt8516-pericfg
|
||||||
|
- const: syscon
|
||||||
|
- items:
|
||||||
|
# Special case for mt7623 for backward compatibility
|
||||||
|
- const: mediatek,mt7623-pericfg
|
||||||
|
- const: mediatek,mt2701-pericfg
|
||||||
|
- const: syscon
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
'#clock-cells':
|
||||||
|
const: 1
|
||||||
|
|
||||||
|
'#reset-cells':
|
||||||
|
const: 1
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
pericfg@10003000 {
|
||||||
|
compatible = "mediatek,mt8173-pericfg", "syscon";
|
||||||
|
reg = <0x10003000 0x1000>;
|
||||||
|
#clock-cells = <1>;
|
||||||
|
#reset-cells = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
- |
|
||||||
|
pericfg@10003000 {
|
||||||
|
compatible = "mediatek,mt7623-pericfg", "mediatek,mt2701-pericfg", "syscon";
|
||||||
|
reg = <0x10003000 0x1000>;
|
||||||
|
#clock-cells = <1>;
|
||||||
|
#reset-cells = <1>;
|
||||||
|
};
|
@@ -40,18 +40,22 @@ allOf:
|
|||||||
then:
|
then:
|
||||||
properties:
|
properties:
|
||||||
clocks:
|
clocks:
|
||||||
|
minItems: 3
|
||||||
|
maxItems: 4
|
||||||
items:
|
items:
|
||||||
- description: GMAC main clock
|
- description: GMAC main clock
|
||||||
- description: First parent clock of the internal mux
|
- description: First parent clock of the internal mux
|
||||||
- description: Second parent clock of the internal mux
|
- description: Second parent clock of the internal mux
|
||||||
|
- description: The clock which drives the timing adjustment logic
|
||||||
|
|
||||||
clock-names:
|
clock-names:
|
||||||
minItems: 3
|
minItems: 3
|
||||||
maxItems: 3
|
maxItems: 4
|
||||||
items:
|
items:
|
||||||
- const: stmmaceth
|
- const: stmmaceth
|
||||||
- const: clkin0
|
- const: clkin0
|
||||||
- const: clkin1
|
- const: clkin1
|
||||||
|
- const: timing-adjustment
|
||||||
|
|
||||||
amlogic,tx-delay-ns:
|
amlogic,tx-delay-ns:
|
||||||
$ref: /schemas/types.yaml#definitions/uint32
|
$ref: /schemas/types.yaml#definitions/uint32
|
||||||
@@ -67,6 +71,19 @@ allOf:
|
|||||||
PHY and MAC are adding a delay).
|
PHY and MAC are adding a delay).
|
||||||
Any configuration is ignored when the phy-mode is set to "rmii".
|
Any configuration is ignored when the phy-mode is set to "rmii".
|
||||||
|
|
||||||
|
amlogic,rx-delay-ns:
|
||||||
|
enum:
|
||||||
|
- 0
|
||||||
|
- 2
|
||||||
|
default: 0
|
||||||
|
description:
|
||||||
|
The internal RGMII RX clock delay (provided by this IP block) in
|
||||||
|
nanoseconds. When phy-mode is set to "rgmii" then the RX delay
|
||||||
|
should be explicitly configured. When the phy-mode is set to
|
||||||
|
either "rgmii-id" or "rgmii-rxid" the RX clock delay is already
|
||||||
|
provided by the PHY. Any configuration is ignored when the
|
||||||
|
phy-mode is set to "rmii".
|
||||||
|
|
||||||
properties:
|
properties:
|
||||||
compatible:
|
compatible:
|
||||||
additionalItems: true
|
additionalItems: true
|
||||||
@@ -107,7 +124,7 @@ examples:
|
|||||||
reg = <0xc9410000 0x10000>, <0xc8834540 0x8>;
|
reg = <0xc9410000 0x10000>, <0xc8834540 0x8>;
|
||||||
interrupts = <8>;
|
interrupts = <8>;
|
||||||
interrupt-names = "macirq";
|
interrupt-names = "macirq";
|
||||||
clocks = <&clk_eth>, <&clkc_fclk_div2>, <&clk_mpll2>;
|
clocks = <&clk_eth>, <&clk_fclk_div2>, <&clk_mpll2>, <&clk_fclk_div2>;
|
||||||
clock-names = "stmmaceth", "clkin0", "clkin1";
|
clock-names = "stmmaceth", "clkin0", "clkin1", "timing-adjustment";
|
||||||
phy-mode = "rgmii";
|
phy-mode = "rgmii";
|
||||||
};
|
};
|
||||||
|
@@ -81,7 +81,8 @@ properties:
|
|||||||
$ref: /schemas/types.yaml#definitions/flag
|
$ref: /schemas/types.yaml#definitions/flag
|
||||||
description:
|
description:
|
||||||
If set, indicates the PHY device does not correctly release
|
If set, indicates the PHY device does not correctly release
|
||||||
the turn around line low at the end of a MDIO transaction.
|
the turn around line low at end of the control phase of the
|
||||||
|
MDIO transaction.
|
||||||
|
|
||||||
enet-phy-lane-swap:
|
enet-phy-lane-swap:
|
||||||
$ref: /schemas/types.yaml#definitions/flag
|
$ref: /schemas/types.yaml#definitions/flag
|
||||||
|
@@ -22,8 +22,11 @@ Optional properties:
|
|||||||
- fsl,err006687-workaround-present: If present indicates that the system has
|
- fsl,err006687-workaround-present: If present indicates that the system has
|
||||||
the hardware workaround for ERR006687 applied and does not need a software
|
the hardware workaround for ERR006687 applied and does not need a software
|
||||||
workaround.
|
workaround.
|
||||||
- gpr: phandle of SoC general purpose register mode. Required for wake on LAN
|
- fsl,stop-mode: register bits of stop mode control, the format is
|
||||||
on some SoCs
|
<&gpr req_gpr req_bit>.
|
||||||
|
gpr is the phandle to general purpose register node.
|
||||||
|
req_gpr is the gpr register offset for ENET stop request.
|
||||||
|
req_bit is the gpr bit offset for ENET stop request.
|
||||||
-interrupt-names: names of the interrupts listed in interrupts property in
|
-interrupt-names: names of the interrupts listed in interrupts property in
|
||||||
the same order. The defaults if not specified are
|
the same order. The defaults if not specified are
|
||||||
__Number of interrupts__ __Default__
|
__Number of interrupts__ __Default__
|
||||||
@@ -82,6 +85,7 @@ ethernet@83fec000 {
|
|||||||
phy-supply = <®_fec_supply>;
|
phy-supply = <®_fec_supply>;
|
||||||
phy-handle = <ðphy>;
|
phy-handle = <ðphy>;
|
||||||
mdio {
|
mdio {
|
||||||
|
clock-frequency = <5000000>;
|
||||||
ethphy: ethernet-phy@6 {
|
ethphy: ethernet-phy@6 {
|
||||||
compatible = "ethernet-phy-ieee802.3-c22";
|
compatible = "ethernet-phy-ieee802.3-c22";
|
||||||
reg = <6>;
|
reg = <6>;
|
||||||
|
56
Documentation/devicetree/bindings/net/imx-dwmac.txt
Normal file
56
Documentation/devicetree/bindings/net/imx-dwmac.txt
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
IMX8 glue layer controller, NXP imx8 families support Synopsys MAC 5.10a IP.
|
||||||
|
|
||||||
|
This file documents platform glue layer for IMX.
|
||||||
|
Please see stmmac.txt for the other unchanged properties.
|
||||||
|
|
||||||
|
The device node has following properties.
|
||||||
|
|
||||||
|
Required properties:
|
||||||
|
- compatible: Should be "nxp,imx8mp-dwmac-eqos" to select glue layer
|
||||||
|
and "snps,dwmac-5.10a" to select IP version.
|
||||||
|
- clocks: Must contain a phandle for each entry in clock-names.
|
||||||
|
- clock-names: Should be "stmmaceth" for the host clock.
|
||||||
|
Should be "pclk" for the MAC apb clock.
|
||||||
|
Should be "ptp_ref" for the MAC timer clock.
|
||||||
|
Should be "tx" for the MAC RGMII TX clock:
|
||||||
|
Should be "mem" for EQOS MEM clock.
|
||||||
|
- "mem" clock is required for imx8dxl platform.
|
||||||
|
- "mem" clock is not required for imx8mp platform.
|
||||||
|
- interrupt-names: Should contain a list of interrupt names corresponding to
|
||||||
|
the interrupts in the interrupts property, if available.
|
||||||
|
Should be "macirq" for the main MAC IRQ
|
||||||
|
Should be "eth_wake_irq" for the IT which wake up system
|
||||||
|
- intf_mode: Should be phandle/offset pair. The phandle to the syscon node which
|
||||||
|
encompases the GPR register, and the offset of the GPR register.
|
||||||
|
- required for imx8mp platform.
|
||||||
|
- is optional for imx8dxl platform.
|
||||||
|
|
||||||
|
Optional properties:
|
||||||
|
- intf_mode: is optional for imx8dxl platform.
|
||||||
|
- snps,rmii_refclk_ext: to select RMII reference clock from external.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
eqos: ethernet@30bf0000 {
|
||||||
|
compatible = "nxp,imx8mp-dwmac-eqos", "snps,dwmac-5.10a";
|
||||||
|
reg = <0x30bf0000 0x10000>;
|
||||||
|
interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>,
|
||||||
|
<GIC_SPI 135 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
interrupt-names = "eth_wake_irq", "macirq";
|
||||||
|
clocks = <&clk IMX8MP_CLK_ENET_QOS_ROOT>,
|
||||||
|
<&clk IMX8MP_CLK_QOS_ENET_ROOT>,
|
||||||
|
<&clk IMX8MP_CLK_ENET_QOS_TIMER>,
|
||||||
|
<&clk IMX8MP_CLK_ENET_QOS>;
|
||||||
|
clock-names = "stmmaceth", "pclk", "ptp_ref", "tx";
|
||||||
|
assigned-clocks = <&clk IMX8MP_CLK_ENET_AXI>,
|
||||||
|
<&clk IMX8MP_CLK_ENET_QOS_TIMER>,
|
||||||
|
<&clk IMX8MP_CLK_ENET_QOS>;
|
||||||
|
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_266M>,
|
||||||
|
<&clk IMX8MP_SYS_PLL2_100M>,
|
||||||
|
<&clk IMX8MP_SYS_PLL2_125M>;
|
||||||
|
assigned-clock-rates = <0>, <100000000>, <125000000>;
|
||||||
|
nvmem-cells = <ð_mac0>;
|
||||||
|
nvmem-cell-names = "mac-address";
|
||||||
|
nvmem_macaddr_swap;
|
||||||
|
intf_mode = <&gpr 0x4>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
@@ -31,13 +31,25 @@ properties:
|
|||||||
maxItems: 1
|
maxItems: 1
|
||||||
description:
|
description:
|
||||||
The phandle and specifier for the GPIO that controls the RESET
|
The phandle and specifier for the GPIO that controls the RESET
|
||||||
lines of all PHYs on that MDIO bus.
|
lines of all devices on that MDIO bus.
|
||||||
|
|
||||||
reset-delay-us:
|
reset-delay-us:
|
||||||
description:
|
description:
|
||||||
RESET pulse width in microseconds. It applies to all PHY devices
|
RESET pulse width in microseconds. It applies to all MDIO devices
|
||||||
and must therefore be appropriately determined based on all PHY
|
and must therefore be appropriately determined based on all devices
|
||||||
requirements (maximum value of all per-PHY RESET pulse widths).
|
requirements (maximum value of all per-device RESET pulse widths).
|
||||||
|
|
||||||
|
clock-frequency:
|
||||||
|
description:
|
||||||
|
Desired MDIO bus clock frequency in Hz. Values greater than IEEE 802.3
|
||||||
|
defined 2.5MHz should only be used when all devices on the bus support
|
||||||
|
the given clock speed.
|
||||||
|
|
||||||
|
suppress-preamble:
|
||||||
|
description:
|
||||||
|
The 32 bit preamble should be suppressed. In order for this to
|
||||||
|
work, all devices on the bus must support suppressed preamble.
|
||||||
|
type: boolean
|
||||||
|
|
||||||
patternProperties:
|
patternProperties:
|
||||||
"^ethernet-phy@[0-9a-f]+$":
|
"^ethernet-phy@[0-9a-f]+$":
|
||||||
@@ -48,7 +60,35 @@ patternProperties:
|
|||||||
minimum: 0
|
minimum: 0
|
||||||
maximum: 31
|
maximum: 31
|
||||||
description:
|
description:
|
||||||
The ID number for the PHY.
|
The ID number for the device.
|
||||||
|
|
||||||
|
broken-turn-around:
|
||||||
|
$ref: /schemas/types.yaml#definitions/flag
|
||||||
|
description:
|
||||||
|
If set, indicates the MDIO device does not correctly release
|
||||||
|
the turn around line low at end of the control phase of the
|
||||||
|
MDIO transaction.
|
||||||
|
|
||||||
|
resets:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
reset-names:
|
||||||
|
const: phy
|
||||||
|
|
||||||
|
reset-gpios:
|
||||||
|
maxItems: 1
|
||||||
|
description:
|
||||||
|
The GPIO phandle and specifier for the MDIO reset signal.
|
||||||
|
|
||||||
|
reset-assert-us:
|
||||||
|
description:
|
||||||
|
Delay after the reset was asserted in microseconds. If this
|
||||||
|
property is missing the delay will be skipped.
|
||||||
|
|
||||||
|
reset-deassert-us:
|
||||||
|
description:
|
||||||
|
Delay after the reset was deasserted in microseconds. If
|
||||||
|
this property is missing the delay will be skipped.
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- reg
|
- reg
|
||||||
|
@@ -0,0 +1,89 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/net/mediatek,star-emac.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: MediaTek STAR Ethernet MAC Controller
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Bartosz Golaszewski <bgolaszewski@baylibre.com>
|
||||||
|
|
||||||
|
description:
|
||||||
|
This Ethernet MAC is used on the MT8* family of SoCs from MediaTek.
|
||||||
|
It's compliant with 802.3 standards and supports half- and full-duplex
|
||||||
|
modes with flow-control as well as CRC offloading and VLAN tags.
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: "ethernet-controller.yaml#"
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
enum:
|
||||||
|
- mediatek,mt8516-eth
|
||||||
|
- mediatek,mt8518-eth
|
||||||
|
- mediatek,mt8175-eth
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
minItems: 3
|
||||||
|
maxItems: 3
|
||||||
|
|
||||||
|
clock-names:
|
||||||
|
additionalItems: false
|
||||||
|
items:
|
||||||
|
- const: core
|
||||||
|
- const: reg
|
||||||
|
- const: trans
|
||||||
|
|
||||||
|
mediatek,pericfg:
|
||||||
|
$ref: /schemas/types.yaml#definitions/phandle
|
||||||
|
description:
|
||||||
|
Phandle to the device containing the PERICFG register range. This is used
|
||||||
|
to control the MII mode.
|
||||||
|
|
||||||
|
mdio:
|
||||||
|
type: object
|
||||||
|
description:
|
||||||
|
Creates and registers an MDIO bus.
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- interrupts
|
||||||
|
- clocks
|
||||||
|
- clock-names
|
||||||
|
- mediatek,pericfg
|
||||||
|
- phy-handle
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||||
|
#include <dt-bindings/clock/mt8516-clk.h>
|
||||||
|
|
||||||
|
ethernet: ethernet@11180000 {
|
||||||
|
compatible = "mediatek,mt8516-eth";
|
||||||
|
reg = <0x11180000 0x1000>;
|
||||||
|
mediatek,pericfg = <&pericfg>;
|
||||||
|
interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_LOW>;
|
||||||
|
clocks = <&topckgen CLK_TOP_RG_ETH>,
|
||||||
|
<&topckgen CLK_TOP_66M_ETH>,
|
||||||
|
<&topckgen CLK_TOP_133M_ETH>;
|
||||||
|
clock-names = "core", "reg", "trans";
|
||||||
|
phy-handle = <ð_phy>;
|
||||||
|
phy-mode = "rmii";
|
||||||
|
|
||||||
|
mdio {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
eth_phy: ethernet-phy@0 {
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
61
Documentation/devicetree/bindings/net/nxp,tja11xx.yaml
Normal file
61
Documentation/devicetree/bindings/net/nxp,tja11xx.yaml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/net/nxp,tja11xx.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: NXP TJA11xx PHY
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Andrew Lunn <andrew@lunn.ch>
|
||||||
|
- Florian Fainelli <f.fainelli@gmail.com>
|
||||||
|
- Heiner Kallweit <hkallweit1@gmail.com>
|
||||||
|
|
||||||
|
description:
|
||||||
|
Bindings for NXP TJA11xx automotive PHYs
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: ethernet-phy.yaml#
|
||||||
|
|
||||||
|
patternProperties:
|
||||||
|
"^ethernet-phy@[0-9a-f]+$":
|
||||||
|
type: object
|
||||||
|
description: |
|
||||||
|
Some packages have multiple PHYs. Secondary PHY should be defines as
|
||||||
|
subnode of the first (parent) PHY.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
reg:
|
||||||
|
minimum: 0
|
||||||
|
maximum: 31
|
||||||
|
description:
|
||||||
|
The ID number for the child PHY. Should be +1 of parent PHY.
|
||||||
|
|
||||||
|
required:
|
||||||
|
- reg
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
mdio {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
tja1101_phy0: ethernet-phy@4 {
|
||||||
|
reg = <0x4>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
- |
|
||||||
|
mdio {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
tja1102_phy0: ethernet-phy@4 {
|
||||||
|
reg = <0x4>;
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
tja1102_phy1: ethernet-phy@5 {
|
||||||
|
reg = <0x5>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@@ -1,45 +0,0 @@
|
|||||||
Required properties:
|
|
||||||
- compatible: Should be "qca,<soc>-eth". Currently support compatibles are:
|
|
||||||
qca,ar7100-eth - Atheros AR7100
|
|
||||||
qca,ar7240-eth - Atheros AR7240
|
|
||||||
qca,ar7241-eth - Atheros AR7241
|
|
||||||
qca,ar7242-eth - Atheros AR7242
|
|
||||||
qca,ar9130-eth - Atheros AR9130
|
|
||||||
qca,ar9330-eth - Atheros AR9330
|
|
||||||
qca,ar9340-eth - Atheros AR9340
|
|
||||||
qca,qca9530-eth - Qualcomm Atheros QCA9530
|
|
||||||
qca,qca9550-eth - Qualcomm Atheros QCA9550
|
|
||||||
qca,qca9560-eth - Qualcomm Atheros QCA9560
|
|
||||||
|
|
||||||
- reg : Address and length of the register set for the device
|
|
||||||
- interrupts : Should contain eth interrupt
|
|
||||||
- phy-mode : See ethernet.txt file in the same directory
|
|
||||||
- clocks: the clock used by the core
|
|
||||||
- clock-names: the names of the clock listed in the clocks property. These are
|
|
||||||
"eth" and "mdio".
|
|
||||||
- resets: Should contain phandles to the reset signals
|
|
||||||
- reset-names: Should contain the names of reset signal listed in the resets
|
|
||||||
property. These are "mac" and "mdio"
|
|
||||||
|
|
||||||
Optional properties:
|
|
||||||
- phy-handle : phandle to the PHY device connected to this device.
|
|
||||||
- fixed-link : Assume a fixed link. See fixed-link.txt in the same directory.
|
|
||||||
Use instead of phy-handle.
|
|
||||||
|
|
||||||
Optional subnodes:
|
|
||||||
- mdio : specifies the mdio bus, used as a container for phy nodes
|
|
||||||
according to phy.txt in the same directory
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
ethernet@1a000000 {
|
|
||||||
compatible = "qca,ar9330-eth";
|
|
||||||
reg = <0x1a000000 0x200>;
|
|
||||||
interrupts = <5>;
|
|
||||||
resets = <&rst 13>, <&rst 23>;
|
|
||||||
reset-names = "mac", "mdio";
|
|
||||||
clocks = <&pll ATH79_CLK_AHB>, <&pll ATH79_CLK_MDIO>;
|
|
||||||
clock-names = "eth", "mdio";
|
|
||||||
|
|
||||||
phy-mode = "gmii";
|
|
||||||
};
|
|
216
Documentation/devicetree/bindings/net/qca,ar71xx.yaml
Normal file
216
Documentation/devicetree/bindings/net/qca,ar71xx.yaml
Normal file
@@ -0,0 +1,216 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/net/qca,ar71xx.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: QCA AR71XX MAC
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: ethernet-controller.yaml#
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Oleksij Rempel <o.rempel@pengutronix.de>
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
oneOf:
|
||||||
|
- items:
|
||||||
|
- enum:
|
||||||
|
- qca,ar7100-eth # Atheros AR7100
|
||||||
|
- qca,ar7240-eth # Atheros AR7240
|
||||||
|
- qca,ar7241-eth # Atheros AR7241
|
||||||
|
- qca,ar7242-eth # Atheros AR7242
|
||||||
|
- qca,ar9130-eth # Atheros AR9130
|
||||||
|
- qca,ar9330-eth # Atheros AR9330
|
||||||
|
- qca,ar9340-eth # Atheros AR9340
|
||||||
|
- qca,qca9530-eth # Qualcomm Atheros QCA9530
|
||||||
|
- qca,qca9550-eth # Qualcomm Atheros QCA9550
|
||||||
|
- qca,qca9560-eth # Qualcomm Atheros QCA9560
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
'#address-cells':
|
||||||
|
description: number of address cells for the MDIO bus
|
||||||
|
const: 1
|
||||||
|
|
||||||
|
'#size-cells':
|
||||||
|
description: number of size cells on the MDIO bus
|
||||||
|
const: 0
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
items:
|
||||||
|
- description: MAC main clock
|
||||||
|
- description: MDIO clock
|
||||||
|
|
||||||
|
clock-names:
|
||||||
|
items:
|
||||||
|
- const: eth
|
||||||
|
- const: mdio
|
||||||
|
|
||||||
|
resets:
|
||||||
|
items:
|
||||||
|
- description: MAC reset
|
||||||
|
- description: MDIO reset
|
||||||
|
|
||||||
|
reset-names:
|
||||||
|
items:
|
||||||
|
- const: mac
|
||||||
|
- const: mdio
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- interrupts
|
||||||
|
- phy-mode
|
||||||
|
- clocks
|
||||||
|
- clock-names
|
||||||
|
- resets
|
||||||
|
- reset-names
|
||||||
|
|
||||||
|
examples:
|
||||||
|
# Lager board
|
||||||
|
- |
|
||||||
|
eth0: ethernet@19000000 {
|
||||||
|
compatible = "qca,ar9330-eth";
|
||||||
|
reg = <0x19000000 0x200>;
|
||||||
|
interrupts = <4>;
|
||||||
|
resets = <&rst 9>, <&rst 22>;
|
||||||
|
reset-names = "mac", "mdio";
|
||||||
|
clocks = <&pll 1>, <&pll 2>;
|
||||||
|
clock-names = "eth", "mdio";
|
||||||
|
qca,ethcfg = <ðcfg>;
|
||||||
|
phy-mode = "mii";
|
||||||
|
phy-handle = <&phy_port4>;
|
||||||
|
};
|
||||||
|
|
||||||
|
eth1: ethernet@1a000000 {
|
||||||
|
compatible = "qca,ar9330-eth";
|
||||||
|
reg = <0x1a000000 0x200>;
|
||||||
|
interrupts = <5>;
|
||||||
|
resets = <&rst 13>, <&rst 23>;
|
||||||
|
reset-names = "mac", "mdio";
|
||||||
|
clocks = <&pll 1>, <&pll 2>;
|
||||||
|
clock-names = "eth", "mdio";
|
||||||
|
|
||||||
|
phy-mode = "gmii";
|
||||||
|
|
||||||
|
status = "disabled";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
};
|
||||||
|
|
||||||
|
mdio {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
switch10: switch@10 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
compatible = "qca,ar9331-switch";
|
||||||
|
reg = <0x10>;
|
||||||
|
resets = <&rst 8>;
|
||||||
|
reset-names = "switch";
|
||||||
|
|
||||||
|
interrupt-parent = <&miscintc>;
|
||||||
|
interrupts = <12>;
|
||||||
|
|
||||||
|
interrupt-controller;
|
||||||
|
#interrupt-cells = <1>;
|
||||||
|
|
||||||
|
ports {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
switch_port0: port@0 {
|
||||||
|
reg = <0x0>;
|
||||||
|
label = "cpu";
|
||||||
|
ethernet = <ð1>;
|
||||||
|
|
||||||
|
phy-mode = "gmii";
|
||||||
|
|
||||||
|
fixed-link {
|
||||||
|
speed = <1000>;
|
||||||
|
full-duplex;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
switch_port1: port@1 {
|
||||||
|
reg = <0x1>;
|
||||||
|
phy-handle = <&phy_port0>;
|
||||||
|
phy-mode = "internal";
|
||||||
|
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
switch_port2: port@2 {
|
||||||
|
reg = <0x2>;
|
||||||
|
phy-handle = <&phy_port1>;
|
||||||
|
phy-mode = "internal";
|
||||||
|
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
switch_port3: port@3 {
|
||||||
|
reg = <0x3>;
|
||||||
|
phy-handle = <&phy_port2>;
|
||||||
|
phy-mode = "internal";
|
||||||
|
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
switch_port4: port@4 {
|
||||||
|
reg = <0x4>;
|
||||||
|
phy-handle = <&phy_port3>;
|
||||||
|
phy-mode = "internal";
|
||||||
|
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mdio {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
interrupt-parent = <&switch10>;
|
||||||
|
|
||||||
|
phy_port0: phy@0 {
|
||||||
|
reg = <0x0>;
|
||||||
|
interrupts = <0>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
phy_port1: phy@1 {
|
||||||
|
reg = <0x1>;
|
||||||
|
interrupts = <0>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
phy_port2: phy@2 {
|
||||||
|
reg = <0x2>;
|
||||||
|
interrupts = <0>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
phy_port3: phy@3 {
|
||||||
|
reg = <0x3>;
|
||||||
|
interrupts = <0>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
|
||||||
|
phy_port4: phy@4 {
|
||||||
|
reg = <0x4>;
|
||||||
|
interrupts = <0>;
|
||||||
|
status = "disabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@@ -20,7 +20,10 @@ description:
|
|||||||
The GSI is an integral part of the IPA, but it is logically isolated
|
The GSI is an integral part of the IPA, but it is logically isolated
|
||||||
and has a distinct interrupt and a separately-defined address space.
|
and has a distinct interrupt and a separately-defined address space.
|
||||||
|
|
||||||
See also soc/qcom/qcom,smp2p.txt and interconnect/interconnect.txt.
|
See also soc/qcom/qcom,smp2p.txt and interconnect/interconnect.txt. See
|
||||||
|
iommu/iommu.txt and iommu/arm,smmu.yaml for more information about SMMU
|
||||||
|
bindings.
|
||||||
|
|
||||||
|
|
||||||
- |
|
- |
|
||||||
-------- ---------
|
-------- ---------
|
||||||
@@ -54,6 +57,9 @@ properties:
|
|||||||
- const: ipa-shared
|
- const: ipa-shared
|
||||||
- const: gsi
|
- const: gsi
|
||||||
|
|
||||||
|
iommus:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
clocks:
|
clocks:
|
||||||
maxItems: 1
|
maxItems: 1
|
||||||
|
|
||||||
@@ -126,6 +132,7 @@ properties:
|
|||||||
|
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
|
- iommus
|
||||||
- reg
|
- reg
|
||||||
- clocks
|
- clocks
|
||||||
- interrupts
|
- interrupts
|
||||||
@@ -164,6 +171,7 @@ examples:
|
|||||||
modem-init;
|
modem-init;
|
||||||
modem-remoteproc = <&mss_pil>;
|
modem-remoteproc = <&mss_pil>;
|
||||||
|
|
||||||
|
iommus = <&apps_smmu 0x720 0x3>;
|
||||||
reg = <0 0x1e40000 0 0x7000>,
|
reg = <0 0x1e40000 0 0x7000>,
|
||||||
<0 0x1e47000 0 0x2000>,
|
<0 0x1e47000 0 0x2000>,
|
||||||
<0 0x1e04000 0 0x2c000>;
|
<0 0x1e04000 0 0x2c000>;
|
||||||
|
61
Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
Normal file
61
Documentation/devicetree/bindings/net/qcom,ipq4019-mdio.yaml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/net/qcom,ipq4019-mdio.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Qualcomm IPQ40xx MDIO Controller Device Tree Bindings
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Robert Marko <robert.marko@sartura.hr>
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: "mdio.yaml#"
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
const: qcom,ipq4019-mdio
|
||||||
|
|
||||||
|
"#address-cells":
|
||||||
|
const: 1
|
||||||
|
|
||||||
|
"#size-cells":
|
||||||
|
const: 0
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- "#address-cells"
|
||||||
|
- "#size-cells"
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
mdio@90000 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
compatible = "qcom,ipq4019-mdio";
|
||||||
|
reg = <0x90000 0x64>;
|
||||||
|
|
||||||
|
ethphy0: ethernet-phy@0 {
|
||||||
|
reg = <0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
ethphy1: ethernet-phy@1 {
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
|
|
||||||
|
ethphy2: ethernet-phy@2 {
|
||||||
|
reg = <2>;
|
||||||
|
};
|
||||||
|
|
||||||
|
ethphy3: ethernet-phy@3 {
|
||||||
|
reg = <3>;
|
||||||
|
};
|
||||||
|
|
||||||
|
ethphy4: ethernet-phy@4 {
|
||||||
|
reg = <4>;
|
||||||
|
};
|
||||||
|
};
|
@@ -10,9 +10,11 @@ device the slave device is attached to.
|
|||||||
Required properties:
|
Required properties:
|
||||||
- compatible: should contain one of the following:
|
- compatible: should contain one of the following:
|
||||||
* "qcom,qca6174-bt"
|
* "qcom,qca6174-bt"
|
||||||
|
* "qcom,qca9377-bt"
|
||||||
* "qcom,wcn3990-bt"
|
* "qcom,wcn3990-bt"
|
||||||
* "qcom,wcn3991-bt"
|
* "qcom,wcn3991-bt"
|
||||||
* "qcom,wcn3998-bt"
|
* "qcom,wcn3998-bt"
|
||||||
|
* "qcom,qca6390-bt"
|
||||||
|
|
||||||
Optional properties for compatible string qcom,qca6174-bt:
|
Optional properties for compatible string qcom,qca6174-bt:
|
||||||
|
|
||||||
@@ -20,6 +22,10 @@ Optional properties for compatible string qcom,qca6174-bt:
|
|||||||
- clocks: clock provided to the controller (SUSCLK_32KHZ)
|
- clocks: clock provided to the controller (SUSCLK_32KHZ)
|
||||||
- firmware-name: specify the name of nvm firmware to load
|
- firmware-name: specify the name of nvm firmware to load
|
||||||
|
|
||||||
|
Optional properties for compatible string qcom,qca9377-bt:
|
||||||
|
|
||||||
|
- max-speed: see Documentation/devicetree/bindings/serial/serial.yaml
|
||||||
|
|
||||||
Required properties for compatible string qcom,wcn399x-bt:
|
Required properties for compatible string qcom,wcn399x-bt:
|
||||||
|
|
||||||
- vddio-supply: VDD_IO supply regulator handle.
|
- vddio-supply: VDD_IO supply regulator handle.
|
||||||
|
54
Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
Normal file
54
Documentation/devicetree/bindings/net/realtek-bluetooth.yaml
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/net/realtek-bluetooth.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: RTL8723BS/RTL8723CS/RTL8822CS Bluetooth Device Tree Bindings
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Vasily Khoruzhick <anarsoul@gmail.com>
|
||||||
|
- Alistair Francis <alistair@alistair23.me>
|
||||||
|
|
||||||
|
description:
|
||||||
|
RTL8723CS/RTL8723CS/RTL8822CS is WiFi + BT chip. WiFi part is connected over
|
||||||
|
SDIO, while BT is connected over serial. It speaks H5 protocol with few
|
||||||
|
extra commands to upload firmware and change module speed.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
oneOf:
|
||||||
|
- const: "realtek,rtl8723bs-bt"
|
||||||
|
- const: "realtek,rtl8723cs-bt"
|
||||||
|
- const: "realtek,rtl8822cs-bt"
|
||||||
|
|
||||||
|
device-wake-gpios:
|
||||||
|
maxItems: 1
|
||||||
|
description: GPIO specifier, used to wakeup the BT module
|
||||||
|
|
||||||
|
enable-gpios:
|
||||||
|
maxItems: 1
|
||||||
|
description: GPIO specifier, used to enable the BT module
|
||||||
|
|
||||||
|
host-wake-gpios:
|
||||||
|
maxItems: 1
|
||||||
|
description: GPIO specifier, used to wakeup the host processor
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/gpio/gpio.h>
|
||||||
|
|
||||||
|
uart1 {
|
||||||
|
pinctrl-names = "default";
|
||||||
|
pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
|
||||||
|
uart-has-rtscts = <1>;
|
||||||
|
|
||||||
|
bluetooth {
|
||||||
|
compatible = "realtek,rtl8723bs-bt";
|
||||||
|
device-wake-gpios = <&r_pio 0 5 GPIO_ACTIVE_HIGH>; /* PL5 */
|
||||||
|
host-wakeup-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
|
||||||
|
};
|
||||||
|
};
|
@@ -1,64 +0,0 @@
|
|||||||
* Socionext AVE ethernet controller
|
|
||||||
|
|
||||||
This describes the devicetree bindings for AVE ethernet controller
|
|
||||||
implemented on Socionext UniPhier SoCs.
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- compatible: Should be
|
|
||||||
- "socionext,uniphier-pro4-ave4" : for Pro4 SoC
|
|
||||||
- "socionext,uniphier-pxs2-ave4" : for PXs2 SoC
|
|
||||||
- "socionext,uniphier-ld11-ave4" : for LD11 SoC
|
|
||||||
- "socionext,uniphier-ld20-ave4" : for LD20 SoC
|
|
||||||
- "socionext,uniphier-pxs3-ave4" : for PXs3 SoC
|
|
||||||
- reg: Address where registers are mapped and size of region.
|
|
||||||
- interrupts: Should contain the MAC interrupt.
|
|
||||||
- phy-mode: See ethernet.txt in the same directory. Allow to choose
|
|
||||||
"rgmii", "rmii", "mii", or "internal" according to the PHY.
|
|
||||||
The acceptable mode is SoC-dependent.
|
|
||||||
- phy-handle: Should point to the external phy device.
|
|
||||||
See ethernet.txt file in the same directory.
|
|
||||||
- clocks: A phandle to the clock for the MAC.
|
|
||||||
For Pro4 SoC, that is "socionext,uniphier-pro4-ave4",
|
|
||||||
another MAC clock, GIO bus clock and PHY clock are also required.
|
|
||||||
- clock-names: Should contain
|
|
||||||
- "ether", "ether-gb", "gio", "ether-phy" for Pro4 SoC
|
|
||||||
- "ether" for others
|
|
||||||
- resets: A phandle to the reset control for the MAC. For Pro4 SoC,
|
|
||||||
GIO bus reset is also required.
|
|
||||||
- reset-names: Should contain
|
|
||||||
- "ether", "gio" for Pro4 SoC
|
|
||||||
- "ether" for others
|
|
||||||
- socionext,syscon-phy-mode: A phandle to syscon with one argument
|
|
||||||
that configures phy mode. The argument is the ID of MAC instance.
|
|
||||||
|
|
||||||
The MAC address will be determined using the optional properties
|
|
||||||
defined in ethernet.txt.
|
|
||||||
|
|
||||||
Required subnode:
|
|
||||||
- mdio: A container for child nodes representing phy nodes.
|
|
||||||
See phy.txt in the same directory.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
ether: ethernet@65000000 {
|
|
||||||
compatible = "socionext,uniphier-ld20-ave4";
|
|
||||||
reg = <0x65000000 0x8500>;
|
|
||||||
interrupts = <0 66 4>;
|
|
||||||
phy-mode = "rgmii";
|
|
||||||
phy-handle = <ðphy>;
|
|
||||||
clock-names = "ether";
|
|
||||||
clocks = <&sys_clk 6>;
|
|
||||||
reset-names = "ether";
|
|
||||||
resets = <&sys_rst 6>;
|
|
||||||
socionext,syscon-phy-mode = <&soc_glue 0>;
|
|
||||||
local-mac-address = [00 00 00 00 00 00];
|
|
||||||
|
|
||||||
mdio {
|
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
|
|
||||||
ethphy: ethphy@1 {
|
|
||||||
reg = <1>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
@@ -0,0 +1,111 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/net/socionext,uniphier-ave4.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: Socionext AVE ethernet controller
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
|
||||||
|
|
||||||
|
description: |
|
||||||
|
This describes the devicetree bindings for AVE ethernet controller
|
||||||
|
implemented on Socionext UniPhier SoCs.
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: ethernet-controller.yaml#
|
||||||
|
|
||||||
|
properties:
|
||||||
|
compatible:
|
||||||
|
enum:
|
||||||
|
- socionext,uniphier-pro4-ave4
|
||||||
|
- socionext,uniphier-pxs2-ave4
|
||||||
|
- socionext,uniphier-ld11-ave4
|
||||||
|
- socionext,uniphier-ld20-ave4
|
||||||
|
- socionext,uniphier-pxs3-ave4
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
phy-mode: true
|
||||||
|
|
||||||
|
phy-handle: true
|
||||||
|
|
||||||
|
mac-address: true
|
||||||
|
|
||||||
|
local-mac-address: true
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
minItems: 1
|
||||||
|
maxItems: 4
|
||||||
|
|
||||||
|
clock-names:
|
||||||
|
oneOf:
|
||||||
|
- items: # for Pro4
|
||||||
|
- const: gio
|
||||||
|
- const: ether
|
||||||
|
- const: ether-gb
|
||||||
|
- const: ether-phy
|
||||||
|
- const: ether # for others
|
||||||
|
|
||||||
|
resets:
|
||||||
|
minItems: 1
|
||||||
|
maxItems: 2
|
||||||
|
|
||||||
|
reset-names:
|
||||||
|
oneOf:
|
||||||
|
- items: # for Pro4
|
||||||
|
- const: gio
|
||||||
|
- const: ether
|
||||||
|
- const: ether # for others
|
||||||
|
|
||||||
|
socionext,syscon-phy-mode:
|
||||||
|
$ref: /schemas/types.yaml#definitions/phandle-array
|
||||||
|
description:
|
||||||
|
A phandle to syscon with one argument that configures phy mode.
|
||||||
|
The argument is the ID of MAC instance.
|
||||||
|
|
||||||
|
mdio:
|
||||||
|
$ref: mdio.yaml#
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- interrupts
|
||||||
|
- phy-mode
|
||||||
|
- phy-handle
|
||||||
|
- clocks
|
||||||
|
- clock-names
|
||||||
|
- resets
|
||||||
|
- reset-names
|
||||||
|
- mdio
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
ether: ethernet@65000000 {
|
||||||
|
compatible = "socionext,uniphier-ld20-ave4";
|
||||||
|
reg = <0x65000000 0x8500>;
|
||||||
|
interrupts = <0 66 4>;
|
||||||
|
phy-mode = "rgmii";
|
||||||
|
phy-handle = <ðphy>;
|
||||||
|
clock-names = "ether";
|
||||||
|
clocks = <&sys_clk 6>;
|
||||||
|
reset-names = "ether";
|
||||||
|
resets = <&sys_rst 6>;
|
||||||
|
socionext,syscon-phy-mode = <&soc_glue 0>;
|
||||||
|
|
||||||
|
mdio {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
|
||||||
|
ethphy: ethernet-phy@1 {
|
||||||
|
reg = <1>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
@@ -1,68 +0,0 @@
|
|||||||
* Texas Instruments - dp83867 Giga bit ethernet phy
|
|
||||||
|
|
||||||
Required properties:
|
|
||||||
- reg - The ID number for the phy, usually a small integer
|
|
||||||
- ti,rx-internal-delay - RGMII Receive Clock Delay - see dt-bindings/net/ti-dp83867.h
|
|
||||||
for applicable values. Required only if interface type is
|
|
||||||
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_RXID
|
|
||||||
- ti,tx-internal-delay - RGMII Transmit Clock Delay - see dt-bindings/net/ti-dp83867.h
|
|
||||||
for applicable values. Required only if interface type is
|
|
||||||
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_TXID
|
|
||||||
|
|
||||||
Note: If the interface type is PHY_INTERFACE_MODE_RGMII the TX/RX clock delays
|
|
||||||
will be left at their default values, as set by the PHY's pin strapping.
|
|
||||||
The default strapping will use a delay of 2.00 ns. Thus
|
|
||||||
PHY_INTERFACE_MODE_RGMII, by default, does not behave as RGMII with no
|
|
||||||
internal delay, but as PHY_INTERFACE_MODE_RGMII_ID. The device tree
|
|
||||||
should use "rgmii-id" if internal delays are desired as this may be
|
|
||||||
changed in future to cause "rgmii" mode to disable delays.
|
|
||||||
|
|
||||||
Optional property:
|
|
||||||
- ti,min-output-impedance - MAC Interface Impedance control to set
|
|
||||||
the programmable output impedance to
|
|
||||||
minimum value (35 ohms).
|
|
||||||
- ti,max-output-impedance - MAC Interface Impedance control to set
|
|
||||||
the programmable output impedance to
|
|
||||||
maximum value (70 ohms).
|
|
||||||
- ti,dp83867-rxctrl-strap-quirk - This denotes the fact that the
|
|
||||||
board has RX_DV/RX_CTRL pin strapped in
|
|
||||||
mode 1 or 2. To ensure PHY operation,
|
|
||||||
there are specific actions that
|
|
||||||
software needs to take when this pin is
|
|
||||||
strapped in these modes. See data manual
|
|
||||||
for details.
|
|
||||||
- ti,clk-output-sel - Muxing option for CLK_OUT pin. See dt-bindings/net/ti-dp83867.h
|
|
||||||
for applicable values. The CLK_OUT pin can also
|
|
||||||
be disabled by this property. When omitted, the
|
|
||||||
PHY's default will be left as is.
|
|
||||||
- ti,sgmii-ref-clock-output-enable - This denotes which
|
|
||||||
SGMII configuration is used (4 or 6-wire modes).
|
|
||||||
Some MACs work with differential SGMII clock.
|
|
||||||
See data manual for details.
|
|
||||||
|
|
||||||
- ti,fifo-depth - Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h
|
|
||||||
for applicable values (deprecated)
|
|
||||||
|
|
||||||
-tx-fifo-depth - As defined in the ethernet-controller.yaml. Values for
|
|
||||||
the depth can be found in dt-bindings/net/ti-dp83867.h
|
|
||||||
-rx-fifo-depth - As defined in the ethernet-controller.yaml. Values for
|
|
||||||
the depth can be found in dt-bindings/net/ti-dp83867.h
|
|
||||||
|
|
||||||
Note: ti,min-output-impedance and ti,max-output-impedance are mutually
|
|
||||||
exclusive. When both properties are present ti,max-output-impedance
|
|
||||||
takes precedence.
|
|
||||||
|
|
||||||
Default child nodes are standard Ethernet PHY device
|
|
||||||
nodes as described in Documentation/devicetree/bindings/net/phy.txt
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
ethernet-phy@0 {
|
|
||||||
reg = <0>;
|
|
||||||
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
|
|
||||||
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
|
|
||||||
tx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
|
|
||||||
};
|
|
||||||
|
|
||||||
Datasheet can be found:
|
|
||||||
http://www.ti.com/product/DP83867IR/datasheet
|
|
127
Documentation/devicetree/bindings/net/ti,dp83867.yaml
Normal file
127
Documentation/devicetree/bindings/net/ti,dp83867.yaml
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
|
||||||
|
# Copyright (C) 2019 Texas Instruments Incorporated
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: "http://devicetree.org/schemas/net/ti,dp83867.yaml#"
|
||||||
|
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
|
||||||
|
|
||||||
|
title: TI DP83867 ethernet PHY
|
||||||
|
|
||||||
|
allOf:
|
||||||
|
- $ref: "ethernet-controller.yaml#"
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Dan Murphy <dmurphy@ti.com>
|
||||||
|
|
||||||
|
description: |
|
||||||
|
The DP83867 device is a robust, low power, fully featured Physical Layer
|
||||||
|
transceiver with integrated PMD sublayers to support 10BASE-Te, 100BASE-TX
|
||||||
|
and 1000BASE-T Ethernet protocols.
|
||||||
|
|
||||||
|
The DP83867 is designed for easy implementation of 10/100/1000 Mbps Ethernet
|
||||||
|
LANs. It interfaces directly to twisted pair media via an external
|
||||||
|
transformer. This device interfaces directly to the MAC layer through the
|
||||||
|
IEEE 802.3 Standard Media Independent Interface (MII), the IEEE 802.3 Gigabit
|
||||||
|
Media Independent Interface (GMII) or Reduced GMII (RGMII).
|
||||||
|
|
||||||
|
Specifications about the charger can be found at:
|
||||||
|
https://www.ti.com/lit/gpn/dp83867ir
|
||||||
|
|
||||||
|
properties:
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
ti,min-output-impedance:
|
||||||
|
type: boolean
|
||||||
|
description: |
|
||||||
|
MAC Interface Impedance control to set the programmable output impedance
|
||||||
|
to a minimum value (35 ohms).
|
||||||
|
|
||||||
|
ti,max-output-impedance:
|
||||||
|
type: boolean
|
||||||
|
description: |
|
||||||
|
MAC Interface Impedance control to set the programmable output impedance
|
||||||
|
to a maximum value (70 ohms).
|
||||||
|
Note: ti,min-output-impedance and ti,max-output-impedance are mutually
|
||||||
|
exclusive. When both properties are present ti,max-output-impedance
|
||||||
|
takes precedence.
|
||||||
|
|
||||||
|
tx-fifo-depth:
|
||||||
|
$ref: /schemas/types.yaml#definitions/uint32
|
||||||
|
description: |
|
||||||
|
Transmitt FIFO depth see dt-bindings/net/ti-dp83867.h for values
|
||||||
|
|
||||||
|
rx-fifo-depth:
|
||||||
|
$ref: /schemas/types.yaml#definitions/uint32
|
||||||
|
description: |
|
||||||
|
Receive FIFO depth see dt-bindings/net/ti-dp83867.h for values
|
||||||
|
|
||||||
|
ti,clk-output-sel:
|
||||||
|
$ref: /schemas/types.yaml#definitions/uint32
|
||||||
|
description: |
|
||||||
|
Muxing option for CLK_OUT pin. See dt-bindings/net/ti-dp83867.h
|
||||||
|
for applicable values. The CLK_OUT pin can also be disabled by this
|
||||||
|
property. When omitted, the PHY's default will be left as is.
|
||||||
|
|
||||||
|
ti,rx-internal-delay:
|
||||||
|
$ref: /schemas/types.yaml#definitions/uint32
|
||||||
|
description: |
|
||||||
|
RGMII Receive Clock Delay - see dt-bindings/net/ti-dp83867.h
|
||||||
|
for applicable values. Required only if interface type is
|
||||||
|
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_RXID.
|
||||||
|
|
||||||
|
ti,tx-internal-delay:
|
||||||
|
$ref: /schemas/types.yaml#definitions/uint32
|
||||||
|
description: |
|
||||||
|
RGMII Transmit Clock Delay - see dt-bindings/net/ti-dp83867.h
|
||||||
|
for applicable values. Required only if interface type is
|
||||||
|
PHY_INTERFACE_MODE_RGMII_ID or PHY_INTERFACE_MODE_RGMII_TXID.
|
||||||
|
|
||||||
|
Note: If the interface type is PHY_INTERFACE_MODE_RGMII the TX/RX clock
|
||||||
|
delays will be left at their default values, as set by the PHY's pin
|
||||||
|
strapping. The default strapping will use a delay of 2.00 ns. Thus
|
||||||
|
PHY_INTERFACE_MODE_RGMII, by default, does not behave as RGMII with no
|
||||||
|
internal delay, but as PHY_INTERFACE_MODE_RGMII_ID. The device tree
|
||||||
|
should use "rgmii-id" if internal delays are desired as this may be
|
||||||
|
changed in future to cause "rgmii" mode to disable delays.
|
||||||
|
|
||||||
|
ti,dp83867-rxctrl-strap-quirk:
|
||||||
|
type: boolean
|
||||||
|
description: |
|
||||||
|
This denotes the fact that the board has RX_DV/RX_CTRL pin strapped in
|
||||||
|
mode 1 or 2. To ensure PHY operation, there are specific actions that
|
||||||
|
software needs to take when this pin is strapped in these modes.
|
||||||
|
See data manual for details.
|
||||||
|
|
||||||
|
ti,sgmii-ref-clock-output-enable:
|
||||||
|
type: boolean
|
||||||
|
description: |
|
||||||
|
This denotes which SGMII configuration is used (4 or 6-wire modes).
|
||||||
|
Some MACs work with differential SGMII clock. See data manual for details.
|
||||||
|
|
||||||
|
ti,fifo-depth:
|
||||||
|
deprecated: true
|
||||||
|
$ref: /schemas/types.yaml#definitions/uint32
|
||||||
|
description: |
|
||||||
|
Transmitt FIFO depth- see dt-bindings/net/ti-dp83867.h for applicable
|
||||||
|
values.
|
||||||
|
|
||||||
|
required:
|
||||||
|
- reg
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/net/ti-dp83867.h>
|
||||||
|
mdio0 {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <0>;
|
||||||
|
ethphy0: ethernet-phy@0 {
|
||||||
|
reg = <0>;
|
||||||
|
tx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
|
||||||
|
rx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
|
||||||
|
ti,max-output-impedance;
|
||||||
|
ti,clk-output-sel = <DP83867_CLK_O_SEL_CHN_A_RCLK>;
|
||||||
|
ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_25_NS>;
|
||||||
|
ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_75_NS>;
|
||||||
|
};
|
||||||
|
};
|
@@ -1,4 +1,4 @@
|
|||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: (GPL-2.0+ OR BSD-2-Clause)
|
||||||
# Copyright (C) 2019 Texas Instruments Incorporated
|
# Copyright (C) 2019 Texas Instruments Incorporated
|
||||||
%YAML 1.2
|
%YAML 1.2
|
||||||
---
|
---
|
||||||
|
@@ -144,6 +144,13 @@ patternProperties:
|
|||||||
description:
|
description:
|
||||||
CPSW MDIO bus.
|
CPSW MDIO bus.
|
||||||
|
|
||||||
|
"^cpts@[0-9a-f]+":
|
||||||
|
type: object
|
||||||
|
allOf:
|
||||||
|
- $ref: "ti,k3-am654-cpts.yaml#"
|
||||||
|
description:
|
||||||
|
CPSW Common Platform Time Sync (CPTS) module.
|
||||||
|
|
||||||
required:
|
required:
|
||||||
- compatible
|
- compatible
|
||||||
- reg
|
- reg
|
||||||
@@ -164,6 +171,8 @@ examples:
|
|||||||
#include <dt-bindings/pinctrl/k3.h>
|
#include <dt-bindings/pinctrl/k3.h>
|
||||||
#include <dt-bindings/soc/ti,sci_pm_domain.h>
|
#include <dt-bindings/soc/ti,sci_pm_domain.h>
|
||||||
#include <dt-bindings/net/ti-dp83867.h>
|
#include <dt-bindings/net/ti-dp83867.h>
|
||||||
|
#include <dt-bindings/interrupt-controller/irq.h>
|
||||||
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||||
|
|
||||||
mcu_cpsw: ethernet@46000000 {
|
mcu_cpsw: ethernet@46000000 {
|
||||||
compatible = "ti,am654-cpsw-nuss";
|
compatible = "ti,am654-cpsw-nuss";
|
||||||
@@ -222,4 +231,15 @@ examples:
|
|||||||
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
|
ti,fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
cpts@3d000 {
|
||||||
|
compatible = "ti,am65-cpts";
|
||||||
|
reg = <0x0 0x3d000 0x0 0x400>;
|
||||||
|
clocks = <&k3_clks 18 2>;
|
||||||
|
clock-names = "cpts";
|
||||||
|
interrupts-extended = <&gic500 GIC_SPI 858 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
interrupt-names = "cpts";
|
||||||
|
ti,cpts-ext-ts-inputs = <4>;
|
||||||
|
ti,cpts-periodic-outputs = <2>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
145
Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
Normal file
145
Documentation/devicetree/bindings/net/ti,k3-am654-cpts.yaml
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
$id: http://devicetree.org/schemas/net/ti,k3-am654-cpts.yaml#
|
||||||
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
||||||
|
|
||||||
|
title: The TI AM654x/J721E Common Platform Time Sync (CPTS) module Device Tree Bindings
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- Grygorii Strashko <grygorii.strashko@ti.com>
|
||||||
|
- Sekhar Nori <nsekhar@ti.com>
|
||||||
|
|
||||||
|
description: |+
|
||||||
|
The TI AM654x/J721E CPTS module is used to facilitate host control of time
|
||||||
|
sync operations.
|
||||||
|
Main features of CPTS module are
|
||||||
|
- selection of multiple external clock sources
|
||||||
|
- Software control of time sync events via interrupt or polling
|
||||||
|
- 64-bit timestamp mode in ns with PPM and nudge adjustment.
|
||||||
|
- hardware timestamp push inputs (HWx_TS_PUSH)
|
||||||
|
- timestamp counter compare output (TS_COMP)
|
||||||
|
- timestamp counter bit output (TS_SYNC)
|
||||||
|
- periodic Generator function outputs (TS_GENFx)
|
||||||
|
- Ethernet Enhanced Scheduled Traffic Operations (CPTS_ESTFn) (TSN)
|
||||||
|
- external hardware timestamp push inputs (HWx_TS_PUSH) timestamping
|
||||||
|
|
||||||
|
Depending on integration it enables compliance with the IEEE 1588-2008
|
||||||
|
standard for a precision clock synchronization protocol, Ethernet Enhanced
|
||||||
|
Scheduled Traffic Operations (CPTS_ESTFn) and PCIe Subsystem Precision Time
|
||||||
|
Measurement (PTM).
|
||||||
|
|
||||||
|
TI AM654x/J721E SoCs has several similar CPTS modules integrated into the
|
||||||
|
different parts of the system which could be synchronized with each other
|
||||||
|
- Main CPTS
|
||||||
|
- MCU CPSW CPTS with IEEE 1588-2008 support
|
||||||
|
- PCIe subsystem CPTS for PTM support
|
||||||
|
|
||||||
|
Depending on CPTS module integration and when CPTS is integral part of
|
||||||
|
another module (MCU CPSW for example) "compatible" and "reg" can
|
||||||
|
be omitted - parent module is fully responsible for CPTS enabling and
|
||||||
|
configuration.
|
||||||
|
|
||||||
|
properties:
|
||||||
|
$nodename:
|
||||||
|
pattern: "^cpts@[0-9a-f]+$"
|
||||||
|
|
||||||
|
compatible:
|
||||||
|
oneOf:
|
||||||
|
- const: ti,am65-cpts
|
||||||
|
- const: ti,j721e-cpts
|
||||||
|
|
||||||
|
reg:
|
||||||
|
maxItems: 1
|
||||||
|
description:
|
||||||
|
The physical base address and size of CPTS IO range
|
||||||
|
|
||||||
|
reg-names:
|
||||||
|
items:
|
||||||
|
- const: cpts
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
description: CPTS reference clock
|
||||||
|
|
||||||
|
clock-names:
|
||||||
|
items:
|
||||||
|
- const: cpts
|
||||||
|
|
||||||
|
interrupts:
|
||||||
|
items:
|
||||||
|
- description: CPTS events interrupt
|
||||||
|
|
||||||
|
interrupt-names:
|
||||||
|
items:
|
||||||
|
- const: cpts
|
||||||
|
|
||||||
|
ti,cpts-ext-ts-inputs:
|
||||||
|
allOf:
|
||||||
|
- $ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
maximum: 8
|
||||||
|
description:
|
||||||
|
Number of hardware timestamp push inputs (HWx_TS_PUSH)
|
||||||
|
|
||||||
|
ti,cpts-periodic-outputs:
|
||||||
|
allOf:
|
||||||
|
- $ref: /schemas/types.yaml#/definitions/uint32
|
||||||
|
maximum: 8
|
||||||
|
description:
|
||||||
|
Number of timestamp Generator function outputs (TS_GENFx)
|
||||||
|
|
||||||
|
refclk-mux:
|
||||||
|
type: object
|
||||||
|
description: CPTS reference clock multiplexer clock
|
||||||
|
properties:
|
||||||
|
'#clock-cells':
|
||||||
|
const: 0
|
||||||
|
|
||||||
|
clocks:
|
||||||
|
maxItems: 8
|
||||||
|
|
||||||
|
assigned-clocks:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
assigned-clocks-parents:
|
||||||
|
maxItems: 1
|
||||||
|
|
||||||
|
required:
|
||||||
|
- clocks
|
||||||
|
|
||||||
|
required:
|
||||||
|
- compatible
|
||||||
|
- reg
|
||||||
|
- clocks
|
||||||
|
- clock-names
|
||||||
|
- interrupts
|
||||||
|
- interrupt-names
|
||||||
|
|
||||||
|
additionalProperties: false
|
||||||
|
|
||||||
|
examples:
|
||||||
|
- |
|
||||||
|
#include <dt-bindings/interrupt-controller/irq.h>
|
||||||
|
#include <dt-bindings/interrupt-controller/arm-gic.h>
|
||||||
|
|
||||||
|
cpts@310d0000 {
|
||||||
|
compatible = "ti,am65-cpts";
|
||||||
|
reg = <0x0 0x310d0000 0x0 0x400>;
|
||||||
|
reg-names = "cpts";
|
||||||
|
clocks = <&main_cpts_mux>;
|
||||||
|
clock-names = "cpts";
|
||||||
|
interrupts-extended = <&k3_irq 163 0 IRQ_TYPE_LEVEL_HIGH>;
|
||||||
|
interrupt-names = "cpts";
|
||||||
|
ti,cpts-periodic-outputs = <6>;
|
||||||
|
ti,cpts-ext-ts-inputs = <8>;
|
||||||
|
|
||||||
|
main_cpts_mux: refclk-mux {
|
||||||
|
#clock-cells = <0>;
|
||||||
|
clocks = <&k3_clks 118 5>, <&k3_clks 118 11>,
|
||||||
|
<&k3_clks 157 91>, <&k3_clks 157 77>,
|
||||||
|
<&k3_clks 157 102>, <&k3_clks 157 80>,
|
||||||
|
<&k3_clks 120 3>, <&k3_clks 121 3>;
|
||||||
|
assigned-clocks = <&main_cpts_mux>;
|
||||||
|
assigned-clock-parents = <&k3_clks 118 11>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
@@ -25,6 +25,9 @@ Optional properties:
|
|||||||
- mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data
|
- mediatek,mtd-eeprom: Specify a MTD partition + offset containing EEPROM data
|
||||||
- big-endian: if the radio eeprom partition is written in big-endian, specify
|
- big-endian: if the radio eeprom partition is written in big-endian, specify
|
||||||
this property
|
this property
|
||||||
|
- mediatek,eeprom-merge-otp: Merge EEPROM data with OTP data. Can be used on
|
||||||
|
boards where the flash calibration data is generic and specific calibration
|
||||||
|
data should be pulled from the OTP ROM
|
||||||
|
|
||||||
The MAC address can as well be set with corresponding optional properties
|
The MAC address can as well be set with corresponding optional properties
|
||||||
defined in net/ethernet.txt.
|
defined in net/ethernet.txt.
|
||||||
|
@@ -96,6 +96,17 @@ Optional properties:
|
|||||||
- qcom,coexist-gpio-pin : gpio pin number information to support coex
|
- qcom,coexist-gpio-pin : gpio pin number information to support coex
|
||||||
which will be used by wifi firmware.
|
which will be used by wifi firmware.
|
||||||
|
|
||||||
|
* Subnodes
|
||||||
|
The ath10k wifi node can contain one optional firmware subnode.
|
||||||
|
Firmware subnode is needed when the platform does not have TustZone.
|
||||||
|
The firmware subnode must have:
|
||||||
|
|
||||||
|
- iommus:
|
||||||
|
Usage: required
|
||||||
|
Value type: <prop-encoded-array>
|
||||||
|
Definition: A list of phandle and IOMMU specifier pairs.
|
||||||
|
|
||||||
|
|
||||||
Example (to supply PCI based wifi block details):
|
Example (to supply PCI based wifi block details):
|
||||||
|
|
||||||
In this example, the node is defined as child node of the PCI controller.
|
In this example, the node is defined as child node of the PCI controller.
|
||||||
@@ -196,4 +207,7 @@ wifi@18000000 {
|
|||||||
memory-region = <&wifi_msa_mem>;
|
memory-region = <&wifi_msa_mem>;
|
||||||
iommus = <&apps_smmu 0x0040 0x1>;
|
iommus = <&apps_smmu 0x0040 0x1>;
|
||||||
qcom,msa-fixed-perm;
|
qcom,msa-fixed-perm;
|
||||||
|
wifi-firmware {
|
||||||
|
iommus = <&apps_iommu 0xc22 0x1>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
@@ -372,6 +372,11 @@ MUX
|
|||||||
devm_mux_chip_register()
|
devm_mux_chip_register()
|
||||||
devm_mux_control_get()
|
devm_mux_control_get()
|
||||||
|
|
||||||
|
NET
|
||||||
|
devm_alloc_etherdev()
|
||||||
|
devm_alloc_etherdev_mqs()
|
||||||
|
devm_register_netdev()
|
||||||
|
|
||||||
PER-CPU MEM
|
PER-CPU MEM
|
||||||
devm_alloc_percpu()
|
devm_alloc_percpu()
|
||||||
devm_free_percpu()
|
devm_free_percpu()
|
||||||
|
@@ -70,7 +70,7 @@ list of volume location server IP addresses::
|
|||||||
The first module is the AF_RXRPC network protocol driver. This provides the
|
The first module is the AF_RXRPC network protocol driver. This provides the
|
||||||
RxRPC remote operation protocol and may also be accessed from userspace. See:
|
RxRPC remote operation protocol and may also be accessed from userspace. See:
|
||||||
|
|
||||||
Documentation/networking/rxrpc.txt
|
Documentation/networking/rxrpc.rst
|
||||||
|
|
||||||
The second module is the kerberos RxRPC security driver, and the third module
|
The second module is the kerberos RxRPC security driver, and the third module
|
||||||
is the actual filesystem driver for the AFS filesystem.
|
is the actual filesystem driver for the AFS filesystem.
|
||||||
|
45
Documentation/hwmon/bcm54140.rst
Normal file
45
Documentation/hwmon/bcm54140.rst
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
Broadcom BCM54140 Quad SGMII/QSGMII PHY
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
Supported chips:
|
||||||
|
|
||||||
|
* Broadcom BCM54140
|
||||||
|
|
||||||
|
Datasheet: not public
|
||||||
|
|
||||||
|
Author: Michael Walle <michael@walle.cc>
|
||||||
|
|
||||||
|
Description
|
||||||
|
-----------
|
||||||
|
|
||||||
|
The Broadcom BCM54140 is a Quad SGMII/QSGMII PHY which supports monitoring
|
||||||
|
its die temperature as well as two analog voltages.
|
||||||
|
|
||||||
|
The AVDDL is a 1.0V analogue voltage, the AVDDH is a 3.3V analogue voltage.
|
||||||
|
Both voltages and the temperature are measured in a round-robin fashion.
|
||||||
|
|
||||||
|
Sysfs entries
|
||||||
|
-------------
|
||||||
|
|
||||||
|
The following attributes are supported.
|
||||||
|
|
||||||
|
======================= ========================================================
|
||||||
|
in0_label "AVDDL"
|
||||||
|
in0_input Measured AVDDL voltage.
|
||||||
|
in0_min Minimum AVDDL voltage.
|
||||||
|
in0_max Maximum AVDDL voltage.
|
||||||
|
in0_alarm AVDDL voltage alarm.
|
||||||
|
|
||||||
|
in1_label "AVDDH"
|
||||||
|
in1_input Measured AVDDH voltage.
|
||||||
|
in1_min Minimum AVDDH voltage.
|
||||||
|
in1_max Maximum AVDDH voltage.
|
||||||
|
in1_alarm AVDDH voltage alarm.
|
||||||
|
|
||||||
|
temp1_input Die temperature.
|
||||||
|
temp1_min Minimum die temperature.
|
||||||
|
temp1_max Maximum die temperature.
|
||||||
|
temp1_alarm Die temperature alarm.
|
||||||
|
======================= ========================================================
|
@@ -43,6 +43,7 @@ Hardware Monitoring Kernel Drivers
|
|||||||
asb100
|
asb100
|
||||||
asc7621
|
asc7621
|
||||||
aspeed-pwm-tacho
|
aspeed-pwm-tacho
|
||||||
|
bcm54140
|
||||||
bel-pfe
|
bel-pfe
|
||||||
bt1-pvt
|
bt1-pvt
|
||||||
coretemp
|
coretemp
|
||||||
|
@@ -1,18 +1,27 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
==============
|
||||||
|
6pack Protocol
|
||||||
|
==============
|
||||||
|
|
||||||
This is the 6pack-mini-HOWTO, written by
|
This is the 6pack-mini-HOWTO, written by
|
||||||
|
|
||||||
Andreas Könsgen DG3KQ
|
Andreas Könsgen DG3KQ
|
||||||
Internet: ajk@comnets.uni-bremen.de
|
|
||||||
AMPR-net: dg3kq@db0pra.ampr.org
|
:Internet: ajk@comnets.uni-bremen.de
|
||||||
AX.25: dg3kq@db0ach.#nrw.deu.eu
|
:AMPR-net: dg3kq@db0pra.ampr.org
|
||||||
|
:AX.25: dg3kq@db0ach.#nrw.deu.eu
|
||||||
|
|
||||||
Last update: April 7, 1998
|
Last update: April 7, 1998
|
||||||
|
|
||||||
1. What is 6pack, and what are the advantages to KISS?
|
1. What is 6pack, and what are the advantages to KISS?
|
||||||
|
======================================================
|
||||||
|
|
||||||
6pack is a transmission protocol for data exchange between the PC and
|
6pack is a transmission protocol for data exchange between the PC and
|
||||||
the TNC over a serial line. It can be used as an alternative to KISS.
|
the TNC over a serial line. It can be used as an alternative to KISS.
|
||||||
|
|
||||||
6pack has two major advantages:
|
6pack has two major advantages:
|
||||||
|
|
||||||
- The PC is given full control over the radio
|
- The PC is given full control over the radio
|
||||||
channel. Special control data is exchanged between the PC and the TNC so
|
channel. Special control data is exchanged between the PC and the TNC so
|
||||||
that the PC knows at any time if the TNC is receiving data, if a TNC
|
that the PC knows at any time if the TNC is receiving data, if a TNC
|
||||||
@@ -36,6 +45,7 @@ More details about 6pack are described in the file 6pack.ps that is located
|
|||||||
in the doc directory of the AX.25 utilities package.
|
in the doc directory of the AX.25 utilities package.
|
||||||
|
|
||||||
2. Who has developed the 6pack protocol?
|
2. Who has developed the 6pack protocol?
|
||||||
|
========================================
|
||||||
|
|
||||||
The 6pack protocol has been developed by Ekki Plicht DF4OR, Henning Rech
|
The 6pack protocol has been developed by Ekki Plicht DF4OR, Henning Rech
|
||||||
DF9IC and Gunter Jost DK7WJ. A driver for 6pack, written by Gunter Jost and
|
DF9IC and Gunter Jost DK7WJ. A driver for 6pack, written by Gunter Jost and
|
||||||
@@ -44,12 +54,14 @@ They have also written a firmware for TNCs to perform the 6pack
|
|||||||
protocol (see section 4 below).
|
protocol (see section 4 below).
|
||||||
|
|
||||||
3. Where can I get the latest version of 6pack for LinuX?
|
3. Where can I get the latest version of 6pack for LinuX?
|
||||||
|
=========================================================
|
||||||
|
|
||||||
At the moment, the 6pack stuff can obtained via anonymous ftp from
|
At the moment, the 6pack stuff can obtained via anonymous ftp from
|
||||||
db0bm.automation.fh-aachen.de. In the directory /incoming/dg3kq,
|
db0bm.automation.fh-aachen.de. In the directory /incoming/dg3kq,
|
||||||
there is a file named 6pack.tgz.
|
there is a file named 6pack.tgz.
|
||||||
|
|
||||||
4. Preparing the TNC for 6pack operation
|
4. Preparing the TNC for 6pack operation
|
||||||
|
========================================
|
||||||
|
|
||||||
To be able to use 6pack, a special firmware for the TNC is needed. The EPROM
|
To be able to use 6pack, a special firmware for the TNC is needed. The EPROM
|
||||||
of a newly bought TNC does not contain 6pack, so you will have to
|
of a newly bought TNC does not contain 6pack, so you will have to
|
||||||
@@ -75,12 +87,14 @@ and the status LED are lit for about a second if the firmware initialises
|
|||||||
the TNC correctly.
|
the TNC correctly.
|
||||||
|
|
||||||
5. Building and installing the 6pack driver
|
5. Building and installing the 6pack driver
|
||||||
|
===========================================
|
||||||
|
|
||||||
The driver has been tested with kernel version 2.1.90. Use with older
|
The driver has been tested with kernel version 2.1.90. Use with older
|
||||||
kernels may lead to a compilation error because the interface to a kernel
|
kernels may lead to a compilation error because the interface to a kernel
|
||||||
function has been changed in the 2.1.8x kernels.
|
function has been changed in the 2.1.8x kernels.
|
||||||
|
|
||||||
How to turn on 6pack support:
|
How to turn on 6pack support:
|
||||||
|
=============================
|
||||||
|
|
||||||
- In the linux kernel configuration program, select the code maturity level
|
- In the linux kernel configuration program, select the code maturity level
|
||||||
options menu and turn on the prompting for development drivers.
|
options menu and turn on the prompting for development drivers.
|
||||||
@@ -94,13 +108,13 @@ To use the driver, the kissattach program delivered with the AX.25 utilities
|
|||||||
has to be modified.
|
has to be modified.
|
||||||
|
|
||||||
- Do a cd to the directory that holds the kissattach sources. Edit the
|
- Do a cd to the directory that holds the kissattach sources. Edit the
|
||||||
kissattach.c file. At the top, insert the following lines:
|
kissattach.c file. At the top, insert the following lines::
|
||||||
|
|
||||||
#ifndef N_6PACK
|
#ifndef N_6PACK
|
||||||
#define N_6PACK (N_AX25+1)
|
#define N_6PACK (N_AX25+1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Then find the line
|
Then find the line:
|
||||||
|
|
||||||
int disc = N_AX25;
|
int disc = N_AX25;
|
||||||
|
|
||||||
@@ -109,6 +123,7 @@ has to be modified.
|
|||||||
- Recompile kissattach. Rename it to spattach to avoid confusions.
|
- Recompile kissattach. Rename it to spattach to avoid confusions.
|
||||||
|
|
||||||
Installing the driver:
|
Installing the driver:
|
||||||
|
----------------------
|
||||||
|
|
||||||
- Do an insmod 6pack. Look at your /var/log/messages file to check if the
|
- Do an insmod 6pack. Look at your /var/log/messages file to check if the
|
||||||
module has printed its initialization message.
|
module has printed its initialization message.
|
||||||
@@ -138,6 +153,7 @@ from the PC to the TNC over the serial line, the status LED if data is
|
|||||||
sent to the PC.
|
sent to the PC.
|
||||||
|
|
||||||
6. Known problems
|
6. Known problems
|
||||||
|
=================
|
||||||
|
|
||||||
When testing the driver with 2.0.3x kernels and
|
When testing the driver with 2.0.3x kernels and
|
||||||
operating with data rates on the radio channel of 9600 Baud or higher,
|
operating with data rates on the radio channel of 9600 Baud or higher,
|
@@ -1,6 +1,12 @@
|
|||||||
Altera Triple-Speed Ethernet MAC driver
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
Copyright (C) 2008-2014 Altera Corporation
|
.. include:: <isonum.txt>
|
||||||
|
|
||||||
|
=======================================
|
||||||
|
Altera Triple-Speed Ethernet MAC driver
|
||||||
|
=======================================
|
||||||
|
|
||||||
|
Copyright |copy| 2008-2014 Altera Corporation
|
||||||
|
|
||||||
This is the driver for the Altera Triple-Speed Ethernet (TSE) controllers
|
This is the driver for the Altera Triple-Speed Ethernet (TSE) controllers
|
||||||
using the SGDMA and MSGDMA soft DMA IP components. The driver uses the
|
using the SGDMA and MSGDMA soft DMA IP components. The driver uses the
|
||||||
@@ -46,23 +52,33 @@ Jumbo frames are not supported at this time.
|
|||||||
The driver limits PHY operations to 10/100Mbps, and has not yet been fully
|
The driver limits PHY operations to 10/100Mbps, and has not yet been fully
|
||||||
tested for 1Gbps. This support will be added in a future maintenance update.
|
tested for 1Gbps. This support will be added in a future maintenance update.
|
||||||
|
|
||||||
1) Kernel Configuration
|
1. Kernel Configuration
|
||||||
|
=======================
|
||||||
|
|
||||||
The kernel configuration option is ALTERA_TSE:
|
The kernel configuration option is ALTERA_TSE:
|
||||||
|
|
||||||
Device Drivers ---> Network device support ---> Ethernet driver support --->
|
Device Drivers ---> Network device support ---> Ethernet driver support --->
|
||||||
Altera Triple-Speed Ethernet MAC support (ALTERA_TSE)
|
Altera Triple-Speed Ethernet MAC support (ALTERA_TSE)
|
||||||
|
|
||||||
2) Driver parameters list:
|
2. Driver parameters list
|
||||||
debug: message level (0: no output, 16: all);
|
=========================
|
||||||
dma_rx_num: Number of descriptors in the RX list (default is 64);
|
|
||||||
dma_tx_num: Number of descriptors in the TX list (default is 64).
|
- debug: message level (0: no output, 16: all);
|
||||||
|
- dma_rx_num: Number of descriptors in the RX list (default is 64);
|
||||||
|
- dma_tx_num: Number of descriptors in the TX list (default is 64).
|
||||||
|
|
||||||
|
3. Command line options
|
||||||
|
=======================
|
||||||
|
|
||||||
|
Driver parameters can be also passed in command line by using::
|
||||||
|
|
||||||
3) Command line options
|
|
||||||
Driver parameters can be also passed in command line by using:
|
|
||||||
altera_tse=dma_rx_num:128,dma_tx_num:512
|
altera_tse=dma_rx_num:128,dma_tx_num:512
|
||||||
|
|
||||||
4) Driver information and notes
|
4. Driver information and notes
|
||||||
|
===============================
|
||||||
|
|
||||||
4.1) Transmit process
|
4.1. Transmit process
|
||||||
|
---------------------
|
||||||
When the driver's transmit routine is called by the kernel, it sets up a
|
When the driver's transmit routine is called by the kernel, it sets up a
|
||||||
transmit descriptor by calling the underlying DMA transmit routine (SGDMA or
|
transmit descriptor by calling the underlying DMA transmit routine (SGDMA or
|
||||||
MSGDMA), and initiates a transmit operation. Once the transmit is complete, an
|
MSGDMA), and initiates a transmit operation. Once the transmit is complete, an
|
||||||
@@ -70,7 +86,8 @@ interrupt is driven by the transmit DMA logic. The driver handles the transmit
|
|||||||
completion in the context of the interrupt handling chain by recycling
|
completion in the context of the interrupt handling chain by recycling
|
||||||
resource required to send and track the requested transmit operation.
|
resource required to send and track the requested transmit operation.
|
||||||
|
|
||||||
4.2) Receive process
|
4.2. Receive process
|
||||||
|
--------------------
|
||||||
The driver will post receive buffers to the receive DMA logic during driver
|
The driver will post receive buffers to the receive DMA logic during driver
|
||||||
initialization. Receive buffers may or may not be queued depending upon the
|
initialization. Receive buffers may or may not be queued depending upon the
|
||||||
underlying DMA logic (MSGDMA is able queue receive buffers, SGDMA is not able
|
underlying DMA logic (MSGDMA is able queue receive buffers, SGDMA is not able
|
||||||
@@ -79,34 +96,39 @@ received, the DMA logic generates an interrupt. The driver handles a receive
|
|||||||
interrupt by obtaining the DMA receive logic status, reaping receive
|
interrupt by obtaining the DMA receive logic status, reaping receive
|
||||||
completions until no more receive completions are available.
|
completions until no more receive completions are available.
|
||||||
|
|
||||||
4.3) Interrupt Mitigation
|
4.3. Interrupt Mitigation
|
||||||
|
-------------------------
|
||||||
The driver is able to mitigate the number of its DMA interrupts
|
The driver is able to mitigate the number of its DMA interrupts
|
||||||
using NAPI for receive operations. Interrupt mitigation is not yet supported
|
using NAPI for receive operations. Interrupt mitigation is not yet supported
|
||||||
for transmit operations, but will be added in a future maintenance release.
|
for transmit operations, but will be added in a future maintenance release.
|
||||||
|
|
||||||
4.4) Ethtool support
|
4.4) Ethtool support
|
||||||
|
--------------------
|
||||||
Ethtool is supported. Driver statistics and internal errors can be taken using:
|
Ethtool is supported. Driver statistics and internal errors can be taken using:
|
||||||
ethtool -S ethX command. It is possible to dump registers etc.
|
ethtool -S ethX command. It is possible to dump registers etc.
|
||||||
|
|
||||||
4.5) PHY Support
|
4.5) PHY Support
|
||||||
|
----------------
|
||||||
The driver is compatible with PAL to work with PHY and GPHY devices.
|
The driver is compatible with PAL to work with PHY and GPHY devices.
|
||||||
|
|
||||||
4.7) List of source files:
|
4.7) List of source files:
|
||||||
o Kconfig
|
--------------------------
|
||||||
o Makefile
|
- Kconfig
|
||||||
o altera_tse_main.c: main network device driver
|
- Makefile
|
||||||
o altera_tse_ethtool.c: ethtool support
|
- altera_tse_main.c: main network device driver
|
||||||
o altera_tse.h: private driver structure and common definitions
|
- altera_tse_ethtool.c: ethtool support
|
||||||
o altera_msgdma.h: MSGDMA implementation function definitions
|
- altera_tse.h: private driver structure and common definitions
|
||||||
o altera_sgdma.h: SGDMA implementation function definitions
|
- altera_msgdma.h: MSGDMA implementation function definitions
|
||||||
o altera_msgdma.c: MSGDMA implementation
|
- altera_sgdma.h: SGDMA implementation function definitions
|
||||||
o altera_sgdma.c: SGDMA implementation
|
- altera_msgdma.c: MSGDMA implementation
|
||||||
o altera_sgdmahw.h: SGDMA register and descriptor definitions
|
- altera_sgdma.c: SGDMA implementation
|
||||||
o altera_msgdmahw.h: MSGDMA register and descriptor definitions
|
- altera_sgdmahw.h: SGDMA register and descriptor definitions
|
||||||
o altera_utils.c: Driver utility functions
|
- altera_msgdmahw.h: MSGDMA register and descriptor definitions
|
||||||
o altera_utils.h: Driver utility function definitions
|
- altera_utils.c: Driver utility functions
|
||||||
|
- altera_utils.h: Driver utility function definitions
|
||||||
|
|
||||||
5) Debug Information
|
5. Debug Information
|
||||||
|
====================
|
||||||
|
|
||||||
The driver exports debug information such as internal statistics,
|
The driver exports debug information such as internal statistics,
|
||||||
debug information, MAC and DMA registers etc.
|
debug information, MAC and DMA registers etc.
|
||||||
@@ -118,17 +140,18 @@ or sees the MAC registers: e.g. using: ethtool -d ethX
|
|||||||
The developer can also use the "debug" module parameter to get
|
The developer can also use the "debug" module parameter to get
|
||||||
further debug information.
|
further debug information.
|
||||||
|
|
||||||
6) Statistics Support
|
6. Statistics Support
|
||||||
|
=====================
|
||||||
|
|
||||||
The controller and driver support a mix of IEEE standard defined statistics,
|
The controller and driver support a mix of IEEE standard defined statistics,
|
||||||
RFC defined statistics, and driver or Altera defined statistics. The four
|
RFC defined statistics, and driver or Altera defined statistics. The four
|
||||||
specifications containing the standard definitions for these statistics are
|
specifications containing the standard definitions for these statistics are
|
||||||
as follows:
|
as follows:
|
||||||
|
|
||||||
o IEEE 802.3-2012 - IEEE Standard for Ethernet.
|
- IEEE 802.3-2012 - IEEE Standard for Ethernet.
|
||||||
o RFC 2863 found at http://www.rfc-editor.org/rfc/rfc2863.txt.
|
- RFC 2863 found at http://www.rfc-editor.org/rfc/rfc2863.txt.
|
||||||
o RFC 2819 found at http://www.rfc-editor.org/rfc/rfc2819.txt.
|
- RFC 2819 found at http://www.rfc-editor.org/rfc/rfc2819.txt.
|
||||||
o Altera Triple Speed Ethernet User Guide, found at http://www.altera.com
|
- Altera Triple Speed Ethernet User Guide, found at http://www.altera.com
|
||||||
|
|
||||||
The statistics supported by the TSE and the device driver are as follows:
|
The statistics supported by the TSE and the device driver are as follows:
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,18 @@
|
|||||||
----------------------------------------------------------------------------
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
NOTE: See also arcnet-hardware.txt in this directory for jumper-setting
|
|
||||||
and cabling information if you're like many of us and didn't happen to get a
|
======
|
||||||
manual with your ARCnet card.
|
ARCnet
|
||||||
----------------------------------------------------------------------------
|
======
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
See also arcnet-hardware.txt in this directory for jumper-setting
|
||||||
|
and cabling information if you're like many of us and didn't happen to get a
|
||||||
|
manual with your ARCnet card.
|
||||||
|
|
||||||
Since no one seems to listen to me otherwise, perhaps a poem will get your
|
Since no one seems to listen to me otherwise, perhaps a poem will get your
|
||||||
attention:
|
attention::
|
||||||
|
|
||||||
This driver's getting fat and beefy,
|
This driver's getting fat and beefy,
|
||||||
But my cat is still named Fifi.
|
But my cat is still named Fifi.
|
||||||
|
|
||||||
@@ -24,27 +31,20 @@ Come on, be a sport! Send me a success report!
|
|||||||
(hey, that was even better than my original poem... this is getting bad!)
|
(hey, that was even better than my original poem... this is getting bad!)
|
||||||
|
|
||||||
|
|
||||||
--------
|
.. warning::
|
||||||
WARNING:
|
|
||||||
--------
|
|
||||||
|
|
||||||
If you don't e-mail me about your success/failure soon, I may be forced to
|
If you don't e-mail me about your success/failure soon, I may be forced to
|
||||||
start SINGING. And we don't want that, do we?
|
start SINGING. And we don't want that, do we?
|
||||||
|
|
||||||
(You know, it might be argued that I'm pushing this point a little too much.
|
(You know, it might be argued that I'm pushing this point a little too much.
|
||||||
If you think so, why not flame me in a quick little e-mail? Please also
|
If you think so, why not flame me in a quick little e-mail? Please also
|
||||||
include the type of card(s) you're using, software, size of network, and
|
include the type of card(s) you're using, software, size of network, and
|
||||||
whether it's working or not.)
|
whether it's working or not.)
|
||||||
|
|
||||||
My e-mail address is: apenwarr@worldvisions.ca
|
|
||||||
|
|
||||||
|
|
||||||
---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
|
My e-mail address is: apenwarr@worldvisions.ca
|
||||||
|
|
||||||
These are the ARCnet drivers for Linux.
|
These are the ARCnet drivers for Linux.
|
||||||
|
|
||||||
|
|
||||||
This new release (2.91) has been put together by David Woodhouse
|
This new release (2.91) has been put together by David Woodhouse
|
||||||
<dwmw2@infradead.org>, in an attempt to tidy up the driver after adding support
|
<dwmw2@infradead.org>, in an attempt to tidy up the driver after adding support
|
||||||
for yet another chipset. Now the generic support has been separated from the
|
for yet another chipset. Now the generic support has been separated from the
|
||||||
@@ -68,6 +68,7 @@ REAL NAME" to listserv@tichy.ch.uj.edu.pl. Then, to submit messages to the
|
|||||||
list, mail to linux-arcnet@tichy.ch.uj.edu.pl.
|
list, mail to linux-arcnet@tichy.ch.uj.edu.pl.
|
||||||
|
|
||||||
There are archives of the mailing list at:
|
There are archives of the mailing list at:
|
||||||
|
|
||||||
http://epistolary.org/mailman/listinfo.cgi/arcnet
|
http://epistolary.org/mailman/listinfo.cgi/arcnet
|
||||||
|
|
||||||
The people on linux-net@vger.kernel.org (now defunct, replaced by
|
The people on linux-net@vger.kernel.org (now defunct, replaced by
|
||||||
@@ -80,15 +81,18 @@ Other Drivers and Info
|
|||||||
----------------------
|
----------------------
|
||||||
|
|
||||||
You can try my ARCNET page on the World Wide Web at:
|
You can try my ARCNET page on the World Wide Web at:
|
||||||
|
|
||||||
http://www.qis.net/~jschmitz/arcnet/
|
http://www.qis.net/~jschmitz/arcnet/
|
||||||
|
|
||||||
Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you
|
Also, SMC (one of the companies that makes ARCnet cards) has a WWW site you
|
||||||
might be interested in, which includes several drivers for various cards
|
might be interested in, which includes several drivers for various cards
|
||||||
including ARCnet. Try:
|
including ARCnet. Try:
|
||||||
|
|
||||||
http://www.smc.com/
|
http://www.smc.com/
|
||||||
|
|
||||||
Performance Technologies makes various network software that supports
|
Performance Technologies makes various network software that supports
|
||||||
ARCnet:
|
ARCnet:
|
||||||
|
|
||||||
http://www.perftech.com/ or ftp to ftp.perftech.com.
|
http://www.perftech.com/ or ftp to ftp.perftech.com.
|
||||||
|
|
||||||
Novell makes a networking stack for DOS which includes ARCnet drivers. Try
|
Novell makes a networking stack for DOS which includes ARCnet drivers. Try
|
||||||
@@ -105,7 +109,8 @@ access.
|
|||||||
Installing the Driver
|
Installing the Driver
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
All you will need to do in order to install the driver is:
|
All you will need to do in order to install the driver is::
|
||||||
|
|
||||||
make config
|
make config
|
||||||
(be sure to choose ARCnet in the network devices
|
(be sure to choose ARCnet in the network devices
|
||||||
and at least one chipset driver.)
|
and at least one chipset driver.)
|
||||||
@@ -125,10 +130,12 @@ There are four chipset options:
|
|||||||
|
|
||||||
This is the normal ARCnet card, which you've probably got. This is the only
|
This is the normal ARCnet card, which you've probably got. This is the only
|
||||||
chipset driver which will autoprobe if not told where the card is.
|
chipset driver which will autoprobe if not told where the card is.
|
||||||
It following options on the command line:
|
It following options on the command line::
|
||||||
|
|
||||||
com90xx=[<io>[,<irq>[,<shmem>]]][,<name>] | <name>
|
com90xx=[<io>[,<irq>[,<shmem>]]][,<name>] | <name>
|
||||||
|
|
||||||
If you load the chipset support as a module, the options are:
|
If you load the chipset support as a module, the options are::
|
||||||
|
|
||||||
io=<io> irq=<irq> shmem=<shmem> device=<name>
|
io=<io> irq=<irq> shmem=<shmem> device=<name>
|
||||||
|
|
||||||
To disable the autoprobe, just specify "com90xx=" on the kernel command line.
|
To disable the autoprobe, just specify "com90xx=" on the kernel command line.
|
||||||
@@ -140,10 +147,13 @@ This is the new chipset from SMC with support for promiscuous mode (packet
|
|||||||
sniffing), extra diagnostic information, etc. Unfortunately, there is no
|
sniffing), extra diagnostic information, etc. Unfortunately, there is no
|
||||||
sensible method of autoprobing for these cards. You must specify the I/O
|
sensible method of autoprobing for these cards. You must specify the I/O
|
||||||
address on the kernel command line.
|
address on the kernel command line.
|
||||||
The command line options are:
|
|
||||||
|
The command line options are::
|
||||||
|
|
||||||
com20020=<io>[,<irq>[,<node_ID>[,backplane[,CKP[,timeout]]]]][,name]
|
com20020=<io>[,<irq>[,<node_ID>[,backplane[,CKP[,timeout]]]]][,name]
|
||||||
|
|
||||||
If you load the chipset support as a module, the options are:
|
If you load the chipset support as a module, the options are::
|
||||||
|
|
||||||
io=<io> irq=<irq> node=<node_ID> backplane=<backplane> clock=<CKP>
|
io=<io> irq=<irq> node=<node_ID> backplane=<backplane> clock=<CKP>
|
||||||
timeout=<timeout> device=<name>
|
timeout=<timeout> device=<name>
|
||||||
|
|
||||||
@@ -160,7 +170,9 @@ you have a card which doesn't support shared memory, or (strangely) in case
|
|||||||
you have so many ARCnet cards in your machine that you run out of shmem slots.
|
you have so many ARCnet cards in your machine that you run out of shmem slots.
|
||||||
If you don't give the IO address on the kernel command line, then the driver
|
If you don't give the IO address on the kernel command line, then the driver
|
||||||
will not find the card.
|
will not find the card.
|
||||||
The command line options are:
|
|
||||||
|
The command line options are::
|
||||||
|
|
||||||
com90io=<io>[,<irq>][,<name>]
|
com90io=<io>[,<irq>][,<name>]
|
||||||
|
|
||||||
If you load the chipset support as a module, the options are:
|
If you load the chipset support as a module, the options are:
|
||||||
@@ -171,10 +183,12 @@ If you load the chipset support as a module, the options are:
|
|||||||
These are COM90xx chips which are _completely_ memory mapped. The support for
|
These are COM90xx chips which are _completely_ memory mapped. The support for
|
||||||
these is not tested. If you have one, please mail the author with a success
|
these is not tested. If you have one, please mail the author with a success
|
||||||
report. All options must be specified, except the device name.
|
report. All options must be specified, except the device name.
|
||||||
Command line options:
|
Command line options::
|
||||||
|
|
||||||
arcrimi=<shmem>,<irq>,<node_ID>[,<name>]
|
arcrimi=<shmem>,<irq>,<node_ID>[,<name>]
|
||||||
|
|
||||||
If you load the chipset support as a module, the options are:
|
If you load the chipset support as a module, the options are::
|
||||||
|
|
||||||
shmem=<shmem> irq=<irq> node=<node_ID> device=<name>
|
shmem=<shmem> irq=<irq> node=<node_ID> device=<name>
|
||||||
|
|
||||||
|
|
||||||
@@ -186,6 +200,8 @@ support" and to support for your ARCnet chipset if you want to use the
|
|||||||
loadable module. You can also say 'y' to "Generic ARCnet support" and 'm'
|
loadable module. You can also say 'y' to "Generic ARCnet support" and 'm'
|
||||||
to the chipset support if you wish.
|
to the chipset support if you wish.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
make config
|
make config
|
||||||
make clean
|
make clean
|
||||||
make zImage
|
make zImage
|
||||||
@@ -196,7 +212,8 @@ you can specify various characteristics of your card on the command
|
|||||||
line. (In recent versions of the driver, autoprobing is much more reliable
|
line. (In recent versions of the driver, autoprobing is much more reliable
|
||||||
and works as a module, so most of this is now unnecessary.)
|
and works as a module, so most of this is now unnecessary.)
|
||||||
|
|
||||||
For example:
|
For example::
|
||||||
|
|
||||||
cd /usr/src/linux/modules
|
cd /usr/src/linux/modules
|
||||||
insmod arcnet.o
|
insmod arcnet.o
|
||||||
insmod com90xx.o
|
insmod com90xx.o
|
||||||
@@ -228,21 +245,25 @@ ARCnet driver has somewhat suffered in this respect. COM90xx support, if
|
|||||||
compiled into the kernel, will (try to) autodetect all the installed cards.
|
compiled into the kernel, will (try to) autodetect all the installed cards.
|
||||||
|
|
||||||
If you have other cards, with support compiled into the kernel, then you can
|
If you have other cards, with support compiled into the kernel, then you can
|
||||||
just repeat the options on the kernel command line, e.g.:
|
just repeat the options on the kernel command line, e.g.::
|
||||||
LILO: linux com20020=0x2e0 com20020=0x380 com90io=0x260
|
|
||||||
|
LILO: linux com20020=0x2e0 com20020=0x380 com90io=0x260
|
||||||
|
|
||||||
If you have the chipset support built as a loadable module, then you need to
|
If you have the chipset support built as a loadable module, then you need to
|
||||||
do something like this:
|
do something like this::
|
||||||
|
|
||||||
insmod -o arc0 com90xx
|
insmod -o arc0 com90xx
|
||||||
insmod -o arc1 com20020 io=0x2e0
|
insmod -o arc1 com20020 io=0x2e0
|
||||||
insmod -o arc2 com90xx
|
insmod -o arc2 com90xx
|
||||||
|
|
||||||
The ARCnet drivers will now sort out their names automatically.
|
The ARCnet drivers will now sort out their names automatically.
|
||||||
|
|
||||||
|
|
||||||
How do I get it to work with...?
|
How do I get it to work with...?
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
||||||
NFS: Should be fine linux->linux, just pretend you're using Ethernet cards.
|
NFS:
|
||||||
|
Should be fine linux->linux, just pretend you're using Ethernet cards.
|
||||||
oak.oakland.edu:/simtel/msdos/nfs has some nice DOS clients. There
|
oak.oakland.edu:/simtel/msdos/nfs has some nice DOS clients. There
|
||||||
is also a DOS-based NFS server called SOSS. It doesn't multitask
|
is also a DOS-based NFS server called SOSS. It doesn't multitask
|
||||||
quite the way Linux does (actually, it doesn't multitask AT ALL) but
|
quite the way Linux does (actually, it doesn't multitask AT ALL) but
|
||||||
@@ -257,16 +278,19 @@ NFS: Should be fine linux->linux, just pretend you're using Ethernet cards.
|
|||||||
don't know why the defaults on the Amiga didn't work; write to me if
|
don't know why the defaults on the Amiga didn't work; write to me if
|
||||||
you know more.
|
you know more.
|
||||||
|
|
||||||
DOS: If you're using the freeware arcether.com, you might want to install
|
DOS:
|
||||||
|
If you're using the freeware arcether.com, you might want to install
|
||||||
the driver patch from my web page. It helps with PC/TCP, and also
|
the driver patch from my web page. It helps with PC/TCP, and also
|
||||||
can get arcether to load if it timed out too quickly during
|
can get arcether to load if it timed out too quickly during
|
||||||
initialization. In fact, if you use it on a 386+ you REALLY need
|
initialization. In fact, if you use it on a 386+ you REALLY need
|
||||||
the patch, really.
|
the patch, really.
|
||||||
|
|
||||||
Windows: See DOS :) Trumpet Winsock works fine with either the Novell or
|
Windows:
|
||||||
|
See DOS :) Trumpet Winsock works fine with either the Novell or
|
||||||
Arcether client, assuming you remember to load winpkt of course.
|
Arcether client, assuming you remember to load winpkt of course.
|
||||||
|
|
||||||
LAN Manager and Windows for Workgroups: These programs use protocols that
|
LAN Manager and Windows for Workgroups:
|
||||||
|
These programs use protocols that
|
||||||
are incompatible with the Internet standard. They try to pretend
|
are incompatible with the Internet standard. They try to pretend
|
||||||
the cards are Ethernet, and confuse everyone else on the network.
|
the cards are Ethernet, and confuse everyone else on the network.
|
||||||
|
|
||||||
@@ -278,7 +302,8 @@ LAN Manager and Windows for Workgroups: These programs use protocols that
|
|||||||
interface quite nicely with TCP/IP-based WfWg or Lan Manager
|
interface quite nicely with TCP/IP-based WfWg or Lan Manager
|
||||||
networks.
|
networks.
|
||||||
|
|
||||||
Windows 95: Tools are included with Win95 that let you use either the LANMAN
|
Windows 95:
|
||||||
|
Tools are included with Win95 that let you use either the LANMAN
|
||||||
style network drivers (NDIS) or Novell drivers (ODI) to handle your
|
style network drivers (NDIS) or Novell drivers (ODI) to handle your
|
||||||
ARCnet packets. If you use ODI, you'll need to use the 'arc0'
|
ARCnet packets. If you use ODI, you'll need to use the 'arc0'
|
||||||
device with Linux. If you use NDIS, then try the 'arc0e' device.
|
device with Linux. If you use NDIS, then try the 'arc0e' device.
|
||||||
@@ -286,7 +311,8 @@ Windows 95: Tools are included with Win95 that let you use either the LANMAN
|
|||||||
you're completely insane, and/or you need to build some kind of
|
you're completely insane, and/or you need to build some kind of
|
||||||
hybrid network that uses both encapsulation types.
|
hybrid network that uses both encapsulation types.
|
||||||
|
|
||||||
OS/2: I've been told it works under Warp Connect with an ARCnet driver from
|
OS/2:
|
||||||
|
I've been told it works under Warp Connect with an ARCnet driver from
|
||||||
SMC. You need to use the 'arc0e' interface for this. If you get
|
SMC. You need to use the 'arc0e' interface for this. If you get
|
||||||
the SMC driver to work with the TCP/IP stuff included in the
|
the SMC driver to work with the TCP/IP stuff included in the
|
||||||
"normal" Warp Bonus Pack, let me know.
|
"normal" Warp Bonus Pack, let me know.
|
||||||
@@ -295,7 +321,8 @@ OS/2: I've been told it works under Warp Connect with an ARCnet driver from
|
|||||||
which should use the same protocol as WfWg does. I had no luck
|
which should use the same protocol as WfWg does. I had no luck
|
||||||
installing it under Warp, however. Please mail me with any results.
|
installing it under Warp, however. Please mail me with any results.
|
||||||
|
|
||||||
NetBSD/AmiTCP: These use an old version of the Internet standard ARCnet
|
NetBSD/AmiTCP:
|
||||||
|
These use an old version of the Internet standard ARCnet
|
||||||
protocol (RFC1051) which is compatible with the Linux driver v2.10
|
protocol (RFC1051) which is compatible with the Linux driver v2.10
|
||||||
ALPHA and above using the arc0s device. (See "Multiprotocol ARCnet"
|
ALPHA and above using the arc0s device. (See "Multiprotocol ARCnet"
|
||||||
below.) ** Newer versions of NetBSD apparently support RFC1201.
|
below.) ** Newer versions of NetBSD apparently support RFC1201.
|
||||||
@@ -307,7 +334,8 @@ Using Multiprotocol ARCnet
|
|||||||
The ARCnet driver v2.10 ALPHA supports three protocols, each on its own
|
The ARCnet driver v2.10 ALPHA supports three protocols, each on its own
|
||||||
"virtual network device":
|
"virtual network device":
|
||||||
|
|
||||||
arc0 - RFC1201 protocol, the official Internet standard which just
|
====== ===============================================================
|
||||||
|
arc0 RFC1201 protocol, the official Internet standard which just
|
||||||
happens to be 100% compatible with Novell's TRXNET driver.
|
happens to be 100% compatible with Novell's TRXNET driver.
|
||||||
Version 1.00 of the ARCnet driver supported _only_ this
|
Version 1.00 of the ARCnet driver supported _only_ this
|
||||||
protocol. arc0 is the fastest of the three protocols (for
|
protocol. arc0 is the fastest of the three protocols (for
|
||||||
@@ -316,7 +344,7 @@ The ARCnet driver v2.10 ALPHA supports three protocols, each on its own
|
|||||||
Unless you have a specific need to use a different protocol,
|
Unless you have a specific need to use a different protocol,
|
||||||
I strongly suggest that you stick with this one.
|
I strongly suggest that you stick with this one.
|
||||||
|
|
||||||
arc0e - "Ethernet-Encapsulation" which sends packets over ARCnet
|
arc0e "Ethernet-Encapsulation" which sends packets over ARCnet
|
||||||
that are actually a lot like Ethernet packets, including the
|
that are actually a lot like Ethernet packets, including the
|
||||||
6-byte hardware addresses. This protocol is compatible with
|
6-byte hardware addresses. This protocol is compatible with
|
||||||
Microsoft's NDIS ARCnet driver, like the one in WfWg and
|
Microsoft's NDIS ARCnet driver, like the one in WfWg and
|
||||||
@@ -329,7 +357,7 @@ The ARCnet driver v2.10 ALPHA supports three protocols, each on its own
|
|||||||
reasons yet to be determined. (Probably it's the smaller
|
reasons yet to be determined. (Probably it's the smaller
|
||||||
MTU that does it.)
|
MTU that does it.)
|
||||||
|
|
||||||
arc0s - The "[s]imple" RFC1051 protocol is the "previous" Internet
|
arc0s The "[s]imple" RFC1051 protocol is the "previous" Internet
|
||||||
standard that is completely incompatible with the new
|
standard that is completely incompatible with the new
|
||||||
standard. Some software today, however, continues to
|
standard. Some software today, however, continues to
|
||||||
support the old standard (and only the old standard)
|
support the old standard (and only the old standard)
|
||||||
@@ -341,6 +369,7 @@ The ARCnet driver v2.10 ALPHA supports three protocols, each on its own
|
|||||||
|
|
||||||
The arc0s support was contributed by Tomasz Motylewski
|
The arc0s support was contributed by Tomasz Motylewski
|
||||||
and modified somewhat by me. Bugs are probably my fault.
|
and modified somewhat by me. Bugs are probably my fault.
|
||||||
|
====== ===============================================================
|
||||||
|
|
||||||
You can choose not to compile arc0e and arc0s into the driver if you want -
|
You can choose not to compile arc0e and arc0s into the driver if you want -
|
||||||
this will save you a bit of memory and avoid confusion when eg. trying to
|
this will save you a bit of memory and avoid confusion when eg. trying to
|
||||||
@@ -359,13 +388,15 @@ can set up your network then:
|
|||||||
only arc0 unless you have a good reason (like some other software, ie.
|
only arc0 unless you have a good reason (like some other software, ie.
|
||||||
WfWg, that only works with arc0e).
|
WfWg, that only works with arc0e).
|
||||||
|
|
||||||
If you need only arc0, then the following commands should get you going:
|
If you need only arc0, then the following commands should get you going::
|
||||||
|
|
||||||
ifconfig arc0 MY.IP.ADD.RESS
|
ifconfig arc0 MY.IP.ADD.RESS
|
||||||
route add MY.IP.ADD.RESS arc0
|
route add MY.IP.ADD.RESS arc0
|
||||||
route add -net SUB.NET.ADD.RESS arc0
|
route add -net SUB.NET.ADD.RESS arc0
|
||||||
[add other local routes here]
|
[add other local routes here]
|
||||||
|
|
||||||
If you need arc0e (and only arc0e), it's a little different:
|
If you need arc0e (and only arc0e), it's a little different::
|
||||||
|
|
||||||
ifconfig arc0 MY.IP.ADD.RESS
|
ifconfig arc0 MY.IP.ADD.RESS
|
||||||
ifconfig arc0e MY.IP.ADD.RESS
|
ifconfig arc0e MY.IP.ADD.RESS
|
||||||
route add MY.IP.ADD.RESS arc0e
|
route add MY.IP.ADD.RESS arc0e
|
||||||
@@ -393,11 +424,13 @@ can set up your network then:
|
|||||||
|
|
||||||
To start with, take a simple network with just insight and freedom.
|
To start with, take a simple network with just insight and freedom.
|
||||||
Insight needs to:
|
Insight needs to:
|
||||||
|
|
||||||
- talk to freedom via RFC1201 (arc0) protocol, because I like it
|
- talk to freedom via RFC1201 (arc0) protocol, because I like it
|
||||||
more and it's faster.
|
more and it's faster.
|
||||||
- use freedom as its Internet gateway.
|
- use freedom as its Internet gateway.
|
||||||
|
|
||||||
That's pretty easy to do. Set up insight like this:
|
That's pretty easy to do. Set up insight like this::
|
||||||
|
|
||||||
ifconfig arc0 insight
|
ifconfig arc0 insight
|
||||||
route add insight arc0
|
route add insight arc0
|
||||||
route add freedom arc0 /* I would use the subnet here (like I said
|
route add freedom arc0 /* I would use the subnet here (like I said
|
||||||
@@ -408,7 +441,8 @@ can set up your network then:
|
|||||||
things. */
|
things. */
|
||||||
route add default gw freedom
|
route add default gw freedom
|
||||||
|
|
||||||
And freedom gets configured like so:
|
And freedom gets configured like so::
|
||||||
|
|
||||||
ifconfig arc0 freedom
|
ifconfig arc0 freedom
|
||||||
route add freedom arc0
|
route add freedom arc0
|
||||||
route add insight arc0
|
route add insight arc0
|
||||||
@@ -436,11 +470,12 @@ can set up your network then:
|
|||||||
the fact that both freedom and insight (courtesy of the arc0e device)
|
the fact that both freedom and insight (courtesy of the arc0e device)
|
||||||
could understand a direct transmission.
|
could understand a direct transmission.
|
||||||
|
|
||||||
I compensate by giving freedom an extra IP address - aliased 'gatekeeper'
|
I compensate by giving freedom an extra IP address - aliased 'gatekeeper' -
|
||||||
- that is on my private subnet, the same subnet that patience is on. I
|
that is on my private subnet, the same subnet that patience is on. I
|
||||||
then define gatekeeper to be the default gateway for patience.
|
then define gatekeeper to be the default gateway for patience.
|
||||||
|
|
||||||
To configure freedom (in addition to the commands above):
|
To configure freedom (in addition to the commands above)::
|
||||||
|
|
||||||
ifconfig arc0e gatekeeper
|
ifconfig arc0e gatekeeper
|
||||||
route add gatekeeper arc0e
|
route add gatekeeper arc0e
|
||||||
route add patience arc0e
|
route add patience arc0e
|
||||||
@@ -467,7 +502,7 @@ can set up your network then:
|
|||||||
hosts that would normally not be able to communicate at all.
|
hosts that would normally not be able to communicate at all.
|
||||||
|
|
||||||
For those who like diagrams, I have created two "virtual subnets" on the
|
For those who like diagrams, I have created two "virtual subnets" on the
|
||||||
same physical ARCnet wire. You can picture it like this:
|
same physical ARCnet wire. You can picture it like this::
|
||||||
|
|
||||||
|
|
||||||
[RFC1201 NETWORK] [ETHER-ENCAP NETWORK]
|
[RFC1201 NETWORK] [ETHER-ENCAP NETWORK]
|
||||||
@@ -491,6 +526,7 @@ It works: what now?
|
|||||||
Send mail describing your setup, preferably including driver version, kernel
|
Send mail describing your setup, preferably including driver version, kernel
|
||||||
version, ARCnet card model, CPU type, number of systems on your network, and
|
version, ARCnet card model, CPU type, number of systems on your network, and
|
||||||
list of software in use to me at the following address:
|
list of software in use to me at the following address:
|
||||||
|
|
||||||
apenwarr@worldvisions.ca
|
apenwarr@worldvisions.ca
|
||||||
|
|
||||||
I do send (sometimes automated) replies to all messages I receive. My email
|
I do send (sometimes automated) replies to all messages I receive. My email
|
||||||
@@ -535,9 +571,11 @@ decides that the driver is broken). During a transmit, unused parts of the
|
|||||||
buffer will be cleared to 0x42 as well. This is to make it easier to figure
|
buffer will be cleared to 0x42 as well. This is to make it easier to figure
|
||||||
out which bytes are being used by a packet.
|
out which bytes are being used by a packet.
|
||||||
|
|
||||||
You can change the debug level without recompiling the kernel by typing:
|
You can change the debug level without recompiling the kernel by typing::
|
||||||
|
|
||||||
ifconfig arc0 down metric 1xxx
|
ifconfig arc0 down metric 1xxx
|
||||||
/etc/rc.d/rc.inet1
|
/etc/rc.d/rc.inet1
|
||||||
|
|
||||||
where "xxx" is the debug level you want. For example, "metric 1015" would put
|
where "xxx" is the debug level you want. For example, "metric 1015" would put
|
||||||
you at debug level 15. Debug level 7 is currently the default.
|
you at debug level 15. Debug level 7 is currently the default.
|
||||||
|
|
@@ -1,3 +1,9 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
===
|
||||||
|
ATM
|
||||||
|
===
|
||||||
|
|
||||||
In order to use anything but the most primitive functions of ATM,
|
In order to use anything but the most primitive functions of ATM,
|
||||||
several user-mode programs are required to assist the kernel. These
|
several user-mode programs are required to assist the kernel. These
|
||||||
programs and related material can be found via the ATM on Linux Web
|
programs and related material can be found via the ATM on Linux Web
|
@@ -1,3 +1,9 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=====
|
||||||
|
AX.25
|
||||||
|
=====
|
||||||
|
|
||||||
To use the amateur radio protocols within Linux you will need to get a
|
To use the amateur radio protocols within Linux you will need to get a
|
||||||
suitable copy of the AX.25 Utilities. More detailed information about
|
suitable copy of the AX.25 Utilities. More detailed information about
|
||||||
AX.25, NET/ROM and ROSE, associated programs and and utilities can be
|
AX.25, NET/ROM and ROSE, associated programs and and utilities can be
|
@@ -1,8 +1,12 @@
|
|||||||
LINUX DRIVERS FOR BAYCOM MODEMS
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch>
|
===============================
|
||||||
|
Linux Drivers for Baycom Modems
|
||||||
|
===============================
|
||||||
|
|
||||||
!!NEW!! (04/98) The drivers for the baycom modems have been split into
|
Thomas M. Sailer, HB9JNX/AE4WA, <sailer@ife.ee.ethz.ch>
|
||||||
|
|
||||||
|
The drivers for the baycom modems have been split into
|
||||||
separate drivers as they did not share any code, and the driver
|
separate drivers as they did not share any code, and the driver
|
||||||
and device names have changed.
|
and device names have changed.
|
||||||
|
|
||||||
@@ -10,10 +14,11 @@ This document describes the Linux Kernel Drivers for simple Baycom style
|
|||||||
amateur radio modems.
|
amateur radio modems.
|
||||||
|
|
||||||
The following drivers are available:
|
The following drivers are available:
|
||||||
|
====================================
|
||||||
|
|
||||||
baycom_ser_fdx:
|
baycom_ser_fdx:
|
||||||
This driver supports the SER12 modems either full or half duplex.
|
This driver supports the SER12 modems either full or half duplex.
|
||||||
Its baud rate may be changed via the `baud' module parameter,
|
Its baud rate may be changed via the ``baud`` module parameter,
|
||||||
therefore it supports just about every bit bang modem on a
|
therefore it supports just about every bit bang modem on a
|
||||||
serial port. Its devices are called bcsf0 through bcsf3.
|
serial port. Its devices are called bcsf0 through bcsf3.
|
||||||
This is the recommended driver for SER12 type modems,
|
This is the recommended driver for SER12 type modems,
|
||||||
@@ -37,7 +42,8 @@ baycom_epp:
|
|||||||
|
|
||||||
The following modems are supported:
|
The following modems are supported:
|
||||||
|
|
||||||
ser12: This is a very simple 1200 baud AFSK modem. The modem consists only
|
======= ========================================================================
|
||||||
|
ser12 This is a very simple 1200 baud AFSK modem. The modem consists only
|
||||||
of a modulator/demodulator chip, usually a TI TCM3105. The computer
|
of a modulator/demodulator chip, usually a TI TCM3105. The computer
|
||||||
is responsible for regenerating the receiver bit clock, as well as
|
is responsible for regenerating the receiver bit clock, as well as
|
||||||
for handling the HDLC protocol. The modem connects to a serial port,
|
for handling the HDLC protocol. The modem connects to a serial port,
|
||||||
@@ -45,7 +51,7 @@ ser12: This is a very simple 1200 baud AFSK modem. The modem consists only
|
|||||||
port, the kernel driver for serial ports cannot be used, and this
|
port, the kernel driver for serial ports cannot be used, and this
|
||||||
driver only supports standard serial hardware (8250, 16450, 16550)
|
driver only supports standard serial hardware (8250, 16450, 16550)
|
||||||
|
|
||||||
par96: This is a modem for 9600 baud FSK compatible to the G3RUH standard.
|
par96 This is a modem for 9600 baud FSK compatible to the G3RUH standard.
|
||||||
The modem does all the filtering and regenerates the receiver clock.
|
The modem does all the filtering and regenerates the receiver clock.
|
||||||
Data is transferred from and to the PC via a shift register.
|
Data is transferred from and to the PC via a shift register.
|
||||||
The shift register is filled with 16 bits and an interrupt is signalled.
|
The shift register is filled with 16 bits and an interrupt is signalled.
|
||||||
@@ -54,18 +60,19 @@ par96: This is a modem for 9600 baud FSK compatible to the G3RUH standard.
|
|||||||
implementation of the HDLC protocol and the scrambler polynomial to
|
implementation of the HDLC protocol and the scrambler polynomial to
|
||||||
the PC.
|
the PC.
|
||||||
|
|
||||||
picpar: This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
|
picpar This is a redesign of the par96 modem by Henning Rech, DF9IC. The modem
|
||||||
is protocol compatible to par96, but uses only three low power ICs
|
is protocol compatible to par96, but uses only three low power ICs
|
||||||
and can therefore be fed from the parallel port and does not require
|
and can therefore be fed from the parallel port and does not require
|
||||||
an additional power supply. Furthermore, it incorporates a carrier
|
an additional power supply. Furthermore, it incorporates a carrier
|
||||||
detect circuitry.
|
detect circuitry.
|
||||||
|
|
||||||
EPP: This is a high-speed modem adaptor that connects to an enhanced parallel port.
|
EPP This is a high-speed modem adaptor that connects to an enhanced parallel
|
||||||
|
port.
|
||||||
|
|
||||||
Its target audience is users working over a high speed hub (76.8kbit/s).
|
Its target audience is users working over a high speed hub (76.8kbit/s).
|
||||||
|
|
||||||
eppfpga: This is a redesign of the EPP adaptor.
|
eppfpga This is a redesign of the EPP adaptor.
|
||||||
|
======= ========================================================================
|
||||||
|
|
||||||
|
|
||||||
All of the above modems only support half duplex communications. However,
|
All of the above modems only support half duplex communications. However,
|
||||||
the driver supports the KISS (see below) fullduplex command. It then simply
|
the driver supports the KISS (see below) fullduplex command. It then simply
|
||||||
@@ -76,6 +83,7 @@ access protocol.
|
|||||||
|
|
||||||
|
|
||||||
The Interface of the drivers
|
The Interface of the drivers
|
||||||
|
============================
|
||||||
|
|
||||||
Unlike previous drivers, these drivers are no longer character devices,
|
Unlike previous drivers, these drivers are no longer character devices,
|
||||||
but they are now true kernel network interfaces. Installation is therefore
|
but they are now true kernel network interfaces. Installation is therefore
|
||||||
@@ -88,20 +96,22 @@ me for WAMPES which allows attaching a kernel network interface directly.
|
|||||||
|
|
||||||
|
|
||||||
Configuring the driver
|
Configuring the driver
|
||||||
|
======================
|
||||||
|
|
||||||
Every time a driver is inserted into the kernel, it has to know which
|
Every time a driver is inserted into the kernel, it has to know which
|
||||||
modems it should access at which ports. This can be done with the setbaycom
|
modems it should access at which ports. This can be done with the setbaycom
|
||||||
utility. If you are only using one modem, you can also configure the
|
utility. If you are only using one modem, you can also configure the
|
||||||
driver from the insmod command line (or by means of an option line in
|
driver from the insmod command line (or by means of an option line in
|
||||||
/etc/modprobe.d/*.conf).
|
``/etc/modprobe.d/*.conf``).
|
||||||
|
|
||||||
|
Examples::
|
||||||
|
|
||||||
Examples:
|
|
||||||
modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
|
modprobe baycom_ser_fdx mode="ser12*" iobase=0x3f8 irq=4
|
||||||
sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
|
sethdlc -i bcsf0 -p mode "ser12*" io 0x3f8 irq 4
|
||||||
|
|
||||||
Both lines configure the first port to drive a ser12 modem at the first
|
Both lines configure the first port to drive a ser12 modem at the first
|
||||||
serial port (COM1 under DOS). The * in the mode parameter instructs the driver to use
|
serial port (COM1 under DOS). The * in the mode parameter instructs the driver
|
||||||
the software DCD algorithm (see below).
|
to use the software DCD algorithm (see below)::
|
||||||
|
|
||||||
insmod baycom_par mode="picpar" iobase=0x378
|
insmod baycom_par mode="picpar" iobase=0x378
|
||||||
sethdlc -i bcp0 -p mode "picpar" io 0x378
|
sethdlc -i bcp0 -p mode "picpar" io 0x378
|
||||||
@@ -115,29 +125,33 @@ Note that both utilities interpret the values slightly differently.
|
|||||||
|
|
||||||
|
|
||||||
Hardware DCD versus Software DCD
|
Hardware DCD versus Software DCD
|
||||||
|
================================
|
||||||
|
|
||||||
To avoid collisions on the air, the driver must know when the channel is
|
To avoid collisions on the air, the driver must know when the channel is
|
||||||
busy. This is the task of the DCD circuitry/software. The driver may either
|
busy. This is the task of the DCD circuitry/software. The driver may either
|
||||||
utilise a software DCD algorithm (options=1) or use a DCD signal from
|
utilise a software DCD algorithm (options=1) or use a DCD signal from
|
||||||
the hardware (options=0).
|
the hardware (options=0).
|
||||||
|
|
||||||
ser12: if software DCD is utilised, the radio's squelch should always be
|
======= =================================================================
|
||||||
|
ser12 if software DCD is utilised, the radio's squelch should always be
|
||||||
open. It is highly recommended to use the software DCD algorithm,
|
open. It is highly recommended to use the software DCD algorithm,
|
||||||
as it is much faster than most hardware squelch circuitry. The
|
as it is much faster than most hardware squelch circuitry. The
|
||||||
disadvantage is a slightly higher load on the system.
|
disadvantage is a slightly higher load on the system.
|
||||||
|
|
||||||
par96: the software DCD algorithm for this type of modem is rather poor.
|
par96 the software DCD algorithm for this type of modem is rather poor.
|
||||||
The modem simply does not provide enough information to implement
|
The modem simply does not provide enough information to implement
|
||||||
a reasonable DCD algorithm in software. Therefore, if your radio
|
a reasonable DCD algorithm in software. Therefore, if your radio
|
||||||
feeds the DCD input of the PAR96 modem, the use of the hardware
|
feeds the DCD input of the PAR96 modem, the use of the hardware
|
||||||
DCD circuitry is recommended.
|
DCD circuitry is recommended.
|
||||||
|
|
||||||
picpar: the picpar modem features a builtin DCD hardware, which is highly
|
picpar the picpar modem features a builtin DCD hardware, which is highly
|
||||||
recommended.
|
recommended.
|
||||||
|
======= =================================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Compatibility with the rest of the Linux kernel
|
Compatibility with the rest of the Linux kernel
|
||||||
|
===============================================
|
||||||
|
|
||||||
The serial driver and the baycom serial drivers compete
|
The serial driver and the baycom serial drivers compete
|
||||||
for the same hardware resources. Of course only one driver can access a given
|
for the same hardware resources. Of course only one driver can access a given
|
||||||
@@ -154,5 +168,7 @@ The parallel port drivers (baycom_par, baycom_epp) now use the parport subsystem
|
|||||||
to arbitrate the ports between different client drivers.
|
to arbitrate the ports between different client drivers.
|
||||||
|
|
||||||
vy 73s de
|
vy 73s de
|
||||||
|
|
||||||
Tom Sailer, sailer@ife.ee.ethz.ch
|
Tom Sailer, sailer@ife.ee.ethz.ch
|
||||||
|
|
||||||
hb9jnx @ hb9w.ampr.org
|
hb9jnx @ hb9w.ampr.org
|
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,3 @@
|
|||||||
:orphan:
|
|
||||||
|
|
||||||
.. SPDX-License-Identifier: GPL-2.0
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
.. include:: <isonum.txt>
|
.. include:: <isonum.txt>
|
||||||
|
|
||||||
|
13
Documentation/networking/caif/index.rst
Normal file
13
Documentation/networking/caif/index.rst
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
CAIF
|
||||||
|
====
|
||||||
|
|
||||||
|
Contents:
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
linux_caif
|
||||||
|
caif
|
||||||
|
spi_porting
|
@@ -1,12 +1,19 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
.. include:: <isonum.txt>
|
||||||
|
|
||||||
|
==========
|
||||||
Linux CAIF
|
Linux CAIF
|
||||||
===========
|
==========
|
||||||
copyright (C) ST-Ericsson AB 2010
|
|
||||||
Author: Sjur Brendeland/ sjur.brandeland@stericsson.com
|
Copyright |copy| ST-Ericsson AB 2010
|
||||||
License terms: GNU General Public License (GPL) version 2
|
|
||||||
|
:Author: Sjur Brendeland/ sjur.brandeland@stericsson.com
|
||||||
|
:License terms: GNU General Public License (GPL) version 2
|
||||||
|
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
------------
|
============
|
||||||
|
|
||||||
CAIF is a MUX protocol used by ST-Ericsson cellular modems for
|
CAIF is a MUX protocol used by ST-Ericsson cellular modems for
|
||||||
communication between Modem and host. The host processes can open virtual AT
|
communication between Modem and host. The host processes can open virtual AT
|
||||||
channels, initiate GPRS Data connections, Video channels and Utility Channels.
|
channels, initiate GPRS Data connections, Video channels and Utility Channels.
|
||||||
@@ -16,13 +23,16 @@ ST-Ericsson modems support a number of transports between modem
|
|||||||
and host. Currently, UART and Loopback are available for Linux.
|
and host. Currently, UART and Loopback are available for Linux.
|
||||||
|
|
||||||
|
|
||||||
Architecture:
|
Architecture
|
||||||
------------
|
============
|
||||||
|
|
||||||
The implementation of CAIF is divided into:
|
The implementation of CAIF is divided into:
|
||||||
|
|
||||||
* CAIF Socket Layer and GPRS IP Interface.
|
* CAIF Socket Layer and GPRS IP Interface.
|
||||||
* CAIF Core Protocol Implementation
|
* CAIF Core Protocol Implementation
|
||||||
* CAIF Link Layer, implemented as NET devices.
|
* CAIF Link Layer, implemented as NET devices.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
RTNL
|
RTNL
|
||||||
!
|
!
|
||||||
@@ -46,12 +56,12 @@ The implementation of CAIF is divided into:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
I M P L E M E N T A T I O N
|
Implementation
|
||||||
===========================
|
==============
|
||||||
|
|
||||||
|
|
||||||
CAIF Core Protocol Layer
|
CAIF Core Protocol Layer
|
||||||
=========================================
|
------------------------
|
||||||
|
|
||||||
CAIF Core layer implements the CAIF protocol as defined by ST-Ericsson.
|
CAIF Core layer implements the CAIF protocol as defined by ST-Ericsson.
|
||||||
It implements the CAIF protocol stack in a layered approach, where
|
It implements the CAIF protocol stack in a layered approach, where
|
||||||
@@ -59,8 +69,11 @@ each layer described in the specification is implemented as a separate layer.
|
|||||||
The architecture is inspired by the design patterns "Protocol Layer" and
|
The architecture is inspired by the design patterns "Protocol Layer" and
|
||||||
"Protocol Packet".
|
"Protocol Packet".
|
||||||
|
|
||||||
== CAIF structure ==
|
CAIF structure
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The Core CAIF implementation contains:
|
The Core CAIF implementation contains:
|
||||||
|
|
||||||
- Simple implementation of CAIF.
|
- Simple implementation of CAIF.
|
||||||
- Layered architecture (a la Streams), each layer in the CAIF
|
- Layered architecture (a la Streams), each layer in the CAIF
|
||||||
specification is implemented in a separate c-file.
|
specification is implemented in a separate c-file.
|
||||||
@@ -73,7 +86,8 @@ The Core CAIF implementation contains:
|
|||||||
to the called function (except for framing layers' receive function)
|
to the called function (except for framing layers' receive function)
|
||||||
|
|
||||||
Layered Architecture
|
Layered Architecture
|
||||||
--------------------
|
====================
|
||||||
|
|
||||||
The CAIF protocol can be divided into two parts: Support functions and Protocol
|
The CAIF protocol can be divided into two parts: Support functions and Protocol
|
||||||
Implementation. The support functions include:
|
Implementation. The support functions include:
|
||||||
|
|
||||||
@@ -112,7 +126,7 @@ The CAIF Protocol implementation contains:
|
|||||||
- CFSERL CAIF Serial layer. Handles concatenation/split of frames
|
- CFSERL CAIF Serial layer. Handles concatenation/split of frames
|
||||||
into CAIF Frames with correct length.
|
into CAIF Frames with correct length.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
+---------+
|
+---------+
|
||||||
| Config |
|
| Config |
|
||||||
@@ -143,18 +157,24 @@ The CAIF Protocol implementation contains:
|
|||||||
|
|
||||||
|
|
||||||
In this layered approach the following "rules" apply.
|
In this layered approach the following "rules" apply.
|
||||||
|
|
||||||
- All layers embed the same structure "struct cflayer"
|
- All layers embed the same structure "struct cflayer"
|
||||||
- A layer does not depend on any other layer's private data.
|
- A layer does not depend on any other layer's private data.
|
||||||
- Layers are stacked by setting the pointers
|
- Layers are stacked by setting the pointers::
|
||||||
|
|
||||||
layer->up , layer->dn
|
layer->up , layer->dn
|
||||||
- In order to send data upwards, each layer should do
|
|
||||||
|
- In order to send data upwards, each layer should do::
|
||||||
|
|
||||||
layer->up->receive(layer->up, packet);
|
layer->up->receive(layer->up, packet);
|
||||||
- In order to send data downwards, each layer should do
|
|
||||||
|
- In order to send data downwards, each layer should do::
|
||||||
|
|
||||||
layer->dn->transmit(layer->dn, packet);
|
layer->dn->transmit(layer->dn, packet);
|
||||||
|
|
||||||
|
|
||||||
CAIF Socket and IP interface
|
CAIF Socket and IP interface
|
||||||
===========================
|
============================
|
||||||
|
|
||||||
The IP interface and CAIF socket API are implemented on top of the
|
The IP interface and CAIF socket API are implemented on top of the
|
||||||
CAIF Core protocol. The IP Interface and CAIF socket have an instance of
|
CAIF Core protocol. The IP Interface and CAIF socket have an instance of
|
229
Documentation/networking/caif/spi_porting.rst
Normal file
229
Documentation/networking/caif/spi_porting.rst
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
================
|
||||||
|
CAIF SPI porting
|
||||||
|
================
|
||||||
|
|
||||||
|
CAIF SPI basics
|
||||||
|
===============
|
||||||
|
|
||||||
|
Running CAIF over SPI needs some extra setup, owing to the nature of SPI.
|
||||||
|
Two extra GPIOs have been added in order to negotiate the transfers
|
||||||
|
between the master and the slave. The minimum requirement for running
|
||||||
|
CAIF over SPI is a SPI slave chip and two GPIOs (more details below).
|
||||||
|
Please note that running as a slave implies that you need to keep up
|
||||||
|
with the master clock. An overrun or underrun event is fatal.
|
||||||
|
|
||||||
|
CAIF SPI framework
|
||||||
|
==================
|
||||||
|
|
||||||
|
To make porting as easy as possible, the CAIF SPI has been divided in
|
||||||
|
two parts. The first part (called the interface part) deals with all
|
||||||
|
generic functionality such as length framing, SPI frame negotiation
|
||||||
|
and SPI frame delivery and transmission. The other part is the CAIF
|
||||||
|
SPI slave device part, which is the module that you have to write if
|
||||||
|
you want to run SPI CAIF on a new hardware. This part takes care of
|
||||||
|
the physical hardware, both with regard to SPI and to GPIOs.
|
||||||
|
|
||||||
|
- Implementing a CAIF SPI device:
|
||||||
|
|
||||||
|
- Functionality provided by the CAIF SPI slave device:
|
||||||
|
|
||||||
|
In order to implement a SPI device you will, as a minimum,
|
||||||
|
need to implement the following
|
||||||
|
functions:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
int (*init_xfer) (struct cfspi_xfer * xfer, struct cfspi_dev *dev):
|
||||||
|
|
||||||
|
This function is called by the CAIF SPI interface to give
|
||||||
|
you a chance to set up your hardware to be ready to receive
|
||||||
|
a stream of data from the master. The xfer structure contains
|
||||||
|
both physical and logical addresses, as well as the total length
|
||||||
|
of the transfer in both directions.The dev parameter can be used
|
||||||
|
to map to different CAIF SPI slave devices.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
void (*sig_xfer) (bool xfer, struct cfspi_dev *dev):
|
||||||
|
|
||||||
|
This function is called by the CAIF SPI interface when the output
|
||||||
|
(SPI_INT) GPIO needs to change state. The boolean value of the xfer
|
||||||
|
variable indicates whether the GPIO should be asserted (HIGH) or
|
||||||
|
deasserted (LOW). The dev parameter can be used to map to different CAIF
|
||||||
|
SPI slave devices.
|
||||||
|
|
||||||
|
- Functionality provided by the CAIF SPI interface:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
void (*ss_cb) (bool assert, struct cfspi_ifc *ifc);
|
||||||
|
|
||||||
|
This function is called by the CAIF SPI slave device in order to
|
||||||
|
signal a change of state of the input GPIO (SS) to the interface.
|
||||||
|
Only active edges are mandatory to be reported.
|
||||||
|
This function can be called from IRQ context (recommended in order
|
||||||
|
not to introduce latency). The ifc parameter should be the pointer
|
||||||
|
returned from the platform probe function in the SPI device structure.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
void (*xfer_done_cb) (struct cfspi_ifc *ifc);
|
||||||
|
|
||||||
|
This function is called by the CAIF SPI slave device in order to
|
||||||
|
report that a transfer is completed. This function should only be
|
||||||
|
called once both the transmission and the reception are completed.
|
||||||
|
This function can be called from IRQ context (recommended in order
|
||||||
|
not to introduce latency). The ifc parameter should be the pointer
|
||||||
|
returned from the platform probe function in the SPI device structure.
|
||||||
|
|
||||||
|
- Connecting the bits and pieces:
|
||||||
|
|
||||||
|
- Filling in the SPI slave device structure:
|
||||||
|
|
||||||
|
Connect the necessary callback functions.
|
||||||
|
|
||||||
|
Indicate clock speed (used to calculate toggle delays).
|
||||||
|
|
||||||
|
Chose a suitable name (helps debugging if you use several CAIF
|
||||||
|
SPI slave devices).
|
||||||
|
|
||||||
|
Assign your private data (can be used to map to your
|
||||||
|
structure).
|
||||||
|
|
||||||
|
- Filling in the SPI slave platform device structure:
|
||||||
|
|
||||||
|
Add name of driver to connect to ("cfspi_sspi").
|
||||||
|
|
||||||
|
Assign the SPI slave device structure as platform data.
|
||||||
|
|
||||||
|
Padding
|
||||||
|
=======
|
||||||
|
|
||||||
|
In order to optimize throughput, a number of SPI padding options are provided.
|
||||||
|
Padding can be enabled independently for uplink and downlink transfers.
|
||||||
|
Padding can be enabled for the head, the tail and for the total frame size.
|
||||||
|
The padding needs to be correctly configured on both sides of the link.
|
||||||
|
The padding can be changed via module parameters in cfspi_sspi.c or via
|
||||||
|
the sysfs directory of the cfspi_sspi driver (before device registration).
|
||||||
|
|
||||||
|
- CAIF SPI device template::
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Copyright (C) ST-Ericsson AB 2010
|
||||||
|
* Author: Daniel Martensson / Daniel.Martensson@stericsson.com
|
||||||
|
* License terms: GNU General Public License (GPL), version 2.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/init.h>
|
||||||
|
#include <linux/module.h>
|
||||||
|
#include <linux/device.h>
|
||||||
|
#include <linux/wait.h>
|
||||||
|
#include <linux/interrupt.h>
|
||||||
|
#include <linux/dma-mapping.h>
|
||||||
|
#include <net/caif/caif_spi.h>
|
||||||
|
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
|
struct sspi_struct {
|
||||||
|
struct cfspi_dev sdev;
|
||||||
|
struct cfspi_xfer *xfer;
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct sspi_struct slave;
|
||||||
|
static struct platform_device slave_device;
|
||||||
|
|
||||||
|
static irqreturn_t sspi_irq(int irq, void *arg)
|
||||||
|
{
|
||||||
|
/* You only need to trigger on an edge to the active state of the
|
||||||
|
* SS signal. Once a edge is detected, the ss_cb() function should be
|
||||||
|
* called with the parameter assert set to true. It is OK
|
||||||
|
* (and even advised) to call the ss_cb() function in IRQ context in
|
||||||
|
* order not to add any delay. */
|
||||||
|
|
||||||
|
return IRQ_HANDLED;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sspi_complete(void *context)
|
||||||
|
{
|
||||||
|
/* Normally the DMA or the SPI framework will call you back
|
||||||
|
* in something similar to this. The only thing you need to
|
||||||
|
* do is to call the xfer_done_cb() function, providing the pointer
|
||||||
|
* to the CAIF SPI interface. It is OK to call this function
|
||||||
|
* from IRQ context. */
|
||||||
|
}
|
||||||
|
|
||||||
|
static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev)
|
||||||
|
{
|
||||||
|
/* Store transfer info. For a normal implementation you should
|
||||||
|
* set up your DMA here and make sure that you are ready to
|
||||||
|
* receive the data from the master SPI. */
|
||||||
|
|
||||||
|
struct sspi_struct *sspi = (struct sspi_struct *)dev->priv;
|
||||||
|
|
||||||
|
sspi->xfer = xfer;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev)
|
||||||
|
{
|
||||||
|
/* If xfer is true then you should assert the SPI_INT to indicate to
|
||||||
|
* the master that you are ready to receive the data from the master
|
||||||
|
* SPI. If xfer is false then you should de-assert SPI_INT to indicate
|
||||||
|
* that the transfer is done.
|
||||||
|
*/
|
||||||
|
|
||||||
|
struct sspi_struct *sspi = (struct sspi_struct *)dev->priv;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void sspi_release(struct device *dev)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
* Here you should release your SPI device resources.
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
|
||||||
|
static int __init sspi_init(void)
|
||||||
|
{
|
||||||
|
/* Here you should initialize your SPI device by providing the
|
||||||
|
* necessary functions, clock speed, name and private data. Once
|
||||||
|
* done, you can register your device with the
|
||||||
|
* platform_device_register() function. This function will return
|
||||||
|
* with the CAIF SPI interface initialized. This is probably also
|
||||||
|
* the place where you should set up your GPIOs, interrupts and SPI
|
||||||
|
* resources. */
|
||||||
|
|
||||||
|
int res = 0;
|
||||||
|
|
||||||
|
/* Initialize slave device. */
|
||||||
|
slave.sdev.init_xfer = sspi_init_xfer;
|
||||||
|
slave.sdev.sig_xfer = sspi_sig_xfer;
|
||||||
|
slave.sdev.clk_mhz = 13;
|
||||||
|
slave.sdev.priv = &slave;
|
||||||
|
slave.sdev.name = "spi_sspi";
|
||||||
|
slave_device.dev.release = sspi_release;
|
||||||
|
|
||||||
|
/* Initialize platform device. */
|
||||||
|
slave_device.name = "cfspi_sspi";
|
||||||
|
slave_device.dev.platform_data = &slave.sdev;
|
||||||
|
|
||||||
|
/* Register platform device. */
|
||||||
|
res = platform_device_register(&slave_device);
|
||||||
|
if (res) {
|
||||||
|
printk(KERN_WARNING "sspi_init: failed to register dev.\n");
|
||||||
|
return -ENODEV;
|
||||||
|
}
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void __exit sspi_exit(void)
|
||||||
|
{
|
||||||
|
platform_device_del(&slave_device);
|
||||||
|
}
|
||||||
|
|
||||||
|
module_init(sspi_init);
|
||||||
|
module_exit(sspi_exit);
|
@@ -1,208 +0,0 @@
|
|||||||
- CAIF SPI porting -
|
|
||||||
|
|
||||||
- CAIF SPI basics:
|
|
||||||
|
|
||||||
Running CAIF over SPI needs some extra setup, owing to the nature of SPI.
|
|
||||||
Two extra GPIOs have been added in order to negotiate the transfers
|
|
||||||
between the master and the slave. The minimum requirement for running
|
|
||||||
CAIF over SPI is a SPI slave chip and two GPIOs (more details below).
|
|
||||||
Please note that running as a slave implies that you need to keep up
|
|
||||||
with the master clock. An overrun or underrun event is fatal.
|
|
||||||
|
|
||||||
- CAIF SPI framework:
|
|
||||||
|
|
||||||
To make porting as easy as possible, the CAIF SPI has been divided in
|
|
||||||
two parts. The first part (called the interface part) deals with all
|
|
||||||
generic functionality such as length framing, SPI frame negotiation
|
|
||||||
and SPI frame delivery and transmission. The other part is the CAIF
|
|
||||||
SPI slave device part, which is the module that you have to write if
|
|
||||||
you want to run SPI CAIF on a new hardware. This part takes care of
|
|
||||||
the physical hardware, both with regard to SPI and to GPIOs.
|
|
||||||
|
|
||||||
- Implementing a CAIF SPI device:
|
|
||||||
|
|
||||||
- Functionality provided by the CAIF SPI slave device:
|
|
||||||
|
|
||||||
In order to implement a SPI device you will, as a minimum,
|
|
||||||
need to implement the following
|
|
||||||
functions:
|
|
||||||
|
|
||||||
int (*init_xfer) (struct cfspi_xfer * xfer, struct cfspi_dev *dev):
|
|
||||||
|
|
||||||
This function is called by the CAIF SPI interface to give
|
|
||||||
you a chance to set up your hardware to be ready to receive
|
|
||||||
a stream of data from the master. The xfer structure contains
|
|
||||||
both physical and logical addresses, as well as the total length
|
|
||||||
of the transfer in both directions.The dev parameter can be used
|
|
||||||
to map to different CAIF SPI slave devices.
|
|
||||||
|
|
||||||
void (*sig_xfer) (bool xfer, struct cfspi_dev *dev):
|
|
||||||
|
|
||||||
This function is called by the CAIF SPI interface when the output
|
|
||||||
(SPI_INT) GPIO needs to change state. The boolean value of the xfer
|
|
||||||
variable indicates whether the GPIO should be asserted (HIGH) or
|
|
||||||
deasserted (LOW). The dev parameter can be used to map to different CAIF
|
|
||||||
SPI slave devices.
|
|
||||||
|
|
||||||
- Functionality provided by the CAIF SPI interface:
|
|
||||||
|
|
||||||
void (*ss_cb) (bool assert, struct cfspi_ifc *ifc);
|
|
||||||
|
|
||||||
This function is called by the CAIF SPI slave device in order to
|
|
||||||
signal a change of state of the input GPIO (SS) to the interface.
|
|
||||||
Only active edges are mandatory to be reported.
|
|
||||||
This function can be called from IRQ context (recommended in order
|
|
||||||
not to introduce latency). The ifc parameter should be the pointer
|
|
||||||
returned from the platform probe function in the SPI device structure.
|
|
||||||
|
|
||||||
void (*xfer_done_cb) (struct cfspi_ifc *ifc);
|
|
||||||
|
|
||||||
This function is called by the CAIF SPI slave device in order to
|
|
||||||
report that a transfer is completed. This function should only be
|
|
||||||
called once both the transmission and the reception are completed.
|
|
||||||
This function can be called from IRQ context (recommended in order
|
|
||||||
not to introduce latency). The ifc parameter should be the pointer
|
|
||||||
returned from the platform probe function in the SPI device structure.
|
|
||||||
|
|
||||||
- Connecting the bits and pieces:
|
|
||||||
|
|
||||||
- Filling in the SPI slave device structure:
|
|
||||||
|
|
||||||
Connect the necessary callback functions.
|
|
||||||
Indicate clock speed (used to calculate toggle delays).
|
|
||||||
Chose a suitable name (helps debugging if you use several CAIF
|
|
||||||
SPI slave devices).
|
|
||||||
Assign your private data (can be used to map to your structure).
|
|
||||||
|
|
||||||
- Filling in the SPI slave platform device structure:
|
|
||||||
Add name of driver to connect to ("cfspi_sspi").
|
|
||||||
Assign the SPI slave device structure as platform data.
|
|
||||||
|
|
||||||
- Padding:
|
|
||||||
|
|
||||||
In order to optimize throughput, a number of SPI padding options are provided.
|
|
||||||
Padding can be enabled independently for uplink and downlink transfers.
|
|
||||||
Padding can be enabled for the head, the tail and for the total frame size.
|
|
||||||
The padding needs to be correctly configured on both sides of the link.
|
|
||||||
The padding can be changed via module parameters in cfspi_sspi.c or via
|
|
||||||
the sysfs directory of the cfspi_sspi driver (before device registration).
|
|
||||||
|
|
||||||
- CAIF SPI device template:
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright (C) ST-Ericsson AB 2010
|
|
||||||
* Author: Daniel Martensson / Daniel.Martensson@stericsson.com
|
|
||||||
* License terms: GNU General Public License (GPL), version 2.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/module.h>
|
|
||||||
#include <linux/device.h>
|
|
||||||
#include <linux/wait.h>
|
|
||||||
#include <linux/interrupt.h>
|
|
||||||
#include <linux/dma-mapping.h>
|
|
||||||
#include <net/caif/caif_spi.h>
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
|
|
||||||
struct sspi_struct {
|
|
||||||
struct cfspi_dev sdev;
|
|
||||||
struct cfspi_xfer *xfer;
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct sspi_struct slave;
|
|
||||||
static struct platform_device slave_device;
|
|
||||||
|
|
||||||
static irqreturn_t sspi_irq(int irq, void *arg)
|
|
||||||
{
|
|
||||||
/* You only need to trigger on an edge to the active state of the
|
|
||||||
* SS signal. Once a edge is detected, the ss_cb() function should be
|
|
||||||
* called with the parameter assert set to true. It is OK
|
|
||||||
* (and even advised) to call the ss_cb() function in IRQ context in
|
|
||||||
* order not to add any delay. */
|
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void sspi_complete(void *context)
|
|
||||||
{
|
|
||||||
/* Normally the DMA or the SPI framework will call you back
|
|
||||||
* in something similar to this. The only thing you need to
|
|
||||||
* do is to call the xfer_done_cb() function, providing the pointer
|
|
||||||
* to the CAIF SPI interface. It is OK to call this function
|
|
||||||
* from IRQ context. */
|
|
||||||
}
|
|
||||||
|
|
||||||
static int sspi_init_xfer(struct cfspi_xfer *xfer, struct cfspi_dev *dev)
|
|
||||||
{
|
|
||||||
/* Store transfer info. For a normal implementation you should
|
|
||||||
* set up your DMA here and make sure that you are ready to
|
|
||||||
* receive the data from the master SPI. */
|
|
||||||
|
|
||||||
struct sspi_struct *sspi = (struct sspi_struct *)dev->priv;
|
|
||||||
|
|
||||||
sspi->xfer = xfer;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void sspi_sig_xfer(bool xfer, struct cfspi_dev *dev)
|
|
||||||
{
|
|
||||||
/* If xfer is true then you should assert the SPI_INT to indicate to
|
|
||||||
* the master that you are ready to receive the data from the master
|
|
||||||
* SPI. If xfer is false then you should de-assert SPI_INT to indicate
|
|
||||||
* that the transfer is done.
|
|
||||||
*/
|
|
||||||
|
|
||||||
struct sspi_struct *sspi = (struct sspi_struct *)dev->priv;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void sspi_release(struct device *dev)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Here you should release your SPI device resources.
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
static int __init sspi_init(void)
|
|
||||||
{
|
|
||||||
/* Here you should initialize your SPI device by providing the
|
|
||||||
* necessary functions, clock speed, name and private data. Once
|
|
||||||
* done, you can register your device with the
|
|
||||||
* platform_device_register() function. This function will return
|
|
||||||
* with the CAIF SPI interface initialized. This is probably also
|
|
||||||
* the place where you should set up your GPIOs, interrupts and SPI
|
|
||||||
* resources. */
|
|
||||||
|
|
||||||
int res = 0;
|
|
||||||
|
|
||||||
/* Initialize slave device. */
|
|
||||||
slave.sdev.init_xfer = sspi_init_xfer;
|
|
||||||
slave.sdev.sig_xfer = sspi_sig_xfer;
|
|
||||||
slave.sdev.clk_mhz = 13;
|
|
||||||
slave.sdev.priv = &slave;
|
|
||||||
slave.sdev.name = "spi_sspi";
|
|
||||||
slave_device.dev.release = sspi_release;
|
|
||||||
|
|
||||||
/* Initialize platform device. */
|
|
||||||
slave_device.name = "cfspi_sspi";
|
|
||||||
slave_device.dev.platform_data = &slave.sdev;
|
|
||||||
|
|
||||||
/* Register platform device. */
|
|
||||||
res = platform_device_register(&slave_device);
|
|
||||||
if (res) {
|
|
||||||
printk(KERN_WARNING "sspi_init: failed to register dev.\n");
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit sspi_exit(void)
|
|
||||||
{
|
|
||||||
platform_device_del(&slave_device);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(sspi_init);
|
|
||||||
module_exit(sspi_exit);
|
|
@@ -1058,7 +1058,7 @@ drivers you mainly have to deal with:
|
|||||||
- TX: Put the CAN frame from the socket buffer to the CAN controller.
|
- TX: Put the CAN frame from the socket buffer to the CAN controller.
|
||||||
- RX: Put the CAN frame from the CAN controller to the socket buffer.
|
- RX: Put the CAN frame from the CAN controller to the socket buffer.
|
||||||
|
|
||||||
See e.g. at Documentation/networking/netdevices.txt . The differences
|
See e.g. at Documentation/networking/netdevices.rst . The differences
|
||||||
for writing CAN network device driver are described below:
|
for writing CAN network device driver are described below:
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
cdc_mbim - Driver for CDC MBIM Mobile Broadband modems
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
========================================================
|
|
||||||
|
======================================================
|
||||||
|
cdc_mbim - Driver for CDC MBIM Mobile Broadband modems
|
||||||
|
======================================================
|
||||||
|
|
||||||
The cdc_mbim driver supports USB devices conforming to the "Universal
|
The cdc_mbim driver supports USB devices conforming to the "Universal
|
||||||
Serial Bus Communications Class Subclass Specification for Mobile
|
Serial Bus Communications Class Subclass Specification for Mobile
|
||||||
@@ -19,9 +22,9 @@ by a cdc_ncm driver parameter:
|
|||||||
|
|
||||||
prefer_mbim
|
prefer_mbim
|
||||||
-----------
|
-----------
|
||||||
Type: Boolean
|
:Type: Boolean
|
||||||
Valid Range: N/Y (0-1)
|
:Valid Range: N/Y (0-1)
|
||||||
Default Value: Y (MBIM is preferred)
|
:Default Value: Y (MBIM is preferred)
|
||||||
|
|
||||||
This parameter sets the system policy for NCM/MBIM functions. Such
|
This parameter sets the system policy for NCM/MBIM functions. Such
|
||||||
functions will be handled by either the cdc_ncm driver or the cdc_mbim
|
functions will be handled by either the cdc_ncm driver or the cdc_mbim
|
||||||
@@ -44,11 +47,13 @@ userspace MBIM management application always is required to enable a
|
|||||||
MBIM function.
|
MBIM function.
|
||||||
|
|
||||||
Such userspace applications includes, but are not limited to:
|
Such userspace applications includes, but are not limited to:
|
||||||
|
|
||||||
- mbimcli (included with the libmbim [3] library), and
|
- mbimcli (included with the libmbim [3] library), and
|
||||||
- ModemManager [4]
|
- ModemManager [4]
|
||||||
|
|
||||||
Establishing a MBIM IP session reequires at least these actions by the
|
Establishing a MBIM IP session reequires at least these actions by the
|
||||||
management application:
|
management application:
|
||||||
|
|
||||||
- open the control channel
|
- open the control channel
|
||||||
- configure network connection settings
|
- configure network connection settings
|
||||||
- connect to network
|
- connect to network
|
||||||
@@ -76,7 +81,7 @@ complies with all the control channel requirements in [1].
|
|||||||
|
|
||||||
The cdc-wdmX device is created as a child of the MBIM control
|
The cdc-wdmX device is created as a child of the MBIM control
|
||||||
interface USB device. The character device associated with a specific
|
interface USB device. The character device associated with a specific
|
||||||
MBIM function can be looked up using sysfs. For example:
|
MBIM function can be looked up using sysfs. For example::
|
||||||
|
|
||||||
bjorn@nemi:~$ ls /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc
|
bjorn@nemi:~$ ls /sys/bus/usb/drivers/cdc_mbim/2-4:2.12/usbmisc
|
||||||
cdc-wdm0
|
cdc-wdm0
|
||||||
@@ -119,13 +124,15 @@ negotiated control message size.
|
|||||||
|
|
||||||
|
|
||||||
/dev/cdc-wdmX ioctl()
|
/dev/cdc-wdmX ioctl()
|
||||||
--------------------
|
---------------------
|
||||||
IOCTL_WDM_MAX_COMMAND: Get Maximum Command Size
|
IOCTL_WDM_MAX_COMMAND: Get Maximum Command Size
|
||||||
This ioctl returns the wMaxControlMessage field of the CDC MBIM
|
This ioctl returns the wMaxControlMessage field of the CDC MBIM
|
||||||
functional descriptor for MBIM devices. This is intended as a
|
functional descriptor for MBIM devices. This is intended as a
|
||||||
convenience, eliminating the need to parse the USB descriptors from
|
convenience, eliminating the need to parse the USB descriptors from
|
||||||
userspace.
|
userspace.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
@@ -178,7 +185,7 @@ VLAN links prior to establishing MBIM IP sessions where the SessionId
|
|||||||
is greater than 0. These links can be added by using the normal VLAN
|
is greater than 0. These links can be added by using the normal VLAN
|
||||||
kernel interfaces, either ioctl or netlink.
|
kernel interfaces, either ioctl or netlink.
|
||||||
|
|
||||||
For example, adding a link for a MBIM IP session with SessionId 3:
|
For example, adding a link for a MBIM IP session with SessionId 3::
|
||||||
|
|
||||||
ip link add link wwan0 name wwan0.3 type vlan id 3
|
ip link add link wwan0 name wwan0.3 type vlan id 3
|
||||||
|
|
||||||
@@ -207,6 +214,7 @@ the stream to the end user in an appropriate way for the stream type.
|
|||||||
The network device ABI requires a dummy ethernet header for every DSS
|
The network device ABI requires a dummy ethernet header for every DSS
|
||||||
data frame being transported. The contents of this header is
|
data frame being transported. The contents of this header is
|
||||||
arbitrary, with the following exceptions:
|
arbitrary, with the following exceptions:
|
||||||
|
|
||||||
- TX frames using an IP protocol (0x0800 or 0x86dd) will be dropped
|
- TX frames using an IP protocol (0x0800 or 0x86dd) will be dropped
|
||||||
- RX frames will have the protocol field set to ETH_P_802_3 (but will
|
- RX frames will have the protocol field set to ETH_P_802_3 (but will
|
||||||
not be properly formatted 802.3 frames)
|
not be properly formatted 802.3 frames)
|
||||||
@@ -218,7 +226,7 @@ adding the dummy ethernet header on TX and stripping it on RX.
|
|||||||
|
|
||||||
This is a simple example using tools commonly available, exporting
|
This is a simple example using tools commonly available, exporting
|
||||||
DssSessionId 5 as a pty character device pointed to by a /dev/nmea
|
DssSessionId 5 as a pty character device pointed to by a /dev/nmea
|
||||||
symlink:
|
symlink::
|
||||||
|
|
||||||
ip link add link wwan0 name wwan0.dss5 type vlan id 261
|
ip link add link wwan0 name wwan0.dss5 type vlan id 261
|
||||||
ip link set dev wwan0.dss5 up
|
ip link set dev wwan0.dss5 up
|
||||||
@@ -236,7 +244,7 @@ map frames to the correct DSS session and adding 18 byte VLAN ethernet
|
|||||||
headers with the appropriate tag on TX. In this case using a socket
|
headers with the appropriate tag on TX. In this case using a socket
|
||||||
filter is recommended, matching only the DSS VLAN subset. This avoid
|
filter is recommended, matching only the DSS VLAN subset. This avoid
|
||||||
unnecessary copying of unrelated IP session data to userspace. For
|
unnecessary copying of unrelated IP session data to userspace. For
|
||||||
example:
|
example::
|
||||||
|
|
||||||
static struct sock_filter dssfilter[] = {
|
static struct sock_filter dssfilter[] = {
|
||||||
/* use special negative offsets to get VLAN tag */
|
/* use special negative offsets to get VLAN tag */
|
||||||
@@ -266,6 +274,7 @@ network device.
|
|||||||
|
|
||||||
This mapping implies a few restrictions on multiplexed IPS and DSS
|
This mapping implies a few restrictions on multiplexed IPS and DSS
|
||||||
sessions, which may not always be practical:
|
sessions, which may not always be practical:
|
||||||
|
|
||||||
- no IPS or DSS session can use a frame size greater than the MTU on
|
- no IPS or DSS session can use a frame size greater than the MTU on
|
||||||
IP session 0
|
IP session 0
|
||||||
- no IPS or DSS session can be in the up state unless the network
|
- no IPS or DSS session can be in the up state unless the network
|
||||||
@@ -280,7 +289,7 @@ device.
|
|||||||
|
|
||||||
Tip: It might be less confusing to the end user to name this VLAN
|
Tip: It might be less confusing to the end user to name this VLAN
|
||||||
subdevice after the MBIM SessionID instead of the VLAN ID. For
|
subdevice after the MBIM SessionID instead of the VLAN ID. For
|
||||||
example:
|
example::
|
||||||
|
|
||||||
ip link add link wwan0 name wwan0.0 type vlan id 4094
|
ip link add link wwan0 name wwan0.0 type vlan id 4094
|
||||||
|
|
||||||
@@ -290,7 +299,7 @@ VLAN mapping
|
|||||||
|
|
||||||
Summarizing the cdc_mbim driver mapping described above, we have this
|
Summarizing the cdc_mbim driver mapping described above, we have this
|
||||||
relationship between VLAN tags on the wwanY network device and MBIM
|
relationship between VLAN tags on the wwanY network device and MBIM
|
||||||
sessions on the shared USB data channel:
|
sessions on the shared USB data channel::
|
||||||
|
|
||||||
VLAN ID MBIM type MBIM SessionID Notes
|
VLAN ID MBIM type MBIM SessionID Notes
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
@@ -310,30 +319,37 @@ sessions on the shared USB data channel:
|
|||||||
References
|
References
|
||||||
==========
|
==========
|
||||||
|
|
||||||
[1] USB Implementers Forum, Inc. - "Universal Serial Bus
|
1) USB Implementers Forum, Inc. - "Universal Serial Bus
|
||||||
Communications Class Subclass Specification for Mobile Broadband
|
Communications Class Subclass Specification for Mobile Broadband
|
||||||
Interface Model", Revision 1.0 (Errata 1), May 1, 2013
|
Interface Model", Revision 1.0 (Errata 1), May 1, 2013
|
||||||
|
|
||||||
- http://www.usb.org/developers/docs/devclass_docs/
|
- http://www.usb.org/developers/docs/devclass_docs/
|
||||||
|
|
||||||
[2] USB Implementers Forum, Inc. - "Universal Serial Bus
|
2) USB Implementers Forum, Inc. - "Universal Serial Bus
|
||||||
Communications Class Subclass Specifications for Network Control
|
Communications Class Subclass Specifications for Network Control
|
||||||
Model Devices", Revision 1.0 (Errata 1), November 24, 2010
|
Model Devices", Revision 1.0 (Errata 1), November 24, 2010
|
||||||
|
|
||||||
- http://www.usb.org/developers/docs/devclass_docs/
|
- http://www.usb.org/developers/docs/devclass_docs/
|
||||||
|
|
||||||
[3] libmbim - "a glib-based library for talking to WWAN modems and
|
3) libmbim - "a glib-based library for talking to WWAN modems and
|
||||||
devices which speak the Mobile Interface Broadband Model (MBIM)
|
devices which speak the Mobile Interface Broadband Model (MBIM)
|
||||||
protocol"
|
protocol"
|
||||||
|
|
||||||
- http://www.freedesktop.org/wiki/Software/libmbim/
|
- http://www.freedesktop.org/wiki/Software/libmbim/
|
||||||
|
|
||||||
[4] ModemManager - "a DBus-activated daemon which controls mobile
|
4) ModemManager - "a DBus-activated daemon which controls mobile
|
||||||
broadband (2G/3G/4G) devices and connections"
|
broadband (2G/3G/4G) devices and connections"
|
||||||
|
|
||||||
- http://www.freedesktop.org/wiki/Software/ModemManager/
|
- http://www.freedesktop.org/wiki/Software/ModemManager/
|
||||||
|
|
||||||
[5] "MBIM (Mobile Broadband Interface Model) Registry"
|
5) "MBIM (Mobile Broadband Interface Model) Registry"
|
||||||
|
|
||||||
- http://compliance.usb.org/mbim/
|
- http://compliance.usb.org/mbim/
|
||||||
|
|
||||||
[6] "/sys/kernel/debug/usb/devices output format"
|
6) "/sys/kernel/debug/usb/devices output format"
|
||||||
|
|
||||||
- Documentation/driver-api/usb/usb.rst
|
- Documentation/driver-api/usb/usb.rst
|
||||||
|
|
||||||
[7] "/sys/bus/usb/devices/.../descriptors"
|
7) "/sys/bus/usb/devices/.../descriptors"
|
||||||
|
|
||||||
- Documentation/ABI/stable/sysfs-bus-usb
|
- Documentation/ABI/stable/sysfs-bus-usb
|
@@ -59,7 +59,7 @@ recomputed for each resulting segment. See the skbuff.h comment (section 'E')
|
|||||||
for more details.
|
for more details.
|
||||||
|
|
||||||
A driver declares its offload capabilities in netdev->hw_features; see
|
A driver declares its offload capabilities in netdev->hw_features; see
|
||||||
Documentation/networking/netdev-features.txt for more. Note that a device
|
Documentation/networking/netdev-features.rst for more. Note that a device
|
||||||
which only advertises NETIF_F_IP[V6]_CSUM must still obey the csum_start and
|
which only advertises NETIF_F_IP[V6]_CSUM must still obey the csum_start and
|
||||||
csum_offset given in the SKB; if it tries to deduce these itself in hardware
|
csum_offset given in the SKB; if it tries to deduce these itself in hardware
|
||||||
(as some NICs do) the driver should check that the values in the SKB match
|
(as some NICs do) the driver should check that the values in the SKB match
|
||||||
|
80
Documentation/networking/cops.rst
Normal file
80
Documentation/networking/cops.rst
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
========================================
|
||||||
|
The COPS LocalTalk Linux driver (cops.c)
|
||||||
|
========================================
|
||||||
|
|
||||||
|
By Jay Schulist <jschlst@samba.org>
|
||||||
|
|
||||||
|
This driver has two modes and they are: Dayna mode and Tangent mode.
|
||||||
|
Each mode corresponds with the type of card. It has been found
|
||||||
|
that there are 2 main types of cards and all other cards are
|
||||||
|
the same and just have different names or only have minor differences
|
||||||
|
such as more IO ports. As this driver is tested it will
|
||||||
|
become more clear exactly what cards are supported.
|
||||||
|
|
||||||
|
Right now these cards are known to work with the COPS driver. The
|
||||||
|
LT-200 cards work in a somewhat more limited capacity than the
|
||||||
|
DL200 cards, which work very well and are in use by many people.
|
||||||
|
|
||||||
|
TANGENT driver mode:
|
||||||
|
- Tangent ATB-II, Novell NL-1000, Daystar Digital LT-200
|
||||||
|
|
||||||
|
DAYNA driver mode:
|
||||||
|
- Dayna DL2000/DaynaTalk PC (Half Length), COPS LT-95,
|
||||||
|
- Farallon PhoneNET PC III, Farallon PhoneNET PC II
|
||||||
|
|
||||||
|
Other cards possibly supported mode unknown though:
|
||||||
|
- Dayna DL2000 (Full length)
|
||||||
|
|
||||||
|
The COPS driver defaults to using Dayna mode. To change the driver's
|
||||||
|
mode if you built a driver with dual support use board_type=1 or
|
||||||
|
board_type=2 for Dayna or Tangent with insmod.
|
||||||
|
|
||||||
|
Operation/loading of the driver
|
||||||
|
===============================
|
||||||
|
|
||||||
|
Use modprobe like this: /sbin/modprobe cops.o (IO #) (IRQ #)
|
||||||
|
If you do not specify any options the driver will try and use the IO = 0x240,
|
||||||
|
IRQ = 5. As of right now I would only use IRQ 5 for the card, if autoprobing.
|
||||||
|
|
||||||
|
To load multiple COPS driver Localtalk cards you can do one of the following::
|
||||||
|
|
||||||
|
insmod cops io=0x240 irq=5
|
||||||
|
insmod -o cops2 cops io=0x260 irq=3
|
||||||
|
|
||||||
|
Or in lilo.conf put something like this::
|
||||||
|
|
||||||
|
append="ether=5,0x240,lt0 ether=3,0x260,lt1"
|
||||||
|
|
||||||
|
Then bring up the interface with ifconfig. It will look something like this::
|
||||||
|
|
||||||
|
lt0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-F7-00-00-00-00-00-00-00-00
|
||||||
|
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
|
||||||
|
UP BROADCAST RUNNING NOARP MULTICAST MTU:600 Metric:1
|
||||||
|
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
|
||||||
|
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0
|
||||||
|
|
||||||
|
Netatalk Configuration
|
||||||
|
======================
|
||||||
|
|
||||||
|
You will need to configure atalkd with something like the following to make
|
||||||
|
it work with the cops.c driver.
|
||||||
|
|
||||||
|
* For single LTalk card use::
|
||||||
|
|
||||||
|
dummy -seed -phase 2 -net 2000 -addr 2000.10 -zone "1033"
|
||||||
|
lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033"
|
||||||
|
|
||||||
|
* For multiple cards, Ethernet and LocalTalk::
|
||||||
|
|
||||||
|
eth0 -seed -phase 2 -net 3000 -addr 3000.20 -zone "1033"
|
||||||
|
lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033"
|
||||||
|
|
||||||
|
* For multiple LocalTalk cards, and an Ethernet card.
|
||||||
|
|
||||||
|
* Order seems to matter here, Ethernet last::
|
||||||
|
|
||||||
|
lt0 -seed -phase 1 -net 1000 -addr 1000.10 -zone "LocalTalk1"
|
||||||
|
lt1 -seed -phase 1 -net 2000 -addr 2000.20 -zone "LocalTalk2"
|
||||||
|
eth0 -seed -phase 2 -net 3000 -addr 3000.30 -zone "EtherTalk"
|
@@ -1,63 +0,0 @@
|
|||||||
Text File for the COPS LocalTalk Linux driver (cops.c).
|
|
||||||
By Jay Schulist <jschlst@samba.org>
|
|
||||||
|
|
||||||
This driver has two modes and they are: Dayna mode and Tangent mode.
|
|
||||||
Each mode corresponds with the type of card. It has been found
|
|
||||||
that there are 2 main types of cards and all other cards are
|
|
||||||
the same and just have different names or only have minor differences
|
|
||||||
such as more IO ports. As this driver is tested it will
|
|
||||||
become more clear exactly what cards are supported.
|
|
||||||
|
|
||||||
Right now these cards are known to work with the COPS driver. The
|
|
||||||
LT-200 cards work in a somewhat more limited capacity than the
|
|
||||||
DL200 cards, which work very well and are in use by many people.
|
|
||||||
|
|
||||||
TANGENT driver mode:
|
|
||||||
Tangent ATB-II, Novell NL-1000, Daystar Digital LT-200
|
|
||||||
DAYNA driver mode:
|
|
||||||
Dayna DL2000/DaynaTalk PC (Half Length), COPS LT-95,
|
|
||||||
Farallon PhoneNET PC III, Farallon PhoneNET PC II
|
|
||||||
Other cards possibly supported mode unknown though:
|
|
||||||
Dayna DL2000 (Full length)
|
|
||||||
|
|
||||||
The COPS driver defaults to using Dayna mode. To change the driver's
|
|
||||||
mode if you built a driver with dual support use board_type=1 or
|
|
||||||
board_type=2 for Dayna or Tangent with insmod.
|
|
||||||
|
|
||||||
** Operation/loading of the driver.
|
|
||||||
Use modprobe like this: /sbin/modprobe cops.o (IO #) (IRQ #)
|
|
||||||
If you do not specify any options the driver will try and use the IO = 0x240,
|
|
||||||
IRQ = 5. As of right now I would only use IRQ 5 for the card, if autoprobing.
|
|
||||||
|
|
||||||
To load multiple COPS driver Localtalk cards you can do one of the following.
|
|
||||||
|
|
||||||
insmod cops io=0x240 irq=5
|
|
||||||
insmod -o cops2 cops io=0x260 irq=3
|
|
||||||
|
|
||||||
Or in lilo.conf put something like this:
|
|
||||||
append="ether=5,0x240,lt0 ether=3,0x260,lt1"
|
|
||||||
|
|
||||||
Then bring up the interface with ifconfig. It will look something like this:
|
|
||||||
lt0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-F7-00-00-00-00-00-00-00-00
|
|
||||||
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
|
|
||||||
UP BROADCAST RUNNING NOARP MULTICAST MTU:600 Metric:1
|
|
||||||
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
|
|
||||||
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 coll:0
|
|
||||||
|
|
||||||
** Netatalk Configuration
|
|
||||||
You will need to configure atalkd with something like the following to make
|
|
||||||
it work with the cops.c driver.
|
|
||||||
|
|
||||||
* For single LTalk card use.
|
|
||||||
dummy -seed -phase 2 -net 2000 -addr 2000.10 -zone "1033"
|
|
||||||
lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033"
|
|
||||||
|
|
||||||
* For multiple cards, Ethernet and LocalTalk.
|
|
||||||
eth0 -seed -phase 2 -net 3000 -addr 3000.20 -zone "1033"
|
|
||||||
lt0 -seed -phase 1 -net 1000 -addr 1000.50 -zone "1033"
|
|
||||||
|
|
||||||
* For multiple LocalTalk cards, and an Ethernet card.
|
|
||||||
* Order seems to matter here, Ethernet last.
|
|
||||||
lt0 -seed -phase 1 -net 1000 -addr 1000.10 -zone "LocalTalk1"
|
|
||||||
lt1 -seed -phase 1 -net 2000 -addr 2000.20 -zone "LocalTalk2"
|
|
||||||
eth0 -seed -phase 2 -net 3000 -addr 3000.30 -zone "EtherTalk"
|
|
@@ -1,3 +1,9 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
========================
|
||||||
|
ATM cxacru device driver
|
||||||
|
========================
|
||||||
|
|
||||||
Firmware is required for this device: http://accessrunner.sourceforge.net/
|
Firmware is required for this device: http://accessrunner.sourceforge.net/
|
||||||
|
|
||||||
While it is capable of managing/maintaining the ADSL connection without the
|
While it is capable of managing/maintaining the ADSL connection without the
|
||||||
@@ -19,14 +25,18 @@ several sysfs attribute files for retrieving device statistics:
|
|||||||
|
|
||||||
* adsl_headend
|
* adsl_headend
|
||||||
* adsl_headend_environment
|
* adsl_headend_environment
|
||||||
Information about the remote headend.
|
|
||||||
|
- Information about the remote headend.
|
||||||
|
|
||||||
* adsl_config
|
* adsl_config
|
||||||
Configuration writing interface.
|
|
||||||
Write parameters in hexadecimal format <index>=<value>,
|
- Configuration writing interface.
|
||||||
|
- Write parameters in hexadecimal format <index>=<value>,
|
||||||
separated by whitespace, e.g.:
|
separated by whitespace, e.g.:
|
||||||
|
|
||||||
"1=0 a=5"
|
"1=0 a=5"
|
||||||
Up to 7 parameters at a time will be sent and the modem will restart
|
|
||||||
|
- Up to 7 parameters at a time will be sent and the modem will restart
|
||||||
the ADSL connection when any value is set. These are logged for future
|
the ADSL connection when any value is set. These are logged for future
|
||||||
reference.
|
reference.
|
||||||
|
|
||||||
@@ -34,14 +44,16 @@ several sysfs attribute files for retrieving device statistics:
|
|||||||
* downstream_bits_per_frame
|
* downstream_bits_per_frame
|
||||||
* downstream_rate (kbps)
|
* downstream_rate (kbps)
|
||||||
* downstream_snr_margin (dB)
|
* downstream_snr_margin (dB)
|
||||||
Downstream stats.
|
|
||||||
|
- Downstream stats.
|
||||||
|
|
||||||
* upstream_attenuation (dB)
|
* upstream_attenuation (dB)
|
||||||
* upstream_bits_per_frame
|
* upstream_bits_per_frame
|
||||||
* upstream_rate (kbps)
|
* upstream_rate (kbps)
|
||||||
* upstream_snr_margin (dB)
|
* upstream_snr_margin (dB)
|
||||||
* transmitter_power (dBm/Hz)
|
* transmitter_power (dBm/Hz)
|
||||||
Upstream stats.
|
|
||||||
|
- Upstream stats.
|
||||||
|
|
||||||
* downstream_crc_errors
|
* downstream_crc_errors
|
||||||
* downstream_fec_errors
|
* downstream_fec_errors
|
||||||
@@ -49,48 +61,56 @@ several sysfs attribute files for retrieving device statistics:
|
|||||||
* upstream_crc_errors
|
* upstream_crc_errors
|
||||||
* upstream_fec_errors
|
* upstream_fec_errors
|
||||||
* upstream_hec_errors
|
* upstream_hec_errors
|
||||||
Error counts.
|
|
||||||
|
- Error counts.
|
||||||
|
|
||||||
* line_startable
|
* line_startable
|
||||||
Indicates that ADSL support on the device
|
|
||||||
|
- Indicates that ADSL support on the device
|
||||||
is/can be enabled, see adsl_start.
|
is/can be enabled, see adsl_start.
|
||||||
|
|
||||||
* line_status
|
* line_status
|
||||||
"initialising"
|
|
||||||
"down"
|
- "initialising"
|
||||||
"attempting to activate"
|
- "down"
|
||||||
"training"
|
- "attempting to activate"
|
||||||
"channel analysis"
|
- "training"
|
||||||
"exchange"
|
- "channel analysis"
|
||||||
"waiting"
|
- "exchange"
|
||||||
"up"
|
- "waiting"
|
||||||
|
- "up"
|
||||||
|
|
||||||
Changes between "down" and "attempting to activate"
|
Changes between "down" and "attempting to activate"
|
||||||
if there is no signal.
|
if there is no signal.
|
||||||
|
|
||||||
* link_status
|
* link_status
|
||||||
"not connected"
|
|
||||||
"connected"
|
- "not connected"
|
||||||
"lost"
|
- "connected"
|
||||||
|
- "lost"
|
||||||
|
|
||||||
* mac_address
|
* mac_address
|
||||||
|
|
||||||
* modulation
|
* modulation
|
||||||
"" (when not connected)
|
|
||||||
"ANSI T1.413"
|
- "" (when not connected)
|
||||||
"ITU-T G.992.1 (G.DMT)"
|
- "ANSI T1.413"
|
||||||
"ITU-T G.992.2 (G.LITE)"
|
- "ITU-T G.992.1 (G.DMT)"
|
||||||
|
- "ITU-T G.992.2 (G.LITE)"
|
||||||
|
|
||||||
* startup_attempts
|
* startup_attempts
|
||||||
Count of total attempts to initialise ADSL.
|
|
||||||
|
- Count of total attempts to initialise ADSL.
|
||||||
|
|
||||||
To enable/disable ADSL, the following can be written to the adsl_state file:
|
To enable/disable ADSL, the following can be written to the adsl_state file:
|
||||||
"start"
|
|
||||||
"stop
|
|
||||||
"restart" (stops, waits 1.5s, then starts)
|
|
||||||
"poll" (used to resume status polling if it was disabled due to failure)
|
|
||||||
|
|
||||||
Changes in adsl/line state are reported via kernel log messages:
|
- "start"
|
||||||
|
- "stop
|
||||||
|
- "restart" (stops, waits 1.5s, then starts)
|
||||||
|
- "poll" (used to resume status polling if it was disabled due to failure)
|
||||||
|
|
||||||
|
Changes in adsl/line state are reported via kernel log messages::
|
||||||
|
|
||||||
[4942145.150704] ATM dev 0: ADSL state: running
|
[4942145.150704] ATM dev 0: ADSL state: running
|
||||||
[4942243.663766] ATM dev 0: ADSL line: down
|
[4942243.663766] ATM dev 0: ADSL line: down
|
||||||
[4942249.665075] ATM dev 0: ADSL line: attempting to activate
|
[4942249.665075] ATM dev 0: ADSL line: attempting to activate
|
@@ -1,16 +1,18 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=============
|
||||||
DCCP protocol
|
DCCP protocol
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
|
||||||
Contents
|
.. Contents
|
||||||
========
|
- Introduction
|
||||||
- Introduction
|
- Missing features
|
||||||
- Missing features
|
- Socket options
|
||||||
- Socket options
|
- Sysctl variables
|
||||||
- Sysctl variables
|
- IOCTLs
|
||||||
- IOCTLs
|
- Other tunables
|
||||||
- Other tunables
|
- Notes
|
||||||
- Notes
|
|
||||||
|
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
@@ -38,6 +40,7 @@ The Linux DCCP implementation does not currently support all the features that a
|
|||||||
specified in RFCs 4340...42.
|
specified in RFCs 4340...42.
|
||||||
|
|
||||||
The known bugs are at:
|
The known bugs are at:
|
||||||
|
|
||||||
http://www.linuxfoundation.org/collaborate/workgroups/networking/todo#DCCP
|
http://www.linuxfoundation.org/collaborate/workgroups/networking/todo#DCCP
|
||||||
|
|
||||||
For more up-to-date versions of the DCCP implementation, please consider using
|
For more up-to-date versions of the DCCP implementation, please consider using
|
||||||
@@ -54,7 +57,8 @@ defined: the "simple" policy (DCCPQ_POLICY_SIMPLE), which does nothing special,
|
|||||||
and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an
|
and a priority-based variant (DCCPQ_POLICY_PRIO). The latter allows to pass an
|
||||||
u32 priority value as ancillary data to sendmsg(), where higher numbers indicate
|
u32 priority value as ancillary data to sendmsg(), where higher numbers indicate
|
||||||
a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to
|
a higher packet priority (similar to SO_PRIORITY). This ancillary data needs to
|
||||||
be formatted using a cmsg(3) message header filled in as follows:
|
be formatted using a cmsg(3) message header filled in as follows::
|
||||||
|
|
||||||
cmsg->cmsg_level = SOL_DCCP;
|
cmsg->cmsg_level = SOL_DCCP;
|
||||||
cmsg->cmsg_type = DCCP_SCM_PRIORITY;
|
cmsg->cmsg_type = DCCP_SCM_PRIORITY;
|
||||||
cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */
|
cmsg->cmsg_len = CMSG_LEN(sizeof(uint32_t)); /* or CMSG_LEN(4) */
|
||||||
@@ -94,7 +98,7 @@ must be registered on the socket before calling connect() or listen().
|
|||||||
|
|
||||||
DCCP_SOCKOPT_TX_CCID is read/write. It returns the current CCID (if set) or sets
|
DCCP_SOCKOPT_TX_CCID is read/write. It returns the current CCID (if set) or sets
|
||||||
the preference list for the TX CCID, using the same format as DCCP_SOCKOPT_CCID.
|
the preference list for the TX CCID, using the same format as DCCP_SOCKOPT_CCID.
|
||||||
Please note that the getsockopt argument type here is `int', not uint8_t.
|
Please note that the getsockopt argument type here is ``int``, not uint8_t.
|
||||||
|
|
||||||
DCCP_SOCKOPT_RX_CCID is analogous to DCCP_SOCKOPT_TX_CCID, but for the RX CCID.
|
DCCP_SOCKOPT_RX_CCID is analogous to DCCP_SOCKOPT_TX_CCID, but for the RX CCID.
|
||||||
|
|
||||||
@@ -113,6 +117,7 @@ be enabled at the receiver, too with suitable choice of CsCov.
|
|||||||
DCCP_SOCKOPT_SEND_CSCOV sets the sender checksum coverage. Values in the
|
DCCP_SOCKOPT_SEND_CSCOV sets the sender checksum coverage. Values in the
|
||||||
range 0..15 are acceptable. The default setting is 0 (full coverage),
|
range 0..15 are acceptable. The default setting is 0 (full coverage),
|
||||||
values between 1..15 indicate partial coverage.
|
values between 1..15 indicate partial coverage.
|
||||||
|
|
||||||
DCCP_SOCKOPT_RECV_CSCOV is for the receiver and has a different meaning: it
|
DCCP_SOCKOPT_RECV_CSCOV is for the receiver and has a different meaning: it
|
||||||
sets a threshold, where again values 0..15 are acceptable. The default
|
sets a threshold, where again values 0..15 are acceptable. The default
|
||||||
of 0 means that all packets with a partial coverage will be discarded.
|
of 0 means that all packets with a partial coverage will be discarded.
|
||||||
@@ -123,11 +128,13 @@ DCCP_SOCKOPT_RECV_CSCOV is for the receiver and has a different meaning: it
|
|||||||
|
|
||||||
The following two options apply to CCID 3 exclusively and are getsockopt()-only.
|
The following two options apply to CCID 3 exclusively and are getsockopt()-only.
|
||||||
In either case, a TFRC info struct (defined in <linux/tfrc.h>) is returned.
|
In either case, a TFRC info struct (defined in <linux/tfrc.h>) is returned.
|
||||||
|
|
||||||
DCCP_SOCKOPT_CCID_RX_INFO
|
DCCP_SOCKOPT_CCID_RX_INFO
|
||||||
Returns a `struct tfrc_rx_info' in optval; the buffer for optval and
|
Returns a ``struct tfrc_rx_info`` in optval; the buffer for optval and
|
||||||
optlen must be set to at least sizeof(struct tfrc_rx_info).
|
optlen must be set to at least sizeof(struct tfrc_rx_info).
|
||||||
|
|
||||||
DCCP_SOCKOPT_CCID_TX_INFO
|
DCCP_SOCKOPT_CCID_TX_INFO
|
||||||
Returns a `struct tfrc_tx_info' in optval; the buffer for optval and
|
Returns a ``struct tfrc_tx_info`` in optval; the buffer for optval and
|
||||||
optlen must be set to at least sizeof(struct tfrc_tx_info).
|
optlen must be set to at least sizeof(struct tfrc_tx_info).
|
||||||
|
|
||||||
On unidirectional connections it is useful to close the unused half-connection
|
On unidirectional connections it is useful to close the unused half-connection
|
||||||
@@ -182,7 +189,7 @@ sync_ratelimit = 125 ms
|
|||||||
IOCTLS
|
IOCTLS
|
||||||
======
|
======
|
||||||
FIONREAD
|
FIONREAD
|
||||||
Works as in udp(7): returns in the `int' argument pointer the size of
|
Works as in udp(7): returns in the ``int`` argument pointer the size of
|
||||||
the next pending datagram in bytes, or 0 when no datagram is pending.
|
the next pending datagram in bytes, or 0 when no datagram is pending.
|
||||||
|
|
||||||
|
|
||||||
@@ -191,10 +198,12 @@ Other tunables
|
|||||||
Per-route rto_min support
|
Per-route rto_min support
|
||||||
CCID-2 supports the RTAX_RTO_MIN per-route setting for the minimum value
|
CCID-2 supports the RTAX_RTO_MIN per-route setting for the minimum value
|
||||||
of the RTO timer. This setting can be modified via the 'rto_min' option
|
of the RTO timer. This setting can be modified via the 'rto_min' option
|
||||||
of iproute2; for example:
|
of iproute2; for example::
|
||||||
|
|
||||||
> ip route change 10.0.0.0/24 rto_min 250j dev wlan0
|
> ip route change 10.0.0.0/24 rto_min 250j dev wlan0
|
||||||
> ip route add 10.0.0.254/32 rto_min 800j dev wlan0
|
> ip route add 10.0.0.254/32 rto_min 800j dev wlan0
|
||||||
> ip route show dev wlan0
|
> ip route show dev wlan0
|
||||||
|
|
||||||
CCID-3 also supports the rto_min setting: it is used to define the lower
|
CCID-3 also supports the rto_min setting: it is used to define the lower
|
||||||
bound for the expiry of the nofeedback timer. This can be useful on LANs
|
bound for the expiry of the nofeedback timer. This can be useful on LANs
|
||||||
with very low RTTs (e.g., loopback, Gbit ethernet).
|
with very low RTTs (e.g., loopback, Gbit ethernet).
|
@@ -1,11 +1,14 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
======================
|
||||||
DCTCP (DataCenter TCP)
|
DCTCP (DataCenter TCP)
|
||||||
----------------------
|
======================
|
||||||
|
|
||||||
DCTCP is an enhancement to the TCP congestion control algorithm for data
|
DCTCP is an enhancement to the TCP congestion control algorithm for data
|
||||||
center networks and leverages Explicit Congestion Notification (ECN) in
|
center networks and leverages Explicit Congestion Notification (ECN) in
|
||||||
the data center network to provide multi-bit feedback to the end hosts.
|
the data center network to provide multi-bit feedback to the end hosts.
|
||||||
|
|
||||||
To enable it on end hosts:
|
To enable it on end hosts::
|
||||||
|
|
||||||
sysctl -w net.ipv4.tcp_congestion_control=dctcp
|
sysctl -w net.ipv4.tcp_congestion_control=dctcp
|
||||||
sysctl -w net.ipv4.tcp_ecn_fallback=0 (optional)
|
sysctl -w net.ipv4.tcp_ecn_fallback=0 (optional)
|
||||||
@@ -25,14 +28,19 @@ SIGCOMM/SIGMETRICS papers:
|
|||||||
|
|
||||||
i) Mohammad Alizadeh, Albert Greenberg, David A. Maltz, Jitendra Padhye,
|
i) Mohammad Alizadeh, Albert Greenberg, David A. Maltz, Jitendra Padhye,
|
||||||
Parveen Patel, Balaji Prabhakar, Sudipta Sengupta, and Murari Sridharan:
|
Parveen Patel, Balaji Prabhakar, Sudipta Sengupta, and Murari Sridharan:
|
||||||
"Data Center TCP (DCTCP)", Data Center Networks session
|
|
||||||
|
"Data Center TCP (DCTCP)", Data Center Networks session"
|
||||||
|
|
||||||
Proc. ACM SIGCOMM, New Delhi, 2010.
|
Proc. ACM SIGCOMM, New Delhi, 2010.
|
||||||
|
|
||||||
http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp-final.pdf
|
http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp-final.pdf
|
||||||
http://www.sigcomm.org/ccr/papers/2010/October/1851275.1851192
|
http://www.sigcomm.org/ccr/papers/2010/October/1851275.1851192
|
||||||
|
|
||||||
ii) Mohammad Alizadeh, Adel Javanmard, and Balaji Prabhakar:
|
ii) Mohammad Alizadeh, Adel Javanmard, and Balaji Prabhakar:
|
||||||
|
|
||||||
"Analysis of DCTCP: Stability, Convergence, and Fairness"
|
"Analysis of DCTCP: Stability, Convergence, and Fairness"
|
||||||
Proc. ACM SIGMETRICS, San Jose, 2011.
|
Proc. ACM SIGMETRICS, San Jose, 2011.
|
||||||
|
|
||||||
http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp_analysis-full.pdf
|
http://simula.stanford.edu/~alizade/Site/DCTCP_files/dctcp_analysis-full.pdf
|
||||||
|
|
||||||
IETF informational draft:
|
IETF informational draft:
|
@@ -1,26 +1,31 @@
|
|||||||
Linux DECnet Networking Layer Information
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
===========================================
|
|
||||||
|
|
||||||
1) Other documentation....
|
=========================================
|
||||||
|
Linux DECnet Networking Layer Information
|
||||||
|
=========================================
|
||||||
|
|
||||||
o Project Home Pages
|
1. Other documentation....
|
||||||
http://www.chygwyn.com/ - Kernel info
|
==========================
|
||||||
http://linux-decnet.sourceforge.net/ - Userland tools
|
|
||||||
http://www.sourceforge.net/projects/linux-decnet/ - Status page
|
|
||||||
|
|
||||||
2) Configuring the kernel
|
- Project Home Pages
|
||||||
|
- http://www.chygwyn.com/ - Kernel info
|
||||||
|
- http://linux-decnet.sourceforge.net/ - Userland tools
|
||||||
|
- http://www.sourceforge.net/projects/linux-decnet/ - Status page
|
||||||
|
|
||||||
|
2. Configuring the kernel
|
||||||
|
=========================
|
||||||
|
|
||||||
Be sure to turn on the following options:
|
Be sure to turn on the following options:
|
||||||
|
|
||||||
CONFIG_DECNET (obviously)
|
- CONFIG_DECNET (obviously)
|
||||||
CONFIG_PROC_FS (to see what's going on)
|
- CONFIG_PROC_FS (to see what's going on)
|
||||||
CONFIG_SYSCTL (for easy configuration)
|
- CONFIG_SYSCTL (for easy configuration)
|
||||||
|
|
||||||
if you want to try out router support (not properly debugged yet)
|
if you want to try out router support (not properly debugged yet)
|
||||||
you'll need the following options as well...
|
you'll need the following options as well...
|
||||||
|
|
||||||
CONFIG_DECNET_ROUTER (to be able to add/delete routes)
|
- CONFIG_DECNET_ROUTER (to be able to add/delete routes)
|
||||||
CONFIG_NETFILTER (will be required for the DECnet routing daemon)
|
- CONFIG_NETFILTER (will be required for the DECnet routing daemon)
|
||||||
|
|
||||||
Don't turn on SIOCGIFCONF support for DECnet unless you are really sure
|
Don't turn on SIOCGIFCONF support for DECnet unless you are really sure
|
||||||
that you need it, in general you won't and it can cause ifconfig to
|
that you need it, in general you won't and it can cause ifconfig to
|
||||||
@@ -29,7 +34,7 @@ malfunction.
|
|||||||
Run time configuration has changed slightly from the 2.4 system. If you
|
Run time configuration has changed slightly from the 2.4 system. If you
|
||||||
want to configure an endnode, then the simplified procedure is as follows:
|
want to configure an endnode, then the simplified procedure is as follows:
|
||||||
|
|
||||||
o Set the MAC address on your ethernet card before starting _any_ other
|
- Set the MAC address on your ethernet card before starting _any_ other
|
||||||
network protocols.
|
network protocols.
|
||||||
|
|
||||||
As soon as your network card is brought into the UP state, DECnet should
|
As soon as your network card is brought into the UP state, DECnet should
|
||||||
@@ -37,7 +42,8 @@ start working. If you need something more complicated or are unsure how
|
|||||||
to set the MAC address, see the next section. Also all configurations which
|
to set the MAC address, see the next section. Also all configurations which
|
||||||
worked with 2.4 will work under 2.5 with no change.
|
worked with 2.4 will work under 2.5 with no change.
|
||||||
|
|
||||||
3) Command line options
|
3. Command line options
|
||||||
|
=======================
|
||||||
|
|
||||||
You can set a DECnet address on the kernel command line for compatibility
|
You can set a DECnet address on the kernel command line for compatibility
|
||||||
with the 2.4 configuration procedure, but in general it's not needed any more.
|
with the 2.4 configuration procedure, but in general it's not needed any more.
|
||||||
@@ -56,7 +62,7 @@ interface then you won't see any entries in /proc/net/neigh for the local
|
|||||||
host until such time as you start a connection. This doesn't affect the
|
host until such time as you start a connection. This doesn't affect the
|
||||||
operation of the local communications in any other way though.
|
operation of the local communications in any other way though.
|
||||||
|
|
||||||
The kernel command line takes options looking like the following:
|
The kernel command line takes options looking like the following::
|
||||||
|
|
||||||
decnet.addr=1,2
|
decnet.addr=1,2
|
||||||
|
|
||||||
@@ -82,7 +88,7 @@ address of the node in order for it to be autoconfigured (and then appear in
|
|||||||
FTP sites called dn2ethaddr which can compute the correct ethernet
|
FTP sites called dn2ethaddr which can compute the correct ethernet
|
||||||
address to use. The address can be set by ifconfig either before or
|
address to use. The address can be set by ifconfig either before or
|
||||||
at the time the device is brought up. If you are using RedHat you can
|
at the time the device is brought up. If you are using RedHat you can
|
||||||
add the line:
|
add the line::
|
||||||
|
|
||||||
MACADDR=AA:00:04:00:03:04
|
MACADDR=AA:00:04:00:03:04
|
||||||
|
|
||||||
@@ -95,7 +101,7 @@ verify with iproute2).
|
|||||||
The default device for routing can be set through the /proc filesystem
|
The default device for routing can be set through the /proc filesystem
|
||||||
by setting /proc/sys/net/decnet/default_device to the
|
by setting /proc/sys/net/decnet/default_device to the
|
||||||
device you want DECnet to route packets out of when no specific route
|
device you want DECnet to route packets out of when no specific route
|
||||||
is available. Usually this will be eth0, for example:
|
is available. Usually this will be eth0, for example::
|
||||||
|
|
||||||
echo -n "eth0" >/proc/sys/net/decnet/default_device
|
echo -n "eth0" >/proc/sys/net/decnet/default_device
|
||||||
|
|
||||||
@@ -106,7 +112,9 @@ confirm that by looking in the default_device file of course.
|
|||||||
There is a list of what the other files under /proc/sys/net/decnet/ do
|
There is a list of what the other files under /proc/sys/net/decnet/ do
|
||||||
on the kernel patch web site (shown above).
|
on the kernel patch web site (shown above).
|
||||||
|
|
||||||
4) Run time kernel configuration
|
4. Run time kernel configuration
|
||||||
|
================================
|
||||||
|
|
||||||
|
|
||||||
This is either done through the sysctl/proc interface (see the kernel web
|
This is either done through the sysctl/proc interface (see the kernel web
|
||||||
pages for details on what the various options do) or through the iproute2
|
pages for details on what the various options do) or through the iproute2
|
||||||
@@ -128,7 +136,8 @@ The DECnet raw socket layer has been removed since it was there purely
|
|||||||
for use by the routing daemon which will now use netfilter (a much cleaner
|
for use by the routing daemon which will now use netfilter (a much cleaner
|
||||||
and more generic solution) instead.
|
and more generic solution) instead.
|
||||||
|
|
||||||
5) How can I tell if its working ?
|
5. How can I tell if its working?
|
||||||
|
=================================
|
||||||
|
|
||||||
Here is a quick guide of what to look for in order to know if your DECnet
|
Here is a quick guide of what to look for in order to know if your DECnet
|
||||||
kernel subsystem is working.
|
kernel subsystem is working.
|
||||||
@@ -160,7 +169,8 @@ kernel subsystem is working.
|
|||||||
network, and see if you can obtain the same results.
|
network, and see if you can obtain the same results.
|
||||||
- At this point you are on your own... :-)
|
- At this point you are on your own... :-)
|
||||||
|
|
||||||
6) How to send a bug report
|
6. How to send a bug report
|
||||||
|
===========================
|
||||||
|
|
||||||
If you've found a bug and want to report it, then there are several things
|
If you've found a bug and want to report it, then there are several things
|
||||||
you can do to help me work out exactly what it is that is wrong. Useful
|
you can do to help me work out exactly what it is that is wrong. Useful
|
||||||
@@ -181,7 +191,8 @@ information (_most_ of which _is_ _essential_) includes:
|
|||||||
You may also need to increase the length grabbed with the -s flag. The
|
You may also need to increase the length grabbed with the -s flag. The
|
||||||
-e flag also provides very useful information (ethernet MAC addresses))
|
-e flag also provides very useful information (ethernet MAC addresses))
|
||||||
|
|
||||||
7) MAC FAQ
|
7. MAC FAQ
|
||||||
|
==========
|
||||||
|
|
||||||
A quick FAQ on ethernet MAC addresses to explain how Linux and DECnet
|
A quick FAQ on ethernet MAC addresses to explain how Linux and DECnet
|
||||||
interact and how to get the best performance from your hardware.
|
interact and how to get the best performance from your hardware.
|
||||||
@@ -210,7 +221,8 @@ to gain the best efficiency. Better still is to use a card which supports
|
|||||||
NAPI as well.
|
NAPI as well.
|
||||||
|
|
||||||
|
|
||||||
8) Mailing list
|
8. Mailing list
|
||||||
|
===============
|
||||||
|
|
||||||
If you are keen to get involved in development, or want to ask questions
|
If you are keen to get involved in development, or want to ask questions
|
||||||
about configuration, or even just report bugs, then there is a mailing
|
about configuration, or even just report bugs, then there is a mailing
|
||||||
@@ -218,7 +230,8 @@ list that you can join, details are at:
|
|||||||
|
|
||||||
http://sourceforge.net/mail/?group_id=4993
|
http://sourceforge.net/mail/?group_id=4993
|
||||||
|
|
||||||
9) Legal Info
|
9. Legal Info
|
||||||
|
=============
|
||||||
|
|
||||||
The Linux DECnet project team have placed their code under the GPL. The
|
The Linux DECnet project team have placed their code under the GPL. The
|
||||||
software is provided "as is" and without warranty express or implied.
|
software is provided "as is" and without warranty express or implied.
|
@@ -1,4 +1,10 @@
|
|||||||
Notes on the DEC FDDIcontroller 700 (DEFZA-xx) driver v.1.1.4.
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=====================================================
|
||||||
|
Notes on the DEC FDDIcontroller 700 (DEFZA-xx) driver
|
||||||
|
=====================================================
|
||||||
|
|
||||||
|
:Version: v.1.1.4
|
||||||
|
|
||||||
|
|
||||||
DEC FDDIcontroller 700 is DEC's first-generation TURBOchannel FDDI
|
DEC FDDIcontroller 700 is DEC's first-generation TURBOchannel FDDI
|
@@ -1,17 +1,21 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=============================================================================
|
||||||
Linux and the 3Com EtherLink III Series Ethercards (driver v1.18c and higher)
|
Linux and the 3Com EtherLink III Series Ethercards (driver v1.18c and higher)
|
||||||
----------------------------------------------------------------------------
|
=============================================================================
|
||||||
|
|
||||||
This file contains the instructions and caveats for v1.18c and higher versions
|
This file contains the instructions and caveats for v1.18c and higher versions
|
||||||
of the 3c509 driver. You should not use the driver without reading this file.
|
of the 3c509 driver. You should not use the driver without reading this file.
|
||||||
|
|
||||||
release 1.0
|
release 1.0
|
||||||
|
|
||||||
28 February 2002
|
28 February 2002
|
||||||
|
|
||||||
Current maintainer (corrections to):
|
Current maintainer (corrections to):
|
||||||
David Ruggiero <jdr@farfalle.com>
|
David Ruggiero <jdr@farfalle.com>
|
||||||
|
|
||||||
----------------------------------------------------------------------------
|
Introduction
|
||||||
|
============
|
||||||
(0) Introduction
|
|
||||||
|
|
||||||
The following are notes and information on using the 3Com EtherLink III series
|
The following are notes and information on using the 3Com EtherLink III series
|
||||||
ethercards in Linux. These cards are commonly known by the most widely-used
|
ethercards in Linux. These cards are commonly known by the most widely-used
|
||||||
@@ -21,11 +25,11 @@ be (but sometimes are) confused with the similarly-numbered PCI-bus "3c905"
|
|||||||
provided by the module 3c509.c, which has code to support all of the following
|
provided by the module 3c509.c, which has code to support all of the following
|
||||||
models:
|
models:
|
||||||
|
|
||||||
3c509 (original ISA card)
|
- 3c509 (original ISA card)
|
||||||
3c509B (later revision of the ISA card; supports full-duplex)
|
- 3c509B (later revision of the ISA card; supports full-duplex)
|
||||||
3c589 (PCMCIA)
|
- 3c589 (PCMCIA)
|
||||||
3c589B (later revision of the 3c589; supports full-duplex)
|
- 3c589B (later revision of the 3c589; supports full-duplex)
|
||||||
3c579 (EISA)
|
- 3c579 (EISA)
|
||||||
|
|
||||||
Large portions of this documentation were heavily borrowed from the guide
|
Large portions of this documentation were heavily borrowed from the guide
|
||||||
written the original author of the 3c509 driver, Donald Becker. The master
|
written the original author of the 3c509 driver, Donald Becker. The master
|
||||||
@@ -33,14 +37,15 @@ copy of that document, which contains notes on older versions of the driver,
|
|||||||
currently resides on Scyld web server: http://www.scyld.com/.
|
currently resides on Scyld web server: http://www.scyld.com/.
|
||||||
|
|
||||||
|
|
||||||
(1) Special Driver Features
|
Special Driver Features
|
||||||
|
=======================
|
||||||
|
|
||||||
Overriding card settings
|
Overriding card settings
|
||||||
|
|
||||||
The driver allows boot- or load-time overriding of the card's detected IOADDR,
|
The driver allows boot- or load-time overriding of the card's detected IOADDR,
|
||||||
IRQ, and transceiver settings, although this capability shouldn't generally be
|
IRQ, and transceiver settings, although this capability shouldn't generally be
|
||||||
needed except to enable full-duplex mode (see below). An example of the syntax
|
needed except to enable full-duplex mode (see below). An example of the syntax
|
||||||
for LILO parameters for doing this:
|
for LILO parameters for doing this::
|
||||||
|
|
||||||
ether=10,0x310,3,0x3c509,eth0
|
ether=10,0x310,3,0x3c509,eth0
|
||||||
|
|
||||||
@@ -49,12 +54,13 @@ transceiver type 3 (10base2). The flag "0x3c509" must be set to avoid conflicts
|
|||||||
with other card types when overriding the I/O address. When the driver is
|
with other card types when overriding the I/O address. When the driver is
|
||||||
loaded as a module, only the IRQ may be overridden. For example,
|
loaded as a module, only the IRQ may be overridden. For example,
|
||||||
setting two cards to IRQ10 and IRQ11 is done by using the irq module
|
setting two cards to IRQ10 and IRQ11 is done by using the irq module
|
||||||
option:
|
option::
|
||||||
|
|
||||||
options 3c509 irq=10,11
|
options 3c509 irq=10,11
|
||||||
|
|
||||||
|
|
||||||
(2) Full-duplex mode
|
Full-duplex mode
|
||||||
|
================
|
||||||
|
|
||||||
The v1.18c driver added support for the 3c509B's full-duplex capabilities.
|
The v1.18c driver added support for the 3c509B's full-duplex capabilities.
|
||||||
In order to enable and successfully use full-duplex mode, three conditions
|
In order to enable and successfully use full-duplex mode, three conditions
|
||||||
@@ -79,26 +85,31 @@ another system that's connected directly to the 3c509B via a crossover cable.
|
|||||||
|
|
||||||
Full-duplex mode can be enabled using 'ethtool'.
|
Full-duplex mode can be enabled using 'ethtool'.
|
||||||
|
|
||||||
/////Extremely important caution concerning full-duplex mode/////
|
.. warning::
|
||||||
Understand that the 3c509B's hardware's full-duplex support is much more
|
|
||||||
limited than that provide by more modern network interface cards. Although
|
Extremely important caution concerning full-duplex mode
|
||||||
at the physical layer of the network it fully supports full-duplex operation,
|
|
||||||
the card was designed before the current Ethernet auto-negotiation (N-way)
|
Understand that the 3c509B's hardware's full-duplex support is much more
|
||||||
spec was written. This means that the 3c509B family ***cannot and will not
|
limited than that provide by more modern network interface cards. Although
|
||||||
auto-negotiate a full-duplex connection with its link partner under any
|
at the physical layer of the network it fully supports full-duplex operation,
|
||||||
circumstances, no matter how it is initialized***. If the full-duplex mode
|
the card was designed before the current Ethernet auto-negotiation (N-way)
|
||||||
of the 3c509B is enabled, its link partner will very likely need to be
|
spec was written. This means that the 3c509B family ***cannot and will not
|
||||||
independently _forced_ into full-duplex mode as well; otherwise various nasty
|
auto-negotiate a full-duplex connection with its link partner under any
|
||||||
failures will occur - at the very least, you'll see massive numbers of packet
|
circumstances, no matter how it is initialized***. If the full-duplex mode
|
||||||
collisions. This is one of very rare circumstances where disabling auto-
|
of the 3c509B is enabled, its link partner will very likely need to be
|
||||||
negotiation and forcing the duplex mode of a network interface card or switch
|
independently _forced_ into full-duplex mode as well; otherwise various nasty
|
||||||
would ever be necessary or desirable.
|
failures will occur - at the very least, you'll see massive numbers of packet
|
||||||
|
collisions. This is one of very rare circumstances where disabling auto-
|
||||||
|
negotiation and forcing the duplex mode of a network interface card or switch
|
||||||
|
would ever be necessary or desirable.
|
||||||
|
|
||||||
|
|
||||||
(3) Available Transceiver Types
|
Available Transceiver Types
|
||||||
|
===========================
|
||||||
|
|
||||||
For versions of the driver v1.18c and above, the available transceiver types are:
|
For versions of the driver v1.18c and above, the available transceiver types are:
|
||||||
|
|
||||||
|
== =========================================================================
|
||||||
0 transceiver type from EEPROM config (normally 10baseT); force half-duplex
|
0 transceiver type from EEPROM config (normally 10baseT); force half-duplex
|
||||||
1 AUI (thick-net / DB15 connector)
|
1 AUI (thick-net / DB15 connector)
|
||||||
2 (undefined)
|
2 (undefined)
|
||||||
@@ -106,6 +117,7 @@ For versions of the driver v1.18c and above, the available transceiver types are
|
|||||||
4 10baseT (RJ-45 connector); force half-duplex mode
|
4 10baseT (RJ-45 connector); force half-duplex mode
|
||||||
8 transceiver type and duplex mode taken from card's EEPROM config settings
|
8 transceiver type and duplex mode taken from card's EEPROM config settings
|
||||||
12 10baseT (RJ-45 connector); force full-duplex mode
|
12 10baseT (RJ-45 connector); force full-duplex mode
|
||||||
|
== =========================================================================
|
||||||
|
|
||||||
Prior to driver version 1.18c, only transceiver codes 0-4 were supported. Note
|
Prior to driver version 1.18c, only transceiver codes 0-4 were supported. Note
|
||||||
that the new transceiver codes 8 and 12 are the *only* ones that will enable
|
that the new transceiver codes 8 and 12 are the *only* ones that will enable
|
||||||
@@ -118,9 +130,11 @@ activated.
|
|||||||
The transceiver type can be changed using 'ethtool'.
|
The transceiver type can be changed using 'ethtool'.
|
||||||
|
|
||||||
|
|
||||||
(4a) Interpretation of error messages and common problems
|
Interpretation of error messages and common problems
|
||||||
|
----------------------------------------------------
|
||||||
|
|
||||||
Error Messages
|
Error Messages
|
||||||
|
^^^^^^^^^^^^^^
|
||||||
|
|
||||||
eth0: Infinite loop in interrupt, status 2011.
|
eth0: Infinite loop in interrupt, status 2011.
|
||||||
These are "mostly harmless" message indicating that the driver had too much
|
These are "mostly harmless" message indicating that the driver had too much
|
||||||
@@ -136,6 +150,8 @@ or impossible in normal operation. Possible causes of this error report are:
|
|||||||
interrupt should always be incrementing faster than the others.
|
interrupt should always be incrementing faster than the others.
|
||||||
|
|
||||||
No received packets
|
No received packets
|
||||||
|
^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If a 3c509, 3c562 or 3c589 can successfully transmit packets, but never
|
If a 3c509, 3c562 or 3c589 can successfully transmit packets, but never
|
||||||
receives packets (as reported by /proc/net/dev or 'ifconfig') you likely
|
receives packets (as reported by /proc/net/dev or 'ifconfig') you likely
|
||||||
have an interrupt line problem. Check /proc/interrupts to verify that the
|
have an interrupt line problem. Check /proc/interrupts to verify that the
|
||||||
@@ -147,25 +163,36 @@ interrupt line. If the device is receiving packets but 'ping' doesn't work,
|
|||||||
you have a routing problem.
|
you have a routing problem.
|
||||||
|
|
||||||
Tx Carrier Errors Reported in /proc/net/dev
|
Tx Carrier Errors Reported in /proc/net/dev
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
If an EtherLink III appears to transmit packets, but the "Tx carrier errors"
|
If an EtherLink III appears to transmit packets, but the "Tx carrier errors"
|
||||||
field in /proc/net/dev increments as quickly as the Tx packet count, you
|
field in /proc/net/dev increments as quickly as the Tx packet count, you
|
||||||
likely have an unterminated network or the incorrect media transceiver selected.
|
likely have an unterminated network or the incorrect media transceiver selected.
|
||||||
|
|
||||||
3c509B card is not detected on machines with an ISA PnP BIOS.
|
3c509B card is not detected on machines with an ISA PnP BIOS.
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
While the updated driver works with most PnP BIOS programs, it does not work
|
While the updated driver works with most PnP BIOS programs, it does not work
|
||||||
with all. This can be fixed by disabling PnP support using the 3Com-supplied
|
with all. This can be fixed by disabling PnP support using the 3Com-supplied
|
||||||
setup program.
|
setup program.
|
||||||
|
|
||||||
3c509 card is not detected on overclocked machines
|
3c509 card is not detected on overclocked machines
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Increase the delay time in id_read_eeprom() from the current value, 500,
|
Increase the delay time in id_read_eeprom() from the current value, 500,
|
||||||
to an absurdly high value, such as 5000.
|
to an absurdly high value, such as 5000.
|
||||||
|
|
||||||
|
|
||||||
(4b) Decoding Status and Error Messages
|
Decoding Status and Error Messages
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
|
||||||
The bits in the main status register are:
|
The bits in the main status register are:
|
||||||
|
|
||||||
|
===== ======================================
|
||||||
value description
|
value description
|
||||||
|
===== ======================================
|
||||||
0x01 Interrupt latch
|
0x01 Interrupt latch
|
||||||
0x02 Tx overrun, or Rx underrun
|
0x02 Tx overrun, or Rx underrun
|
||||||
0x04 Tx complete
|
0x04 Tx complete
|
||||||
@@ -174,10 +201,13 @@ value description
|
|||||||
0x20 A Rx packet has started to arrive
|
0x20 A Rx packet has started to arrive
|
||||||
0x40 The driver has requested an interrupt
|
0x40 The driver has requested an interrupt
|
||||||
0x80 Statistics counter nearly full
|
0x80 Statistics counter nearly full
|
||||||
|
===== ======================================
|
||||||
|
|
||||||
The bits in the transmit (Tx) status word are:
|
The bits in the transmit (Tx) status word are:
|
||||||
|
|
||||||
|
===== ============================================
|
||||||
value description
|
value description
|
||||||
|
===== ============================================
|
||||||
0x02 Out-of-window collision.
|
0x02 Out-of-window collision.
|
||||||
0x04 Status stack overflow (normally impossible).
|
0x04 Status stack overflow (normally impossible).
|
||||||
0x08 16 collisions.
|
0x08 16 collisions.
|
||||||
@@ -185,19 +215,24 @@ value description
|
|||||||
0x20 Tx jabber.
|
0x20 Tx jabber.
|
||||||
0x40 Tx interrupt requested.
|
0x40 Tx interrupt requested.
|
||||||
0x80 Status is valid (this should always be set).
|
0x80 Status is valid (this should always be set).
|
||||||
|
===== ============================================
|
||||||
|
|
||||||
|
|
||||||
When a transmit error occurs the driver produces a status message such as
|
When a transmit error occurs the driver produces a status message such as::
|
||||||
|
|
||||||
eth0: Transmit error, Tx status register 82
|
eth0: Transmit error, Tx status register 82
|
||||||
|
|
||||||
The two values typically seen here are:
|
The two values typically seen here are:
|
||||||
|
|
||||||
0x82
|
0x82
|
||||||
|
^^^^
|
||||||
|
|
||||||
Out of window collision. This typically occurs when some other Ethernet
|
Out of window collision. This typically occurs when some other Ethernet
|
||||||
host is incorrectly set to full duplex on a half duplex network.
|
host is incorrectly set to full duplex on a half duplex network.
|
||||||
|
|
||||||
0x88
|
0x88
|
||||||
|
^^^^
|
||||||
|
|
||||||
16 collisions. This typically occurs when the network is exceptionally busy
|
16 collisions. This typically occurs when the network is exceptionally busy
|
||||||
or when another host doesn't correctly back off after a collision. If this
|
or when another host doesn't correctly back off after a collision. If this
|
||||||
error is mixed with 0x82 errors it is the result of a host incorrectly set
|
error is mixed with 0x82 errors it is the result of a host incorrectly set
|
||||||
@@ -207,7 +242,8 @@ Both of these errors are the result of network problems that should be
|
|||||||
corrected. They do not represent driver malfunction.
|
corrected. They do not represent driver malfunction.
|
||||||
|
|
||||||
|
|
||||||
(5) Revision history (this file)
|
Revision history (this file)
|
||||||
|
============================
|
||||||
|
|
||||||
28Feb02 v1.0 DR New; major portions based on Becker original 3c509 docs
|
28Feb02 v1.0 DR New; major portions based on Becker original 3c509 docs
|
||||||
|
|
@@ -1,5 +1,13 @@
|
|||||||
Documentation/networking/device_drivers/3com/vortex.txt
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=========================
|
||||||
|
3Com Vortex device driver
|
||||||
|
=========================
|
||||||
|
|
||||||
|
Documentation/networking/device_drivers/3com/vortex.rst
|
||||||
|
|
||||||
Andrew Morton
|
Andrew Morton
|
||||||
|
|
||||||
30 April 2000
|
30 April 2000
|
||||||
|
|
||||||
|
|
||||||
@@ -11,9 +19,9 @@ The driver was written by Donald Becker <becker@scyld.com>
|
|||||||
Don is no longer the prime maintainer of this version of the driver.
|
Don is no longer the prime maintainer of this version of the driver.
|
||||||
Please report problems to one or more of:
|
Please report problems to one or more of:
|
||||||
|
|
||||||
Andrew Morton
|
- Andrew Morton
|
||||||
Netdev mailing list <netdev@vger.kernel.org>
|
- Netdev mailing list <netdev@vger.kernel.org>
|
||||||
Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
- Linux kernel mailing list <linux-kernel@vger.kernel.org>
|
||||||
|
|
||||||
Please note the 'Reporting and Diagnosing Problems' section at the end
|
Please note the 'Reporting and Diagnosing Problems' section at the end
|
||||||
of this file.
|
of this file.
|
||||||
@@ -24,58 +32,58 @@ Since kernel 2.3.99-pre6, this driver incorporates the support for the
|
|||||||
|
|
||||||
This driver supports the following hardware:
|
This driver supports the following hardware:
|
||||||
|
|
||||||
3c590 Vortex 10Mbps
|
- 3c590 Vortex 10Mbps
|
||||||
3c592 EISA 10Mbps Demon/Vortex
|
- 3c592 EISA 10Mbps Demon/Vortex
|
||||||
3c597 EISA Fast Demon/Vortex
|
- 3c597 EISA Fast Demon/Vortex
|
||||||
3c595 Vortex 100baseTx
|
- 3c595 Vortex 100baseTx
|
||||||
3c595 Vortex 100baseT4
|
- 3c595 Vortex 100baseT4
|
||||||
3c595 Vortex 100base-MII
|
- 3c595 Vortex 100base-MII
|
||||||
3c900 Boomerang 10baseT
|
- 3c900 Boomerang 10baseT
|
||||||
3c900 Boomerang 10Mbps Combo
|
- 3c900 Boomerang 10Mbps Combo
|
||||||
3c900 Cyclone 10Mbps TPO
|
- 3c900 Cyclone 10Mbps TPO
|
||||||
3c900 Cyclone 10Mbps Combo
|
- 3c900 Cyclone 10Mbps Combo
|
||||||
3c900 Cyclone 10Mbps TPC
|
- 3c900 Cyclone 10Mbps TPC
|
||||||
3c900B-FL Cyclone 10base-FL
|
- 3c900B-FL Cyclone 10base-FL
|
||||||
3c905 Boomerang 100baseTx
|
- 3c905 Boomerang 100baseTx
|
||||||
3c905 Boomerang 100baseT4
|
- 3c905 Boomerang 100baseT4
|
||||||
3c905B Cyclone 100baseTx
|
- 3c905B Cyclone 100baseTx
|
||||||
3c905B Cyclone 10/100/BNC
|
- 3c905B Cyclone 10/100/BNC
|
||||||
3c905B-FX Cyclone 100baseFx
|
- 3c905B-FX Cyclone 100baseFx
|
||||||
3c905C Tornado
|
- 3c905C Tornado
|
||||||
3c920B-EMB-WNM (ATI Radeon 9100 IGP)
|
- 3c920B-EMB-WNM (ATI Radeon 9100 IGP)
|
||||||
3c980 Cyclone
|
- 3c980 Cyclone
|
||||||
3c980C Python-T
|
- 3c980C Python-T
|
||||||
3cSOHO100-TX Hurricane
|
- 3cSOHO100-TX Hurricane
|
||||||
3c555 Laptop Hurricane
|
- 3c555 Laptop Hurricane
|
||||||
3c556 Laptop Tornado
|
- 3c556 Laptop Tornado
|
||||||
3c556B Laptop Hurricane
|
- 3c556B Laptop Hurricane
|
||||||
3c575 [Megahertz] 10/100 LAN CardBus
|
- 3c575 [Megahertz] 10/100 LAN CardBus
|
||||||
3c575 Boomerang CardBus
|
- 3c575 Boomerang CardBus
|
||||||
3CCFE575BT Cyclone CardBus
|
- 3CCFE575BT Cyclone CardBus
|
||||||
3CCFE575CT Tornado CardBus
|
- 3CCFE575CT Tornado CardBus
|
||||||
3CCFE656 Cyclone CardBus
|
- 3CCFE656 Cyclone CardBus
|
||||||
3CCFEM656B Cyclone+Winmodem CardBus
|
- 3CCFEM656B Cyclone+Winmodem CardBus
|
||||||
3CXFEM656C Tornado+Winmodem CardBus
|
- 3CXFEM656C Tornado+Winmodem CardBus
|
||||||
3c450 HomePNA Tornado
|
- 3c450 HomePNA Tornado
|
||||||
3c920 Tornado
|
- 3c920 Tornado
|
||||||
3c982 Hydra Dual Port A
|
- 3c982 Hydra Dual Port A
|
||||||
3c982 Hydra Dual Port B
|
- 3c982 Hydra Dual Port B
|
||||||
3c905B-T4
|
- 3c905B-T4
|
||||||
3c920B-EMB-WNM Tornado
|
- 3c920B-EMB-WNM Tornado
|
||||||
|
|
||||||
Module parameters
|
Module parameters
|
||||||
=================
|
=================
|
||||||
|
|
||||||
There are several parameters which may be provided to the driver when
|
There are several parameters which may be provided to the driver when
|
||||||
its module is loaded. These are usually placed in /etc/modprobe.d/*.conf
|
its module is loaded. These are usually placed in ``/etc/modprobe.d/*.conf``
|
||||||
configuration files. Example:
|
configuration files. Example::
|
||||||
|
|
||||||
options 3c59x debug=3 rx_copybreak=300
|
options 3c59x debug=3 rx_copybreak=300
|
||||||
|
|
||||||
If you are using the PCMCIA tools (cardmgr) then the options may be
|
If you are using the PCMCIA tools (cardmgr) then the options may be
|
||||||
placed in /etc/pcmcia/config.opts:
|
placed in /etc/pcmcia/config.opts::
|
||||||
|
|
||||||
module "3c59x" opts "debug=3 rx_copybreak=300"
|
module "3c59x" opts "debug=3 rx_copybreak=300"
|
||||||
|
|
||||||
|
|
||||||
The supported parameters are:
|
The supported parameters are:
|
||||||
@@ -89,7 +97,7 @@ options=N1,N2,N3,...
|
|||||||
|
|
||||||
Each number in the list provides an option to the corresponding
|
Each number in the list provides an option to the corresponding
|
||||||
network card. So if you have two 3c905's and you wish to provide
|
network card. So if you have two 3c905's and you wish to provide
|
||||||
them with option 0x204 you would use:
|
them with option 0x204 you would use::
|
||||||
|
|
||||||
options=0x204,0x204
|
options=0x204,0x204
|
||||||
|
|
||||||
@@ -97,6 +105,8 @@ options=N1,N2,N3,...
|
|||||||
have the following meanings:
|
have the following meanings:
|
||||||
|
|
||||||
Possible media type settings
|
Possible media type settings
|
||||||
|
|
||||||
|
== =================================
|
||||||
0 10baseT
|
0 10baseT
|
||||||
1 10Mbs AUI
|
1 10Mbs AUI
|
||||||
2 undefined
|
2 undefined
|
||||||
@@ -108,17 +118,20 @@ options=N1,N2,N3,...
|
|||||||
8 Autonegotiate
|
8 Autonegotiate
|
||||||
9 External MII
|
9 External MII
|
||||||
10 Use default setting from EEPROM
|
10 Use default setting from EEPROM
|
||||||
|
== =================================
|
||||||
|
|
||||||
When generating a value for the 'options' setting, the above media
|
When generating a value for the 'options' setting, the above media
|
||||||
selection values may be OR'ed (or added to) the following:
|
selection values may be OR'ed (or added to) the following:
|
||||||
|
|
||||||
|
====== =============================================
|
||||||
0x8000 Set driver debugging level to 7
|
0x8000 Set driver debugging level to 7
|
||||||
0x4000 Set driver debugging level to 2
|
0x4000 Set driver debugging level to 2
|
||||||
0x0400 Enable Wake-on-LAN
|
0x0400 Enable Wake-on-LAN
|
||||||
0x0200 Force full duplex mode.
|
0x0200 Force full duplex mode.
|
||||||
0x0010 Bus-master enable bit (Old Vortex cards only)
|
0x0010 Bus-master enable bit (Old Vortex cards only)
|
||||||
|
====== =============================================
|
||||||
|
|
||||||
For example:
|
For example::
|
||||||
|
|
||||||
insmod 3c59x options=0x204
|
insmod 3c59x options=0x204
|
||||||
|
|
||||||
@@ -127,14 +140,14 @@ options=N1,N2,N3,...
|
|||||||
|
|
||||||
global_options=N
|
global_options=N
|
||||||
|
|
||||||
Sets the `options' parameter for all 3c59x NICs in the machine.
|
Sets the ``options`` parameter for all 3c59x NICs in the machine.
|
||||||
Entries in the `options' array above will override any setting of
|
Entries in the ``options`` array above will override any setting of
|
||||||
this.
|
this.
|
||||||
|
|
||||||
full_duplex=N1,N2,N3...
|
full_duplex=N1,N2,N3...
|
||||||
|
|
||||||
Similar to bit 9 of 'options'. Forces the corresponding card into
|
Similar to bit 9 of 'options'. Forces the corresponding card into
|
||||||
full-duplex mode. Please use this in preference to the `options'
|
full-duplex mode. Please use this in preference to the ``options``
|
||||||
parameter.
|
parameter.
|
||||||
|
|
||||||
In fact, please don't use this at all! You're better off getting
|
In fact, please don't use this at all! You're better off getting
|
||||||
@@ -143,7 +156,7 @@ full_duplex=N1,N2,N3...
|
|||||||
global_full_duplex=N1
|
global_full_duplex=N1
|
||||||
|
|
||||||
Sets full duplex mode for all 3c59x NICs in the machine. Entries
|
Sets full duplex mode for all 3c59x NICs in the machine. Entries
|
||||||
in the `full_duplex' array above will override any setting of this.
|
in the ``full_duplex`` array above will override any setting of this.
|
||||||
|
|
||||||
flow_ctrl=N1,N2,N3...
|
flow_ctrl=N1,N2,N3...
|
||||||
|
|
||||||
@@ -196,11 +209,11 @@ hw_checksums=N1,N2,N3,...
|
|||||||
|
|
||||||
This module parameter has been provided so you can override this
|
This module parameter has been provided so you can override this
|
||||||
decision. If you think that Tx checksums are causing a problem, you
|
decision. If you think that Tx checksums are causing a problem, you
|
||||||
may disable the feature with `hw_checksums=0'.
|
may disable the feature with ``hw_checksums=0``.
|
||||||
|
|
||||||
If you think your NIC should be performing Tx checksumming and the
|
If you think your NIC should be performing Tx checksumming and the
|
||||||
driver isn't enabling it, you can force the use of hardware Tx
|
driver isn't enabling it, you can force the use of hardware Tx
|
||||||
checksumming with `hw_checksums=1'.
|
checksumming with ``hw_checksums=1``.
|
||||||
|
|
||||||
The driver drops a message in the logfiles to indicate whether or
|
The driver drops a message in the logfiles to indicate whether or
|
||||||
not it is using hardware scatter/gather and hardware Tx checksums.
|
not it is using hardware scatter/gather and hardware Tx checksums.
|
||||||
@@ -210,8 +223,8 @@ hw_checksums=N1,N2,N3,...
|
|||||||
decrease in throughput for send(). There is no effect upon receive
|
decrease in throughput for send(). There is no effect upon receive
|
||||||
efficiency.
|
efficiency.
|
||||||
|
|
||||||
compaq_ioaddr=N
|
compaq_ioaddr=N,
|
||||||
compaq_irq=N
|
compaq_irq=N,
|
||||||
compaq_device_id=N
|
compaq_device_id=N
|
||||||
|
|
||||||
"Variables to work-around the Compaq PCI BIOS32 problem"....
|
"Variables to work-around the Compaq PCI BIOS32 problem"....
|
||||||
@@ -227,7 +240,7 @@ watchdog=N
|
|||||||
enable_wol=N1,N2,N3,...
|
enable_wol=N1,N2,N3,...
|
||||||
|
|
||||||
Enable Wake-on-LAN support for the relevant interface. Donald
|
Enable Wake-on-LAN support for the relevant interface. Donald
|
||||||
Becker's `ether-wake' application may be used to wake suspended
|
Becker's ``ether-wake`` application may be used to wake suspended
|
||||||
machines.
|
machines.
|
||||||
|
|
||||||
Also enables the NIC's power management support.
|
Also enables the NIC's power management support.
|
||||||
@@ -235,7 +248,7 @@ enable_wol=N1,N2,N3,...
|
|||||||
global_enable_wol=N
|
global_enable_wol=N
|
||||||
|
|
||||||
Sets enable_wol mode for all 3c59x NICs in the machine. Entries in
|
Sets enable_wol mode for all 3c59x NICs in the machine. Entries in
|
||||||
the `enable_wol' array above will override any setting of this.
|
the ``enable_wol`` array above will override any setting of this.
|
||||||
|
|
||||||
Media selection
|
Media selection
|
||||||
---------------
|
---------------
|
||||||
@@ -325,7 +338,7 @@ Autonegotiation notes
|
|||||||
|
|
||||||
Cisco switches (Jeff Busch <jbusch@deja.com>)
|
Cisco switches (Jeff Busch <jbusch@deja.com>)
|
||||||
|
|
||||||
My "standard config" for ports to which PC's/servers connect directly:
|
My "standard config" for ports to which PC's/servers connect directly::
|
||||||
|
|
||||||
interface FastEthernet0/N
|
interface FastEthernet0/N
|
||||||
description machinename
|
description machinename
|
||||||
@@ -368,9 +381,9 @@ steps you should take:
|
|||||||
|
|
||||||
But for most problems it is useful to provide the following:
|
But for most problems it is useful to provide the following:
|
||||||
|
|
||||||
o Kernel version, driver version
|
- Kernel version, driver version
|
||||||
|
|
||||||
o A copy of the banner message which the driver generates when
|
- A copy of the banner message which the driver generates when
|
||||||
it is initialised. For example:
|
it is initialised. For example:
|
||||||
|
|
||||||
eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19
|
eth0: 3Com PCI 3c905C Tornado at 0xa400, 00:50:da:6a:88:f0, IRQ 19
|
||||||
@@ -378,12 +391,12 @@ steps you should take:
|
|||||||
MII transceiver found at address 24, status 782d.
|
MII transceiver found at address 24, status 782d.
|
||||||
Enabling bus-master transmits and whole-frame receives.
|
Enabling bus-master transmits and whole-frame receives.
|
||||||
|
|
||||||
NOTE: You must provide the `debug=2' modprobe option to generate
|
NOTE: You must provide the ``debug=2`` modprobe option to generate
|
||||||
a full detection message. Please do this:
|
a full detection message. Please do this::
|
||||||
|
|
||||||
modprobe 3c59x debug=2
|
modprobe 3c59x debug=2
|
||||||
|
|
||||||
o If it is a PCI device, the relevant output from 'lspci -vx', eg:
|
- If it is a PCI device, the relevant output from 'lspci -vx', eg::
|
||||||
|
|
||||||
00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74)
|
00:09.0 Ethernet controller: 3Com Corporation 3c905C-TX [Fast Etherlink] (rev 74)
|
||||||
Subsystem: 3Com Corporation: Unknown device 9200
|
Subsystem: 3Com Corporation: Unknown device 9200
|
||||||
@@ -397,29 +410,29 @@ steps you should take:
|
|||||||
20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10
|
20: 00 00 00 00 00 00 00 00 00 00 00 00 b7 10 00 10
|
||||||
30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a
|
30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0a 0a
|
||||||
|
|
||||||
o A description of the environment: 10baseT? 100baseT?
|
- A description of the environment: 10baseT? 100baseT?
|
||||||
full/half duplex? switched or hubbed?
|
full/half duplex? switched or hubbed?
|
||||||
|
|
||||||
o Any additional module parameters which you may be providing to the driver.
|
- Any additional module parameters which you may be providing to the driver.
|
||||||
|
|
||||||
o Any kernel logs which are produced. The more the merrier.
|
- Any kernel logs which are produced. The more the merrier.
|
||||||
If this is a large file and you are sending your report to a
|
If this is a large file and you are sending your report to a
|
||||||
mailing list, mention that you have the logfile, but don't send
|
mailing list, mention that you have the logfile, but don't send
|
||||||
it. If you're reporting direct to the maintainer then just send
|
it. If you're reporting direct to the maintainer then just send
|
||||||
it.
|
it.
|
||||||
|
|
||||||
To ensure that all kernel logs are available, add the
|
To ensure that all kernel logs are available, add the
|
||||||
following line to /etc/syslog.conf:
|
following line to /etc/syslog.conf::
|
||||||
|
|
||||||
kern.* /var/log/messages
|
kern.* /var/log/messages
|
||||||
|
|
||||||
Then restart syslogd with:
|
Then restart syslogd with::
|
||||||
|
|
||||||
/etc/rc.d/init.d/syslog restart
|
/etc/rc.d/init.d/syslog restart
|
||||||
|
|
||||||
(The above may vary, depending upon which Linux distribution you use).
|
(The above may vary, depending upon which Linux distribution you use).
|
||||||
|
|
||||||
o If your problem is reproducible then that's great. Try the
|
- If your problem is reproducible then that's great. Try the
|
||||||
following:
|
following:
|
||||||
|
|
||||||
1) Increase the debug level. Usually this is done via:
|
1) Increase the debug level. Usually this is done via:
|
@@ -1,8 +1,12 @@
|
|||||||
Linux kernel driver for Elastic Network Adapter (ENA) family:
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
=============================================================
|
|
||||||
|
============================================================
|
||||||
|
Linux kernel driver for Elastic Network Adapter (ENA) family
|
||||||
|
============================================================
|
||||||
|
|
||||||
|
Overview
|
||||||
|
========
|
||||||
|
|
||||||
Overview:
|
|
||||||
=========
|
|
||||||
ENA is a networking interface designed to make good use of modern CPU
|
ENA is a networking interface designed to make good use of modern CPU
|
||||||
features and system architectures.
|
features and system architectures.
|
||||||
|
|
||||||
@@ -35,32 +39,40 @@ debug logs.
|
|||||||
Some of the ENA devices support a working mode called Low-latency
|
Some of the ENA devices support a working mode called Low-latency
|
||||||
Queue (LLQ), which saves several more microseconds.
|
Queue (LLQ), which saves several more microseconds.
|
||||||
|
|
||||||
Supported PCI vendor ID/device IDs:
|
Supported PCI vendor ID/device IDs
|
||||||
===================================
|
==================================
|
||||||
1d0f:0ec2 - ENA PF
|
|
||||||
1d0f:1ec2 - ENA PF with LLQ support
|
|
||||||
1d0f:ec20 - ENA VF
|
|
||||||
1d0f:ec21 - ENA VF with LLQ support
|
|
||||||
|
|
||||||
ENA Source Code Directory Structure:
|
========= =======================
|
||||||
====================================
|
1d0f:0ec2 ENA PF
|
||||||
ena_com.[ch] - Management communication layer. This layer is
|
1d0f:1ec2 ENA PF with LLQ support
|
||||||
|
1d0f:ec20 ENA VF
|
||||||
|
1d0f:ec21 ENA VF with LLQ support
|
||||||
|
========= =======================
|
||||||
|
|
||||||
|
ENA Source Code Directory Structure
|
||||||
|
===================================
|
||||||
|
|
||||||
|
================= ======================================================
|
||||||
|
ena_com.[ch] Management communication layer. This layer is
|
||||||
responsible for the handling all the management
|
responsible for the handling all the management
|
||||||
(admin) communication between the device and the
|
(admin) communication between the device and the
|
||||||
driver.
|
driver.
|
||||||
ena_eth_com.[ch] - Tx/Rx data path.
|
ena_eth_com.[ch] Tx/Rx data path.
|
||||||
ena_admin_defs.h - Definition of ENA management interface.
|
ena_admin_defs.h Definition of ENA management interface.
|
||||||
ena_eth_io_defs.h - Definition of ENA data path interface.
|
ena_eth_io_defs.h Definition of ENA data path interface.
|
||||||
ena_common_defs.h - Common definitions for ena_com layer.
|
ena_common_defs.h Common definitions for ena_com layer.
|
||||||
ena_regs_defs.h - Definition of ENA PCI memory-mapped (MMIO) registers.
|
ena_regs_defs.h Definition of ENA PCI memory-mapped (MMIO) registers.
|
||||||
ena_netdev.[ch] - Main Linux kernel driver.
|
ena_netdev.[ch] Main Linux kernel driver.
|
||||||
ena_syfsfs.[ch] - Sysfs files.
|
ena_syfsfs.[ch] Sysfs files.
|
||||||
ena_ethtool.c - ethtool callbacks.
|
ena_ethtool.c ethtool callbacks.
|
||||||
ena_pci_id_tbl.h - Supported device IDs.
|
ena_pci_id_tbl.h Supported device IDs.
|
||||||
|
================= ======================================================
|
||||||
|
|
||||||
Management Interface:
|
Management Interface:
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
ENA management interface is exposed by means of:
|
ENA management interface is exposed by means of:
|
||||||
|
|
||||||
- PCIe Configuration Space
|
- PCIe Configuration Space
|
||||||
- Device Registers
|
- Device Registers
|
||||||
- Admin Queue (AQ) and Admin Completion Queue (ACQ)
|
- Admin Queue (AQ) and Admin Completion Queue (ACQ)
|
||||||
@@ -78,6 +90,7 @@ vendor-specific extensions. Most of the management operations are
|
|||||||
framed in a generic Get/Set feature command.
|
framed in a generic Get/Set feature command.
|
||||||
|
|
||||||
The following admin queue commands are supported:
|
The following admin queue commands are supported:
|
||||||
|
|
||||||
- Create I/O submission queue
|
- Create I/O submission queue
|
||||||
- Create I/O completion queue
|
- Create I/O completion queue
|
||||||
- Destroy I/O submission queue
|
- Destroy I/O submission queue
|
||||||
@@ -96,12 +109,16 @@ be reported using ACQ. AENQ events are subdivided into groups. Each
|
|||||||
group may have multiple syndromes, as shown below
|
group may have multiple syndromes, as shown below
|
||||||
|
|
||||||
The events are:
|
The events are:
|
||||||
|
|
||||||
|
==================== ===============
|
||||||
Group Syndrome
|
Group Syndrome
|
||||||
Link state change - X -
|
==================== ===============
|
||||||
Fatal error - X -
|
Link state change **X**
|
||||||
|
Fatal error **X**
|
||||||
Notification Suspend traffic
|
Notification Suspend traffic
|
||||||
Notification Resume traffic
|
Notification Resume traffic
|
||||||
Keep-Alive - X -
|
Keep-Alive **X**
|
||||||
|
==================== ===============
|
||||||
|
|
||||||
ACQ and AENQ share the same MSI-X vector.
|
ACQ and AENQ share the same MSI-X vector.
|
||||||
|
|
||||||
@@ -113,8 +130,8 @@ the device every second. The driver re-arms the WD upon reception of a
|
|||||||
Keep-Alive event. A missed Keep-Alive event causes the WD handler to
|
Keep-Alive event. A missed Keep-Alive event causes the WD handler to
|
||||||
fire.
|
fire.
|
||||||
|
|
||||||
Data Path Interface:
|
Data Path Interface
|
||||||
====================
|
===================
|
||||||
I/O operations are based on Tx and Rx Submission Queues (Tx SQ and Rx
|
I/O operations are based on Tx and Rx Submission Queues (Tx SQ and Rx
|
||||||
SQ correspondingly). Each SQ has a completion queue (CQ) associated
|
SQ correspondingly). Each SQ has a completion queue (CQ) associated
|
||||||
with it.
|
with it.
|
||||||
@@ -123,11 +140,15 @@ The SQs and CQs are implemented as descriptor rings in contiguous
|
|||||||
physical memory.
|
physical memory.
|
||||||
|
|
||||||
The ENA driver supports two Queue Operation modes for Tx SQs:
|
The ENA driver supports two Queue Operation modes for Tx SQs:
|
||||||
|
|
||||||
- Regular mode
|
- Regular mode
|
||||||
|
|
||||||
* In this mode the Tx SQs reside in the host's memory. The ENA
|
* In this mode the Tx SQs reside in the host's memory. The ENA
|
||||||
device fetches the ENA Tx descriptors and packet data from host
|
device fetches the ENA Tx descriptors and packet data from host
|
||||||
memory.
|
memory.
|
||||||
|
|
||||||
- Low Latency Queue (LLQ) mode or "push-mode".
|
- Low Latency Queue (LLQ) mode or "push-mode".
|
||||||
|
|
||||||
* In this mode the driver pushes the transmit descriptors and the
|
* In this mode the driver pushes the transmit descriptors and the
|
||||||
first 128 bytes of the packet directly to the ENA device memory
|
first 128 bytes of the packet directly to the ENA device memory
|
||||||
space. The rest of the packet payload is fetched by the
|
space. The rest of the packet payload is fetched by the
|
||||||
@@ -142,6 +163,7 @@ Note: Not all ENA devices support LLQ, and this feature is negotiated
|
|||||||
|
|
||||||
The driver supports multi-queue for both Tx and Rx. This has various
|
The driver supports multi-queue for both Tx and Rx. This has various
|
||||||
benefits:
|
benefits:
|
||||||
|
|
||||||
- Reduced CPU/thread/process contention on a given Ethernet interface.
|
- Reduced CPU/thread/process contention on a given Ethernet interface.
|
||||||
- Cache miss rate on completion is reduced, particularly for data
|
- Cache miss rate on completion is reduced, particularly for data
|
||||||
cache lines that hold the sk_buff structures.
|
cache lines that hold the sk_buff structures.
|
||||||
@@ -151,8 +173,8 @@ benefits:
|
|||||||
packet is running.
|
packet is running.
|
||||||
- In hardware interrupt re-direction.
|
- In hardware interrupt re-direction.
|
||||||
|
|
||||||
Interrupt Modes:
|
Interrupt Modes
|
||||||
================
|
===============
|
||||||
The driver assigns a single MSI-X vector per queue pair (for both Tx
|
The driver assigns a single MSI-X vector per queue pair (for both Tx
|
||||||
and Rx directions). The driver assigns an additional dedicated MSI-X vector
|
and Rx directions). The driver assigns an additional dedicated MSI-X vector
|
||||||
for management (for ACQ and AENQ).
|
for management (for ACQ and AENQ).
|
||||||
@@ -163,9 +185,12 @@ removed. I/O queue interrupt registration is performed when the Linux
|
|||||||
interface of the adapter is opened, and it is de-registered when the
|
interface of the adapter is opened, and it is de-registered when the
|
||||||
interface is closed.
|
interface is closed.
|
||||||
|
|
||||||
The management interrupt is named:
|
The management interrupt is named::
|
||||||
|
|
||||||
ena-mgmnt@pci:<PCI domain:bus:slot.function>
|
ena-mgmnt@pci:<PCI domain:bus:slot.function>
|
||||||
and for each queue pair, an interrupt is named:
|
|
||||||
|
and for each queue pair, an interrupt is named::
|
||||||
|
|
||||||
<interface name>-Tx-Rx-<queue index>
|
<interface name>-Tx-Rx-<queue index>
|
||||||
|
|
||||||
The ENA device operates in auto-mask and auto-clear interrupt
|
The ENA device operates in auto-mask and auto-clear interrupt
|
||||||
@@ -173,8 +198,8 @@ modes. That is, once MSI-X is delivered to the host, its Cause bit is
|
|||||||
automatically cleared and the interrupt is masked. The interrupt is
|
automatically cleared and the interrupt is masked. The interrupt is
|
||||||
unmasked by the driver after NAPI processing is complete.
|
unmasked by the driver after NAPI processing is complete.
|
||||||
|
|
||||||
Interrupt Moderation:
|
Interrupt Moderation
|
||||||
=====================
|
====================
|
||||||
ENA driver and device can operate in conventional or adaptive interrupt
|
ENA driver and device can operate in conventional or adaptive interrupt
|
||||||
moderation mode.
|
moderation mode.
|
||||||
|
|
||||||
@@ -202,45 +227,46 @@ delay value to each level.
|
|||||||
The user can enable/disable adaptive moderation, modify the interrupt
|
The user can enable/disable adaptive moderation, modify the interrupt
|
||||||
delay table and restore its default values through sysfs.
|
delay table and restore its default values through sysfs.
|
||||||
|
|
||||||
RX copybreak:
|
RX copybreak
|
||||||
=============
|
============
|
||||||
The rx_copybreak is initialized by default to ENA_DEFAULT_RX_COPYBREAK
|
The rx_copybreak is initialized by default to ENA_DEFAULT_RX_COPYBREAK
|
||||||
and can be configured by the ETHTOOL_STUNABLE command of the
|
and can be configured by the ETHTOOL_STUNABLE command of the
|
||||||
SIOCETHTOOL ioctl.
|
SIOCETHTOOL ioctl.
|
||||||
|
|
||||||
SKB:
|
SKB
|
||||||
====
|
===
|
||||||
The driver-allocated SKB for frames received from Rx handling using
|
The driver-allocated SKB for frames received from Rx handling using
|
||||||
NAPI context. The allocation method depends on the size of the packet.
|
NAPI context. The allocation method depends on the size of the packet.
|
||||||
If the frame length is larger than rx_copybreak, napi_get_frags()
|
If the frame length is larger than rx_copybreak, napi_get_frags()
|
||||||
is used, otherwise netdev_alloc_skb_ip_align() is used, the buffer
|
is used, otherwise netdev_alloc_skb_ip_align() is used, the buffer
|
||||||
content is copied (by CPU) to the SKB, and the buffer is recycled.
|
content is copied (by CPU) to the SKB, and the buffer is recycled.
|
||||||
|
|
||||||
Statistics:
|
Statistics
|
||||||
===========
|
==========
|
||||||
The user can obtain ENA device and driver statistics using ethtool.
|
The user can obtain ENA device and driver statistics using ethtool.
|
||||||
The driver can collect regular or extended statistics (including
|
The driver can collect regular or extended statistics (including
|
||||||
per-queue stats) from the device.
|
per-queue stats) from the device.
|
||||||
|
|
||||||
In addition the driver logs the stats to syslog upon device reset.
|
In addition the driver logs the stats to syslog upon device reset.
|
||||||
|
|
||||||
MTU:
|
MTU
|
||||||
====
|
===
|
||||||
The driver supports an arbitrarily large MTU with a maximum that is
|
The driver supports an arbitrarily large MTU with a maximum that is
|
||||||
negotiated with the device. The driver configures MTU using the
|
negotiated with the device. The driver configures MTU using the
|
||||||
SetFeature command (ENA_ADMIN_MTU property). The user can change MTU
|
SetFeature command (ENA_ADMIN_MTU property). The user can change MTU
|
||||||
via ip(8) and similar legacy tools.
|
via ip(8) and similar legacy tools.
|
||||||
|
|
||||||
Stateless Offloads:
|
Stateless Offloads
|
||||||
===================
|
==================
|
||||||
The ENA driver supports:
|
The ENA driver supports:
|
||||||
|
|
||||||
- TSO over IPv4/IPv6
|
- TSO over IPv4/IPv6
|
||||||
- TSO with ECN
|
- TSO with ECN
|
||||||
- IPv4 header checksum offload
|
- IPv4 header checksum offload
|
||||||
- TCP/UDP over IPv4/IPv6 checksum offloads
|
- TCP/UDP over IPv4/IPv6 checksum offloads
|
||||||
|
|
||||||
RSS:
|
RSS
|
||||||
====
|
===
|
||||||
- The ENA device supports RSS that allows flexible Rx traffic
|
- The ENA device supports RSS that allows flexible Rx traffic
|
||||||
steering.
|
steering.
|
||||||
- Toeplitz and CRC32 hash functions are supported.
|
- Toeplitz and CRC32 hash functions are supported.
|
||||||
@@ -255,11 +281,13 @@ RSS:
|
|||||||
- The user can provide a hash key, hash function, and configure the
|
- The user can provide a hash key, hash function, and configure the
|
||||||
indirection table through ethtool(8).
|
indirection table through ethtool(8).
|
||||||
|
|
||||||
DATA PATH:
|
DATA PATH
|
||||||
==========
|
=========
|
||||||
Tx:
|
Tx
|
||||||
---
|
--
|
||||||
|
|
||||||
end_start_xmit() is called by the stack. This function does the following:
|
end_start_xmit() is called by the stack. This function does the following:
|
||||||
|
|
||||||
- Maps data buffers (skb->data and frags).
|
- Maps data buffers (skb->data and frags).
|
||||||
- Populates ena_buf for the push buffer (if the driver and device are
|
- Populates ena_buf for the push buffer (if the driver and device are
|
||||||
in push mode.)
|
in push mode.)
|
||||||
@@ -271,8 +299,10 @@ end_start_xmit() is called by the stack. This function does the following:
|
|||||||
- Calls ena_com_prepare_tx(), an ENA communication layer that converts
|
- Calls ena_com_prepare_tx(), an ENA communication layer that converts
|
||||||
the ena_bufs to ENA descriptors (and adds meta ENA descriptors as
|
the ena_bufs to ENA descriptors (and adds meta ENA descriptors as
|
||||||
needed.)
|
needed.)
|
||||||
|
|
||||||
* This function also copies the ENA descriptors and the push buffer
|
* This function also copies the ENA descriptors and the push buffer
|
||||||
to the Device memory space (if in push mode.)
|
to the Device memory space (if in push mode.)
|
||||||
|
|
||||||
- Writes doorbell to the ENA device.
|
- Writes doorbell to the ENA device.
|
||||||
- When the ENA device finishes sending the packet, a completion
|
- When the ENA device finishes sending the packet, a completion
|
||||||
interrupt is raised.
|
interrupt is raised.
|
||||||
@@ -280,14 +310,16 @@ end_start_xmit() is called by the stack. This function does the following:
|
|||||||
- The ena_clean_tx_irq() function is called. This function handles the
|
- The ena_clean_tx_irq() function is called. This function handles the
|
||||||
completion descriptors generated by the ENA, with a single
|
completion descriptors generated by the ENA, with a single
|
||||||
completion descriptor per completed packet.
|
completion descriptor per completed packet.
|
||||||
|
|
||||||
* req_id is retrieved from the completion descriptor. The tx_info of
|
* req_id is retrieved from the completion descriptor. The tx_info of
|
||||||
the packet is retrieved via the req_id. The data buffers are
|
the packet is retrieved via the req_id. The data buffers are
|
||||||
unmapped and req_id is returned to the empty req_id ring.
|
unmapped and req_id is returned to the empty req_id ring.
|
||||||
* The function stops when the completion descriptors are completed or
|
* The function stops when the completion descriptors are completed or
|
||||||
the budget is reached.
|
the budget is reached.
|
||||||
|
|
||||||
Rx:
|
Rx
|
||||||
---
|
--
|
||||||
|
|
||||||
- When a packet is received from the ENA device.
|
- When a packet is received from the ENA device.
|
||||||
- The interrupt handler schedules NAPI.
|
- The interrupt handler schedules NAPI.
|
||||||
- The ena_clean_rx_irq() function is called. This function calls
|
- The ena_clean_rx_irq() function is called. This function calls
|
||||||
@@ -296,13 +328,17 @@ Rx:
|
|||||||
no new packet is found.
|
no new packet is found.
|
||||||
- Then it calls the ena_clean_rx_irq() function.
|
- Then it calls the ena_clean_rx_irq() function.
|
||||||
- ena_eth_rx_skb() checks packet length:
|
- ena_eth_rx_skb() checks packet length:
|
||||||
|
|
||||||
* If the packet is small (len < rx_copybreak), the driver allocates
|
* If the packet is small (len < rx_copybreak), the driver allocates
|
||||||
a SKB for the new packet, and copies the packet payload into the
|
a SKB for the new packet, and copies the packet payload into the
|
||||||
SKB data buffer.
|
SKB data buffer.
|
||||||
|
|
||||||
- In this way the original data buffer is not passed to the stack
|
- In this way the original data buffer is not passed to the stack
|
||||||
and is reused for future Rx packets.
|
and is reused for future Rx packets.
|
||||||
|
|
||||||
* Otherwise the function unmaps the Rx buffer, then allocates the
|
* Otherwise the function unmaps the Rx buffer, then allocates the
|
||||||
new SKB structure and hooks the Rx buffer to the SKB frags.
|
new SKB structure and hooks the Rx buffer to the SKB frags.
|
||||||
|
|
||||||
- The new SKB is updated with the necessary information (protocol,
|
- The new SKB is updated with the necessary information (protocol,
|
||||||
checksum hw verify result, etc.), and then passed to the network
|
checksum hw verify result, etc.), and then passed to the network
|
||||||
stack, using the NAPI interface function napi_gro_receive().
|
stack, using the NAPI interface function napi_gro_receive().
|
@@ -1,67 +1,80 @@
|
|||||||
Marvell(Aquantia) AQtion Driver for the aQuantia Multi-Gigabit PCI Express
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
Family of Ethernet Adapters
|
.. include:: <isonum.txt>
|
||||||
=============================================================================
|
|
||||||
|
|
||||||
Contents
|
===============================
|
||||||
========
|
Marvell(Aquantia) AQtion Driver
|
||||||
|
===============================
|
||||||
|
|
||||||
- Identifying Your Adapter
|
For the aQuantia Multi-Gigabit PCI Express Family of Ethernet Adapters
|
||||||
- Configuration
|
|
||||||
- Supported ethtool options
|
.. Contents
|
||||||
- Command Line Parameters
|
|
||||||
- Config file parameters
|
- Identifying Your Adapter
|
||||||
- Support
|
- Configuration
|
||||||
- License
|
- Supported ethtool options
|
||||||
|
- Command Line Parameters
|
||||||
|
- Config file parameters
|
||||||
|
- Support
|
||||||
|
- License
|
||||||
|
|
||||||
Identifying Your Adapter
|
Identifying Your Adapter
|
||||||
========================
|
========================
|
||||||
|
|
||||||
The driver in this release is compatible with AQC-100, AQC-107, AQC-108 based ethernet adapters.
|
The driver in this release is compatible with AQC-100, AQC-107, AQC-108
|
||||||
|
based ethernet adapters.
|
||||||
|
|
||||||
|
|
||||||
SFP+ Devices (for AQC-100 based adapters)
|
SFP+ Devices (for AQC-100 based adapters)
|
||||||
----------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
This release tested with passive Direct Attach Cables (DAC) and SFP+/LC Optical Transceiver.
|
This release tested with passive Direct Attach Cables (DAC) and SFP+/LC
|
||||||
|
Optical Transceiver.
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
=========================
|
=============
|
||||||
Viewing Link Messages
|
|
||||||
---------------------
|
Viewing Link Messages
|
||||||
|
---------------------
|
||||||
Link messages will not be displayed to the console if the distribution is
|
Link messages will not be displayed to the console if the distribution is
|
||||||
restricting system messages. In order to see network driver link messages on
|
restricting system messages. In order to see network driver link messages on
|
||||||
your console, set dmesg to eight by entering the following:
|
your console, set dmesg to eight by entering the following::
|
||||||
|
|
||||||
dmesg -n 8
|
dmesg -n 8
|
||||||
|
|
||||||
NOTE: This setting is not saved across reboots.
|
.. note::
|
||||||
|
|
||||||
Jumbo Frames
|
This setting is not saved across reboots.
|
||||||
------------
|
|
||||||
|
Jumbo Frames
|
||||||
|
------------
|
||||||
The driver supports Jumbo Frames for all adapters. Jumbo Frames support is
|
The driver supports Jumbo Frames for all adapters. Jumbo Frames support is
|
||||||
enabled by changing the MTU to a value larger than the default of 1500.
|
enabled by changing the MTU to a value larger than the default of 1500.
|
||||||
The maximum value for the MTU is 16000. Use the `ip` command to
|
The maximum value for the MTU is 16000. Use the `ip` command to
|
||||||
increase the MTU size. For example:
|
increase the MTU size. For example::
|
||||||
|
|
||||||
ip link set mtu 16000 dev enp1s0
|
ip link set mtu 16000 dev enp1s0
|
||||||
|
|
||||||
ethtool
|
ethtool
|
||||||
-------
|
-------
|
||||||
The driver utilizes the ethtool interface for driver configuration and
|
The driver utilizes the ethtool interface for driver configuration and
|
||||||
diagnostics, as well as displaying statistical information. The latest
|
diagnostics, as well as displaying statistical information. The latest
|
||||||
ethtool version is required for this functionality.
|
ethtool version is required for this functionality.
|
||||||
|
|
||||||
NAPI
|
NAPI
|
||||||
----
|
----
|
||||||
NAPI (Rx polling mode) is supported in the atlantic driver.
|
NAPI (Rx polling mode) is supported in the atlantic driver.
|
||||||
|
|
||||||
Supported ethtool options
|
Supported ethtool options
|
||||||
============================
|
=========================
|
||||||
Viewing adapter settings
|
|
||||||
---------------------
|
Viewing adapter settings
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
ethtool <ethX>
|
ethtool <ethX>
|
||||||
|
|
||||||
Output example:
|
Output example::
|
||||||
|
|
||||||
Settings for enp1s0:
|
Settings for enp1s0:
|
||||||
Supported ports: [ TP ]
|
Supported ports: [ TP ]
|
||||||
@@ -92,16 +105,22 @@ Supported ethtool options
|
|||||||
Wake-on: d
|
Wake-on: d
|
||||||
Link detected: yes
|
Link detected: yes
|
||||||
|
|
||||||
---
|
|
||||||
Note: AQrate speeds (2.5/5 Gb/s) will be displayed only with linux kernels > 4.10.
|
.. note::
|
||||||
But you can still use these speeds:
|
|
||||||
|
AQrate speeds (2.5/5 Gb/s) will be displayed only with linux kernels > 4.10.
|
||||||
|
But you can still use these speeds::
|
||||||
|
|
||||||
ethtool -s eth0 autoneg off speed 2500
|
ethtool -s eth0 autoneg off speed 2500
|
||||||
|
|
||||||
Viewing adapter information
|
Viewing adapter information
|
||||||
---------------------
|
---------------------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
ethtool -i <ethX>
|
ethtool -i <ethX>
|
||||||
|
|
||||||
Output example:
|
Output example::
|
||||||
|
|
||||||
driver: atlantic
|
driver: atlantic
|
||||||
version: 5.2.0-050200rc5-generic-kern
|
version: 5.2.0-050200rc5-generic-kern
|
||||||
@@ -115,11 +134,15 @@ Supported ethtool options
|
|||||||
supports-priv-flags: no
|
supports-priv-flags: no
|
||||||
|
|
||||||
|
|
||||||
Viewing Ethernet adapter statistics:
|
Viewing Ethernet adapter statistics
|
||||||
---------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
ethtool -S <ethX>
|
ethtool -S <ethX>
|
||||||
|
|
||||||
Output example:
|
Output example::
|
||||||
|
|
||||||
NIC statistics:
|
NIC statistics:
|
||||||
InPackets: 13238607
|
InPackets: 13238607
|
||||||
InUCast: 13293852
|
InUCast: 13293852
|
||||||
@@ -164,77 +187,86 @@ Supported ethtool options
|
|||||||
Queue[3] InLroPackets: 0
|
Queue[3] InLroPackets: 0
|
||||||
Queue[3] InErrors: 0
|
Queue[3] InErrors: 0
|
||||||
|
|
||||||
Interrupt coalescing support
|
Interrupt coalescing support
|
||||||
---------------------------------
|
----------------------------
|
||||||
ITR mode, TX/RX coalescing timings could be viewed with:
|
|
||||||
|
ITR mode, TX/RX coalescing timings could be viewed with::
|
||||||
|
|
||||||
ethtool -c <ethX>
|
ethtool -c <ethX>
|
||||||
|
|
||||||
and changed with:
|
and changed with::
|
||||||
|
|
||||||
ethtool -C <ethX> tx-usecs <usecs> rx-usecs <usecs>
|
ethtool -C <ethX> tx-usecs <usecs> rx-usecs <usecs>
|
||||||
|
|
||||||
To disable coalescing:
|
To disable coalescing::
|
||||||
|
|
||||||
ethtool -C <ethX> tx-usecs 0 rx-usecs 0 tx-max-frames 1 tx-max-frames 1
|
ethtool -C <ethX> tx-usecs 0 rx-usecs 0 tx-max-frames 1 tx-max-frames 1
|
||||||
|
|
||||||
Wake on LAN support
|
Wake on LAN support
|
||||||
---------------------------------
|
-------------------
|
||||||
|
|
||||||
WOL support by magic packet:
|
WOL support by magic packet::
|
||||||
|
|
||||||
ethtool -s <ethX> wol g
|
ethtool -s <ethX> wol g
|
||||||
|
|
||||||
To disable WOL:
|
To disable WOL::
|
||||||
|
|
||||||
ethtool -s <ethX> wol d
|
ethtool -s <ethX> wol d
|
||||||
|
|
||||||
Set and check the driver message level
|
Set and check the driver message level
|
||||||
---------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
Set message level
|
Set message level
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
ethtool -s <ethX> msglvl <level>
|
ethtool -s <ethX> msglvl <level>
|
||||||
|
|
||||||
Level values:
|
Level values:
|
||||||
|
|
||||||
0x0001 - general driver status.
|
====== =============================
|
||||||
0x0002 - hardware probing.
|
0x0001 general driver status.
|
||||||
0x0004 - link state.
|
0x0002 hardware probing.
|
||||||
0x0008 - periodic status check.
|
0x0004 link state.
|
||||||
0x0010 - interface being brought down.
|
0x0008 periodic status check.
|
||||||
0x0020 - interface being brought up.
|
0x0010 interface being brought down.
|
||||||
0x0040 - receive error.
|
0x0020 interface being brought up.
|
||||||
0x0080 - transmit error.
|
0x0040 receive error.
|
||||||
0x0200 - interrupt handling.
|
0x0080 transmit error.
|
||||||
0x0400 - transmit completion.
|
0x0200 interrupt handling.
|
||||||
0x0800 - receive completion.
|
0x0400 transmit completion.
|
||||||
0x1000 - packet contents.
|
0x0800 receive completion.
|
||||||
0x2000 - hardware status.
|
0x1000 packet contents.
|
||||||
0x4000 - Wake-on-LAN status.
|
0x2000 hardware status.
|
||||||
|
0x4000 Wake-on-LAN status.
|
||||||
|
====== =============================
|
||||||
|
|
||||||
By default, the level of debugging messages is set 0x0001(general driver status).
|
By default, the level of debugging messages is set 0x0001(general driver status).
|
||||||
|
|
||||||
Check message level
|
Check message level
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
ethtool <ethX> | grep "Current message level"
|
ethtool <ethX> | grep "Current message level"
|
||||||
|
|
||||||
If you want to disable the output of messages
|
If you want to disable the output of messages::
|
||||||
|
|
||||||
ethtool -s <ethX> msglvl 0
|
ethtool -s <ethX> msglvl 0
|
||||||
|
|
||||||
RX flow rules (ntuple filters)
|
RX flow rules (ntuple filters)
|
||||||
---------------------------------
|
------------------------------
|
||||||
|
|
||||||
There are separate rules supported, that applies in that order:
|
There are separate rules supported, that applies in that order:
|
||||||
|
|
||||||
1. 16 VLAN ID rules
|
1. 16 VLAN ID rules
|
||||||
2. 16 L2 EtherType rules
|
2. 16 L2 EtherType rules
|
||||||
3. 8 L3/L4 5-Tuple rules
|
3. 8 L3/L4 5-Tuple rules
|
||||||
|
|
||||||
|
|
||||||
The driver utilizes the ethtool interface for configuring ntuple filters,
|
The driver utilizes the ethtool interface for configuring ntuple filters,
|
||||||
via "ethtool -N <device> <filter>".
|
via ``ethtool -N <device> <filter>``.
|
||||||
|
|
||||||
To enable or disable the RX flow rules:
|
To enable or disable the RX flow rules::
|
||||||
|
|
||||||
ethtool -K ethX ntuple <on|off>
|
ethtool -K ethX ntuple <on|off>
|
||||||
|
|
||||||
@@ -243,6 +275,7 @@ Supported ethtool options
|
|||||||
be re-added when ntuple is re-enabled.
|
be re-added when ntuple is re-enabled.
|
||||||
|
|
||||||
Because of the fixed order of the rules, the location of filters is also fixed:
|
Because of the fixed order of the rules, the location of filters is also fixed:
|
||||||
|
|
||||||
- Locations 0 - 15 for VLAN ID filters
|
- Locations 0 - 15 for VLAN ID filters
|
||||||
- Locations 16 - 31 for L2 EtherType filters
|
- Locations 16 - 31 for L2 EtherType filters
|
||||||
- Locations 32 - 39 for L3/L4 5-tuple filters (locations 32, 36 for IPv6)
|
- Locations 32 - 39 for L3/L4 5-tuple filters (locations 32, 36 for IPv6)
|
||||||
@@ -253,32 +286,34 @@ Supported ethtool options
|
|||||||
addresses can be supported. Source and destination ports are only compared for
|
addresses can be supported. Source and destination ports are only compared for
|
||||||
TCP/UDP/SCTP packets.
|
TCP/UDP/SCTP packets.
|
||||||
|
|
||||||
To add a filter that directs packet to queue 5, use <-N|-U|--config-nfc|--config-ntuple> switch:
|
To add a filter that directs packet to queue 5, use
|
||||||
|
``<-N|-U|--config-nfc|--config-ntuple>`` switch::
|
||||||
|
|
||||||
ethtool -N <ethX> flow-type udp4 src-ip 10.0.0.1 dst-ip 10.0.0.2 src-port 2000 dst-port 2001 action 5 <loc 32>
|
ethtool -N <ethX> flow-type udp4 src-ip 10.0.0.1 dst-ip 10.0.0.2 src-port 2000 dst-port 2001 action 5 <loc 32>
|
||||||
|
|
||||||
- action is the queue number.
|
- action is the queue number.
|
||||||
- loc is the rule number.
|
- loc is the rule number.
|
||||||
|
|
||||||
For "flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6" you must set the loc
|
For ``flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6`` you must set the loc
|
||||||
number within 32 - 39.
|
number within 32 - 39.
|
||||||
For "flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6" you can set 8 rules
|
For ``flow-type ip4|udp4|tcp4|sctp4|ip6|udp6|tcp6|sctp6`` you can set 8 rules
|
||||||
for traffic IPv4 or you can set 2 rules for traffic IPv6. Loc number traffic
|
for traffic IPv4 or you can set 2 rules for traffic IPv6. Loc number traffic
|
||||||
IPv6 is 32 and 36.
|
IPv6 is 32 and 36.
|
||||||
At the moment you can not use IPv4 and IPv6 filters at the same time.
|
At the moment you can not use IPv4 and IPv6 filters at the same time.
|
||||||
|
|
||||||
Example filter for IPv6 filter traffic:
|
Example filter for IPv6 filter traffic::
|
||||||
|
|
||||||
sudo ethtool -N <ethX> flow-type tcp6 src-ip 2001:db8:0:f101::1 dst-ip 2001:db8:0:f101::2 action 1 loc 32
|
sudo ethtool -N <ethX> flow-type tcp6 src-ip 2001:db8:0:f101::1 dst-ip 2001:db8:0:f101::2 action 1 loc 32
|
||||||
sudo ethtool -N <ethX> flow-type ip6 src-ip 2001:db8:0:f101::2 dst-ip 2001:db8:0:f101::5 action -1 loc 36
|
sudo ethtool -N <ethX> flow-type ip6 src-ip 2001:db8:0:f101::2 dst-ip 2001:db8:0:f101::5 action -1 loc 36
|
||||||
|
|
||||||
Example filter for IPv4 filter traffic:
|
Example filter for IPv4 filter traffic::
|
||||||
|
|
||||||
sudo ethtool -N <ethX> flow-type udp4 src-ip 10.0.0.4 dst-ip 10.0.0.7 src-port 2000 dst-port 2001 loc 32
|
sudo ethtool -N <ethX> flow-type udp4 src-ip 10.0.0.4 dst-ip 10.0.0.7 src-port 2000 dst-port 2001 loc 32
|
||||||
sudo ethtool -N <ethX> flow-type tcp4 src-ip 10.0.0.3 dst-ip 10.0.0.9 src-port 2000 dst-port 2001 loc 33
|
sudo ethtool -N <ethX> flow-type tcp4 src-ip 10.0.0.3 dst-ip 10.0.0.9 src-port 2000 dst-port 2001 loc 33
|
||||||
sudo ethtool -N <ethX> flow-type ip4 src-ip 10.0.0.6 dst-ip 10.0.0.4 loc 34
|
sudo ethtool -N <ethX> flow-type ip4 src-ip 10.0.0.6 dst-ip 10.0.0.4 loc 34
|
||||||
|
|
||||||
If you set action -1, then all traffic corresponding to the filter will be discarded.
|
If you set action -1, then all traffic corresponding to the filter will be discarded.
|
||||||
|
|
||||||
The maximum value action is 31.
|
The maximum value action is 31.
|
||||||
|
|
||||||
|
|
||||||
@@ -287,7 +322,8 @@ Supported ethtool options
|
|||||||
from L2 Ethertype filter with UserPriority since both User Priority and VLAN ID
|
from L2 Ethertype filter with UserPriority since both User Priority and VLAN ID
|
||||||
are passed in the same 'vlan' parameter.
|
are passed in the same 'vlan' parameter.
|
||||||
|
|
||||||
To add a filter that directs packets from VLAN 2001 to queue 5:
|
To add a filter that directs packets from VLAN 2001 to queue 5::
|
||||||
|
|
||||||
ethtool -N <ethX> flow-type ip4 vlan 2001 m 0xF000 action 1 loc 0
|
ethtool -N <ethX> flow-type ip4 vlan 2001 m 0xF000 action 1 loc 0
|
||||||
|
|
||||||
|
|
||||||
@@ -297,15 +333,15 @@ Supported ethtool options
|
|||||||
distinguish VLAN filter from L2 Ethertype filter with UserPriority since both
|
distinguish VLAN filter from L2 Ethertype filter with UserPriority since both
|
||||||
User Priority and VLAN ID are passed in the same 'vlan' parameter.
|
User Priority and VLAN ID are passed in the same 'vlan' parameter.
|
||||||
|
|
||||||
To add a filter that directs IP4 packess of priority 3 to queue 3:
|
To add a filter that directs IP4 packess of priority 3 to queue 3::
|
||||||
|
|
||||||
ethtool -N <ethX> flow-type ether proto 0x800 vlan 0x600 m 0x1FFF action 3 loc 16
|
ethtool -N <ethX> flow-type ether proto 0x800 vlan 0x600 m 0x1FFF action 3 loc 16
|
||||||
|
|
||||||
|
To see the list of filters currently present::
|
||||||
To see the list of filters currently present:
|
|
||||||
|
|
||||||
ethtool <-u|-n|--show-nfc|--show-ntuple> <ethX>
|
ethtool <-u|-n|--show-nfc|--show-ntuple> <ethX>
|
||||||
|
|
||||||
Rules may be deleted from the table itself. This is done using:
|
Rules may be deleted from the table itself. This is done using::
|
||||||
|
|
||||||
sudo ethtool <-N|-U|--config-nfc|--config-ntuple> <ethX> delete <loc>
|
sudo ethtool <-N|-U|--config-nfc|--config-ntuple> <ethX> delete <loc>
|
||||||
|
|
||||||
@@ -316,34 +352,37 @@ Supported ethtool options
|
|||||||
case, any flow that matches the filter criteria will be directed to the
|
case, any flow that matches the filter criteria will be directed to the
|
||||||
appropriate queue. RX filters is supported on all kernels 2.6.30 and later.
|
appropriate queue. RX filters is supported on all kernels 2.6.30 and later.
|
||||||
|
|
||||||
RSS for UDP
|
RSS for UDP
|
||||||
---------------------------------
|
-----------
|
||||||
|
|
||||||
Currently, NIC does not support RSS for fragmented IP packets, which leads to
|
Currently, NIC does not support RSS for fragmented IP packets, which leads to
|
||||||
incorrect working of RSS for fragmented UDP traffic. To disable RSS for UDP the
|
incorrect working of RSS for fragmented UDP traffic. To disable RSS for UDP the
|
||||||
RX Flow L3/L4 rule may be used.
|
RX Flow L3/L4 rule may be used.
|
||||||
|
|
||||||
Example:
|
Example::
|
||||||
|
|
||||||
ethtool -N eth0 flow-type udp4 action 0 loc 32
|
ethtool -N eth0 flow-type udp4 action 0 loc 32
|
||||||
|
|
||||||
UDP GSO hardware offload
|
UDP GSO hardware offload
|
||||||
---------------------------------
|
------------------------
|
||||||
|
|
||||||
UDP GSO allows to boost UDP tx rates by offloading UDP headers allocation
|
UDP GSO allows to boost UDP tx rates by offloading UDP headers allocation
|
||||||
into hardware. A special userspace socket option is required for this,
|
into hardware. A special userspace socket option is required for this,
|
||||||
could be validated with /kernel/tools/testing/selftests/net/
|
could be validated with /kernel/tools/testing/selftests/net/::
|
||||||
|
|
||||||
udpgso_bench_tx -u -4 -D 10.0.1.1 -s 6300 -S 100
|
udpgso_bench_tx -u -4 -D 10.0.1.1 -s 6300 -S 100
|
||||||
|
|
||||||
Will cause sending out of 100 byte sized UDP packets formed from single
|
Will cause sending out of 100 byte sized UDP packets formed from single
|
||||||
6300 bytes user buffer.
|
6300 bytes user buffer.
|
||||||
|
|
||||||
UDP GSO is configured by:
|
UDP GSO is configured by::
|
||||||
|
|
||||||
ethtool -K eth0 tx-udp-segmentation on
|
ethtool -K eth0 tx-udp-segmentation on
|
||||||
|
|
||||||
Private flags (testing)
|
Private flags (testing)
|
||||||
---------------------------------
|
-----------------------
|
||||||
|
|
||||||
Atlantic driver supports private flags for hardware custom features:
|
Atlantic driver supports private flags for hardware custom features::
|
||||||
|
|
||||||
$ ethtool --show-priv-flags ethX
|
$ ethtool --show-priv-flags ethX
|
||||||
|
|
||||||
@@ -354,7 +393,7 @@ Supported ethtool options
|
|||||||
PHYInternalLoopback: off
|
PHYInternalLoopback: off
|
||||||
PHYExternalLoopback: off
|
PHYExternalLoopback: off
|
||||||
|
|
||||||
Example:
|
Example::
|
||||||
|
|
||||||
$ ethtool --set-priv-flags ethX DMASystemLoopback on
|
$ ethtool --set-priv-flags ethX DMASystemLoopback on
|
||||||
|
|
||||||
@@ -370,93 +409,130 @@ Command Line Parameters
|
|||||||
The following command line parameters are available on atlantic driver:
|
The following command line parameters are available on atlantic driver:
|
||||||
|
|
||||||
aq_itr -Interrupt throttling mode
|
aq_itr -Interrupt throttling mode
|
||||||
----------------------------------------
|
---------------------------------
|
||||||
Accepted values: 0, 1, 0xFFFF
|
Accepted values: 0, 1, 0xFFFF
|
||||||
|
|
||||||
Default value: 0xFFFF
|
Default value: 0xFFFF
|
||||||
0 - Disable interrupt throttling.
|
|
||||||
1 - Enable interrupt throttling and use specified tx and rx rates.
|
====== ==============================================================
|
||||||
0xFFFF - Auto throttling mode. Driver will choose the best RX and TX
|
0 Disable interrupt throttling.
|
||||||
|
1 Enable interrupt throttling and use specified tx and rx rates.
|
||||||
|
0xFFFF Auto throttling mode. Driver will choose the best RX and TX
|
||||||
interrupt throtting settings based on link speed.
|
interrupt throtting settings based on link speed.
|
||||||
|
====== ==============================================================
|
||||||
|
|
||||||
aq_itr_tx - TX interrupt throttle rate
|
aq_itr_tx - TX interrupt throttle rate
|
||||||
----------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
Accepted values: 0 - 0x1FF
|
Accepted values: 0 - 0x1FF
|
||||||
|
|
||||||
Default value: 0
|
Default value: 0
|
||||||
|
|
||||||
TX side throttling in microseconds. Adapter will setup maximum interrupt delay
|
TX side throttling in microseconds. Adapter will setup maximum interrupt delay
|
||||||
to this value. Minimum interrupt delay will be a half of this value
|
to this value. Minimum interrupt delay will be a half of this value
|
||||||
|
|
||||||
aq_itr_rx - RX interrupt throttle rate
|
aq_itr_rx - RX interrupt throttle rate
|
||||||
----------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
Accepted values: 0 - 0x1FF
|
Accepted values: 0 - 0x1FF
|
||||||
|
|
||||||
Default value: 0
|
Default value: 0
|
||||||
|
|
||||||
RX side throttling in microseconds. Adapter will setup maximum interrupt delay
|
RX side throttling in microseconds. Adapter will setup maximum interrupt delay
|
||||||
to this value. Minimum interrupt delay will be a half of this value
|
to this value. Minimum interrupt delay will be a half of this value
|
||||||
|
|
||||||
Note: ITR settings could be changed in runtime by ethtool -c means (see below)
|
.. note::
|
||||||
|
|
||||||
|
ITR settings could be changed in runtime by ethtool -c means (see below)
|
||||||
|
|
||||||
Config file parameters
|
Config file parameters
|
||||||
=======================
|
======================
|
||||||
|
|
||||||
For some fine tuning and performance optimizations,
|
For some fine tuning and performance optimizations,
|
||||||
some parameters can be changed in the {source_dir}/aq_cfg.h file.
|
some parameters can be changed in the {source_dir}/aq_cfg.h file.
|
||||||
|
|
||||||
AQ_CFG_RX_PAGEORDER
|
AQ_CFG_RX_PAGEORDER
|
||||||
----------------------------------------
|
-------------------
|
||||||
|
|
||||||
Default value: 0
|
Default value: 0
|
||||||
|
|
||||||
RX page order override. Thats a power of 2 number of RX pages allocated for
|
RX page order override. Thats a power of 2 number of RX pages allocated for
|
||||||
each descriptor. Received descriptor size is still limited by AQ_CFG_RX_FRAME_MAX.
|
each descriptor. Received descriptor size is still limited by
|
||||||
|
AQ_CFG_RX_FRAME_MAX.
|
||||||
|
|
||||||
Increasing pageorder makes page reuse better (actual on iommu enabled systems).
|
Increasing pageorder makes page reuse better (actual on iommu enabled systems).
|
||||||
|
|
||||||
AQ_CFG_RX_REFILL_THRES
|
AQ_CFG_RX_REFILL_THRES
|
||||||
----------------------------------------
|
----------------------
|
||||||
|
|
||||||
Default value: 32
|
Default value: 32
|
||||||
|
|
||||||
RX refill threshold. RX path will not refill freed descriptors until the
|
RX refill threshold. RX path will not refill freed descriptors until the
|
||||||
specified number of free descriptors is observed. Larger values may help
|
specified number of free descriptors is observed. Larger values may help
|
||||||
better page reuse but may lead to packet drops as well.
|
better page reuse but may lead to packet drops as well.
|
||||||
|
|
||||||
AQ_CFG_VECS_DEF
|
AQ_CFG_VECS_DEF
|
||||||
------------------------------------------------------------
|
---------------
|
||||||
|
|
||||||
Number of queues
|
Number of queues
|
||||||
|
|
||||||
Valid Range: 0 - 8 (up to AQ_CFG_VECS_MAX)
|
Valid Range: 0 - 8 (up to AQ_CFG_VECS_MAX)
|
||||||
|
|
||||||
Default value: 8
|
Default value: 8
|
||||||
|
|
||||||
Notice this value will be capped by the number of cores available on the system.
|
Notice this value will be capped by the number of cores available on the system.
|
||||||
|
|
||||||
AQ_CFG_IS_RSS_DEF
|
AQ_CFG_IS_RSS_DEF
|
||||||
------------------------------------------------------------
|
-----------------
|
||||||
|
|
||||||
Enable/disable Receive Side Scaling
|
Enable/disable Receive Side Scaling
|
||||||
|
|
||||||
This feature allows the adapter to distribute receive processing
|
This feature allows the adapter to distribute receive processing
|
||||||
across multiple CPU-cores and to prevent from overloading a single CPU core.
|
across multiple CPU-cores and to prevent from overloading a single CPU core.
|
||||||
|
|
||||||
Valid values
|
Valid values
|
||||||
0 - disabled
|
|
||||||
1 - enabled
|
== ========
|
||||||
|
0 disabled
|
||||||
|
1 enabled
|
||||||
|
== ========
|
||||||
|
|
||||||
Default value: 1
|
Default value: 1
|
||||||
|
|
||||||
AQ_CFG_NUM_RSS_QUEUES_DEF
|
AQ_CFG_NUM_RSS_QUEUES_DEF
|
||||||
------------------------------------------------------------
|
-------------------------
|
||||||
|
|
||||||
Number of queues for Receive Side Scaling
|
Number of queues for Receive Side Scaling
|
||||||
|
|
||||||
Valid Range: 0 - 8 (up to AQ_CFG_VECS_DEF)
|
Valid Range: 0 - 8 (up to AQ_CFG_VECS_DEF)
|
||||||
|
|
||||||
Default value: AQ_CFG_VECS_DEF
|
Default value: AQ_CFG_VECS_DEF
|
||||||
|
|
||||||
AQ_CFG_IS_LRO_DEF
|
AQ_CFG_IS_LRO_DEF
|
||||||
------------------------------------------------------------
|
-----------------
|
||||||
|
|
||||||
Enable/disable Large Receive Offload
|
Enable/disable Large Receive Offload
|
||||||
|
|
||||||
This offload enables the adapter to coalesce multiple TCP segments and indicate
|
This offload enables the adapter to coalesce multiple TCP segments and indicate
|
||||||
them as a single coalesced unit to the OS networking subsystem.
|
them as a single coalesced unit to the OS networking subsystem.
|
||||||
The system consumes less energy but it also introduces more latency in packets processing.
|
|
||||||
|
The system consumes less energy but it also introduces more latency in packets
|
||||||
|
processing.
|
||||||
|
|
||||||
Valid values
|
Valid values
|
||||||
0 - disabled
|
|
||||||
1 - enabled
|
== ========
|
||||||
|
0 disabled
|
||||||
|
1 enabled
|
||||||
|
== ========
|
||||||
|
|
||||||
Default value: 1
|
Default value: 1
|
||||||
|
|
||||||
AQ_CFG_TX_CLEAN_BUDGET
|
AQ_CFG_TX_CLEAN_BUDGET
|
||||||
----------------------------------------
|
----------------------
|
||||||
|
|
||||||
Maximum descriptors to cleanup on TX at once.
|
Maximum descriptors to cleanup on TX at once.
|
||||||
|
|
||||||
Default value: 256
|
Default value: 256
|
||||||
|
|
||||||
After the aq_cfg.h file changed the driver must be rebuilt to take effect.
|
After the aq_cfg.h file changed the driver must be rebuilt to take effect.
|
||||||
@@ -472,7 +548,8 @@ License
|
|||||||
=======
|
=======
|
||||||
|
|
||||||
aQuantia Corporation Network Driver
|
aQuantia Corporation Network Driver
|
||||||
Copyright(c) 2014 - 2019 aQuantia Corporation.
|
|
||||||
|
Copyright |copy| 2014 - 2019 aQuantia Corporation.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms and conditions of the GNU General Public License,
|
under the terms and conditions of the GNU General Public License,
|
@@ -1,13 +1,18 @@
|
|||||||
Chelsio N210 10Gb Ethernet Network Controller
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
.. include:: <isonum.txt>
|
||||||
|
|
||||||
Driver Release Notes for Linux
|
=============================================
|
||||||
|
Chelsio N210 10Gb Ethernet Network Controller
|
||||||
|
=============================================
|
||||||
|
|
||||||
Version 2.1.1
|
Driver Release Notes for Linux
|
||||||
|
|
||||||
June 20, 2005
|
Version 2.1.1
|
||||||
|
|
||||||
|
June 20, 2005
|
||||||
|
|
||||||
|
.. Contents
|
||||||
|
|
||||||
CONTENTS
|
|
||||||
========
|
|
||||||
INTRODUCTION
|
INTRODUCTION
|
||||||
FEATURES
|
FEATURES
|
||||||
PERFORMANCE
|
PERFORMANCE
|
||||||
@@ -16,7 +21,7 @@ CONTENTS
|
|||||||
SUPPORT
|
SUPPORT
|
||||||
|
|
||||||
|
|
||||||
INTRODUCTION
|
Introduction
|
||||||
============
|
============
|
||||||
|
|
||||||
This document describes the Linux driver for Chelsio 10Gb Ethernet Network
|
This document describes the Linux driver for Chelsio 10Gb Ethernet Network
|
||||||
@@ -24,11 +29,11 @@ INTRODUCTION
|
|||||||
compatible with the Chelsio N110 model 10Gb NICs.
|
compatible with the Chelsio N110 model 10Gb NICs.
|
||||||
|
|
||||||
|
|
||||||
FEATURES
|
Features
|
||||||
========
|
========
|
||||||
|
|
||||||
Adaptive Interrupts (adaptive-rx)
|
Adaptive Interrupts (adaptive-rx)
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
This feature provides an adaptive algorithm that adjusts the interrupt
|
This feature provides an adaptive algorithm that adjusts the interrupt
|
||||||
coalescing parameters, allowing the driver to dynamically adapt the latency
|
coalescing parameters, allowing the driver to dynamically adapt the latency
|
||||||
@@ -39,24 +44,24 @@ FEATURES
|
|||||||
ethtool manpage for additional usage information.
|
ethtool manpage for additional usage information.
|
||||||
|
|
||||||
By default, adaptive-rx is disabled.
|
By default, adaptive-rx is disabled.
|
||||||
To enable adaptive-rx:
|
To enable adaptive-rx::
|
||||||
|
|
||||||
ethtool -C <interface> adaptive-rx on
|
ethtool -C <interface> adaptive-rx on
|
||||||
|
|
||||||
To disable adaptive-rx, use ethtool:
|
To disable adaptive-rx, use ethtool::
|
||||||
|
|
||||||
ethtool -C <interface> adaptive-rx off
|
ethtool -C <interface> adaptive-rx off
|
||||||
|
|
||||||
After disabling adaptive-rx, the timer latency value will be set to 50us.
|
After disabling adaptive-rx, the timer latency value will be set to 50us.
|
||||||
You may set the timer latency after disabling adaptive-rx:
|
You may set the timer latency after disabling adaptive-rx::
|
||||||
|
|
||||||
ethtool -C <interface> rx-usecs <microseconds>
|
ethtool -C <interface> rx-usecs <microseconds>
|
||||||
|
|
||||||
An example to set the timer latency value to 100us on eth0:
|
An example to set the timer latency value to 100us on eth0::
|
||||||
|
|
||||||
ethtool -C eth0 rx-usecs 100
|
ethtool -C eth0 rx-usecs 100
|
||||||
|
|
||||||
You may also provide a timer latency value while disabling adaptive-rx:
|
You may also provide a timer latency value while disabling adaptive-rx::
|
||||||
|
|
||||||
ethtool -C <interface> adaptive-rx off rx-usecs <microseconds>
|
ethtool -C <interface> adaptive-rx off rx-usecs <microseconds>
|
||||||
|
|
||||||
@@ -64,13 +69,13 @@ FEATURES
|
|||||||
will be set to the specified value until changed by the user or until
|
will be set to the specified value until changed by the user or until
|
||||||
adaptive-rx is enabled.
|
adaptive-rx is enabled.
|
||||||
|
|
||||||
To view the status of the adaptive-rx and timer latency values:
|
To view the status of the adaptive-rx and timer latency values::
|
||||||
|
|
||||||
ethtool -c <interface>
|
ethtool -c <interface>
|
||||||
|
|
||||||
|
|
||||||
TCP Segmentation Offloading (TSO) Support
|
TCP Segmentation Offloading (TSO) Support
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
|
|
||||||
This feature, also known as "large send", enables a system's protocol stack
|
This feature, also known as "large send", enables a system's protocol stack
|
||||||
to offload portions of outbound TCP processing to a network interface card
|
to offload portions of outbound TCP processing to a network interface card
|
||||||
@@ -80,20 +85,20 @@ FEATURES
|
|||||||
Please see the ethtool manpage for additional usage information.
|
Please see the ethtool manpage for additional usage information.
|
||||||
|
|
||||||
By default, TSO is enabled.
|
By default, TSO is enabled.
|
||||||
To disable TSO:
|
To disable TSO::
|
||||||
|
|
||||||
ethtool -K <interface> tso off
|
ethtool -K <interface> tso off
|
||||||
|
|
||||||
To enable TSO:
|
To enable TSO::
|
||||||
|
|
||||||
ethtool -K <interface> tso on
|
ethtool -K <interface> tso on
|
||||||
|
|
||||||
To view the status of TSO:
|
To view the status of TSO::
|
||||||
|
|
||||||
ethtool -k <interface>
|
ethtool -k <interface>
|
||||||
|
|
||||||
|
|
||||||
PERFORMANCE
|
Performance
|
||||||
===========
|
===========
|
||||||
|
|
||||||
The following information is provided as an example of how to change system
|
The following information is provided as an example of how to change system
|
||||||
@@ -111,59 +116,81 @@ PERFORMANCE
|
|||||||
your system. You may want to write a script that runs at boot-up which
|
your system. You may want to write a script that runs at boot-up which
|
||||||
includes the optimal settings for your system.
|
includes the optimal settings for your system.
|
||||||
|
|
||||||
Setting PCI Latency Timer:
|
Setting PCI Latency Timer::
|
||||||
setpci -d 1425:* 0x0c.l=0x0000F800
|
|
||||||
|
setpci -d 1425::
|
||||||
|
|
||||||
|
* 0x0c.l=0x0000F800
|
||||||
|
|
||||||
|
Disabling TCP timestamp::
|
||||||
|
|
||||||
Disabling TCP timestamp:
|
|
||||||
sysctl -w net.ipv4.tcp_timestamps=0
|
sysctl -w net.ipv4.tcp_timestamps=0
|
||||||
|
|
||||||
Disabling SACK:
|
Disabling SACK::
|
||||||
|
|
||||||
sysctl -w net.ipv4.tcp_sack=0
|
sysctl -w net.ipv4.tcp_sack=0
|
||||||
|
|
||||||
Setting large number of incoming connection requests:
|
Setting large number of incoming connection requests::
|
||||||
|
|
||||||
sysctl -w net.ipv4.tcp_max_syn_backlog=3000
|
sysctl -w net.ipv4.tcp_max_syn_backlog=3000
|
||||||
|
|
||||||
Setting maximum receive socket buffer size:
|
Setting maximum receive socket buffer size::
|
||||||
|
|
||||||
sysctl -w net.core.rmem_max=1024000
|
sysctl -w net.core.rmem_max=1024000
|
||||||
|
|
||||||
Setting maximum send socket buffer size:
|
Setting maximum send socket buffer size::
|
||||||
|
|
||||||
sysctl -w net.core.wmem_max=1024000
|
sysctl -w net.core.wmem_max=1024000
|
||||||
|
|
||||||
Set smp_affinity (on a multiprocessor system) to a single CPU:
|
Set smp_affinity (on a multiprocessor system) to a single CPU::
|
||||||
|
|
||||||
echo 1 > /proc/irq/<interrupt_number>/smp_affinity
|
echo 1 > /proc/irq/<interrupt_number>/smp_affinity
|
||||||
|
|
||||||
Setting default receive socket buffer size:
|
Setting default receive socket buffer size::
|
||||||
|
|
||||||
sysctl -w net.core.rmem_default=524287
|
sysctl -w net.core.rmem_default=524287
|
||||||
|
|
||||||
Setting default send socket buffer size:
|
Setting default send socket buffer size::
|
||||||
|
|
||||||
sysctl -w net.core.wmem_default=524287
|
sysctl -w net.core.wmem_default=524287
|
||||||
|
|
||||||
Setting maximum option memory buffers:
|
Setting maximum option memory buffers::
|
||||||
|
|
||||||
sysctl -w net.core.optmem_max=524287
|
sysctl -w net.core.optmem_max=524287
|
||||||
|
|
||||||
Setting maximum backlog (# of unprocessed packets before kernel drops):
|
Setting maximum backlog (# of unprocessed packets before kernel drops)::
|
||||||
|
|
||||||
sysctl -w net.core.netdev_max_backlog=300000
|
sysctl -w net.core.netdev_max_backlog=300000
|
||||||
|
|
||||||
Setting TCP read buffers (min/default/max):
|
Setting TCP read buffers (min/default/max)::
|
||||||
|
|
||||||
sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"
|
sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"
|
||||||
|
|
||||||
Setting TCP write buffers (min/pressure/max):
|
Setting TCP write buffers (min/pressure/max)::
|
||||||
|
|
||||||
sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"
|
sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"
|
||||||
|
|
||||||
Setting TCP buffer space (min/pressure/max):
|
Setting TCP buffer space (min/pressure/max)::
|
||||||
|
|
||||||
sysctl -w net.ipv4.tcp_mem="10000000 10000000 10000000"
|
sysctl -w net.ipv4.tcp_mem="10000000 10000000 10000000"
|
||||||
|
|
||||||
TCP window size for single connections:
|
TCP window size for single connections:
|
||||||
|
|
||||||
The receive buffer (RX_WINDOW) size must be at least as large as the
|
The receive buffer (RX_WINDOW) size must be at least as large as the
|
||||||
Bandwidth-Delay Product of the communication link between the sender and
|
Bandwidth-Delay Product of the communication link between the sender and
|
||||||
receiver. Due to the variations of RTT, you may want to increase the buffer
|
receiver. Due to the variations of RTT, you may want to increase the buffer
|
||||||
size up to 2 times the Bandwidth-Delay Product. Reference page 289 of
|
size up to 2 times the Bandwidth-Delay Product. Reference page 289 of
|
||||||
"TCP/IP Illustrated, Volume 1, The Protocols" by W. Richard Stevens.
|
"TCP/IP Illustrated, Volume 1, The Protocols" by W. Richard Stevens.
|
||||||
At 10Gb speeds, use the following formula:
|
|
||||||
|
At 10Gb speeds, use the following formula::
|
||||||
|
|
||||||
RX_WINDOW >= 1.25MBytes * RTT(in milliseconds)
|
RX_WINDOW >= 1.25MBytes * RTT(in milliseconds)
|
||||||
Example for RTT with 100us: RX_WINDOW = (1,250,000 * 0.1) = 125,000
|
Example for RTT with 100us: RX_WINDOW = (1,250,000 * 0.1) = 125,000
|
||||||
|
|
||||||
RX_WINDOW sizes of 256KB - 512KB should be sufficient.
|
RX_WINDOW sizes of 256KB - 512KB should be sufficient.
|
||||||
Setting the min, max, and default receive buffer (RX_WINDOW) size:
|
|
||||||
|
Setting the min, max, and default receive buffer (RX_WINDOW) size::
|
||||||
|
|
||||||
sysctl -w net.ipv4.tcp_rmem="<min> <default> <max>"
|
sysctl -w net.ipv4.tcp_rmem="<min> <default> <max>"
|
||||||
|
|
||||||
TCP window size for multiple connections:
|
TCP window size for multiple connections:
|
||||||
@@ -174,30 +201,35 @@ PERFORMANCE
|
|||||||
not supported on the machine. Experimentation may be necessary to attain
|
not supported on the machine. Experimentation may be necessary to attain
|
||||||
the correct value. This method is provided as a starting point for the
|
the correct value. This method is provided as a starting point for the
|
||||||
correct receive buffer size.
|
correct receive buffer size.
|
||||||
|
|
||||||
Setting the min, max, and default receive buffer (RX_WINDOW) size is
|
Setting the min, max, and default receive buffer (RX_WINDOW) size is
|
||||||
performed in the same manner as single connection.
|
performed in the same manner as single connection.
|
||||||
|
|
||||||
|
|
||||||
DRIVER MESSAGES
|
Driver Messages
|
||||||
===============
|
===============
|
||||||
|
|
||||||
The following messages are the most common messages logged by syslog. These
|
The following messages are the most common messages logged by syslog. These
|
||||||
may be found in /var/log/messages.
|
may be found in /var/log/messages.
|
||||||
|
|
||||||
Driver up:
|
Driver up::
|
||||||
|
|
||||||
Chelsio Network Driver - version 2.1.1
|
Chelsio Network Driver - version 2.1.1
|
||||||
|
|
||||||
NIC detected:
|
NIC detected::
|
||||||
|
|
||||||
eth#: Chelsio N210 1x10GBaseX NIC (rev #), PCIX 133MHz/64-bit
|
eth#: Chelsio N210 1x10GBaseX NIC (rev #), PCIX 133MHz/64-bit
|
||||||
|
|
||||||
Link up:
|
Link up::
|
||||||
|
|
||||||
eth#: link is up at 10 Gbps, full duplex
|
eth#: link is up at 10 Gbps, full duplex
|
||||||
|
|
||||||
Link down:
|
Link down::
|
||||||
|
|
||||||
eth#: link is down
|
eth#: link is down
|
||||||
|
|
||||||
|
|
||||||
KNOWN ISSUES
|
Known Issues
|
||||||
============
|
============
|
||||||
|
|
||||||
These issues have been identified during testing. The following information
|
These issues have been identified during testing. The following information
|
||||||
@@ -214,23 +246,29 @@ KNOWN ISSUES
|
|||||||
|
|
||||||
To eliminate the TCP retransmits, set smp_affinity on the particular
|
To eliminate the TCP retransmits, set smp_affinity on the particular
|
||||||
interrupt to a single CPU. You can locate the interrupt (IRQ) used on
|
interrupt to a single CPU. You can locate the interrupt (IRQ) used on
|
||||||
the N110/N210 by using ifconfig:
|
the N110/N210 by using ifconfig::
|
||||||
|
|
||||||
ifconfig <dev_name> | grep Interrupt
|
ifconfig <dev_name> | grep Interrupt
|
||||||
Set the smp_affinity to a single CPU:
|
|
||||||
|
Set the smp_affinity to a single CPU::
|
||||||
|
|
||||||
echo 1 > /proc/irq/<interrupt_number>/smp_affinity
|
echo 1 > /proc/irq/<interrupt_number>/smp_affinity
|
||||||
|
|
||||||
It is highly suggested that you do not run the irqbalance daemon on your
|
It is highly suggested that you do not run the irqbalance daemon on your
|
||||||
system, as this will change any smp_affinity setting you have applied.
|
system, as this will change any smp_affinity setting you have applied.
|
||||||
The irqbalance daemon runs on a 10 second interval and binds interrupts
|
The irqbalance daemon runs on a 10 second interval and binds interrupts
|
||||||
to the least loaded CPU determined by the daemon. To disable this daemon:
|
to the least loaded CPU determined by the daemon. To disable this daemon::
|
||||||
|
|
||||||
chkconfig --level 2345 irqbalance off
|
chkconfig --level 2345 irqbalance off
|
||||||
|
|
||||||
By default, some Linux distributions enable the kernel feature,
|
By default, some Linux distributions enable the kernel feature,
|
||||||
irqbalance, which performs the same function as the daemon. To disable
|
irqbalance, which performs the same function as the daemon. To disable
|
||||||
this feature, add the following line to your bootloader:
|
this feature, add the following line to your bootloader::
|
||||||
|
|
||||||
noirqbalance
|
noirqbalance
|
||||||
|
|
||||||
Example using the Grub bootloader:
|
Example using the Grub bootloader::
|
||||||
|
|
||||||
title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp)
|
title Red Hat Enterprise Linux AS (2.4.21-27.ELsmp)
|
||||||
root (hd0,0)
|
root (hd0,0)
|
||||||
kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance
|
kernel /vmlinuz-2.4.21-27.ELsmp ro root=/dev/hda3 noirqbalance
|
||||||
@@ -282,6 +320,7 @@ KNOWN ISSUES
|
|||||||
programming of the PCI-X card, to the following:
|
programming of the PCI-X card, to the following:
|
||||||
|
|
||||||
Data Length (bytes): 1k
|
Data Length (bytes): 1k
|
||||||
|
|
||||||
Total allowed outstanding transactions: 2
|
Total allowed outstanding transactions: 2
|
||||||
|
|
||||||
Please refer to AMD 8131-HT/PCI-X Errata 26310 Rev 3.08 August 2004,
|
Please refer to AMD 8131-HT/PCI-X Errata 26310 Rev 3.08 August 2004,
|
||||||
@@ -293,7 +332,9 @@ KNOWN ISSUES
|
|||||||
have issues with these settings, please revert to the "safe" settings
|
have issues with these settings, please revert to the "safe" settings
|
||||||
and duplicate the problem before submitting a bug or asking for support.
|
and duplicate the problem before submitting a bug or asking for support.
|
||||||
|
|
||||||
NOTE: The default setting on most systems is 8 outstanding transactions
|
.. note::
|
||||||
|
|
||||||
|
The default setting on most systems is 8 outstanding transactions
|
||||||
and 2k bytes data length.
|
and 2k bytes data length.
|
||||||
|
|
||||||
4. On multiprocessor systems, it has been noted that an application which
|
4. On multiprocessor systems, it has been noted that an application which
|
||||||
@@ -320,14 +361,16 @@ KNOWN ISSUES
|
|||||||
particular CPU: runon 0 ifup eth0
|
particular CPU: runon 0 ifup eth0
|
||||||
|
|
||||||
|
|
||||||
SUPPORT
|
Support
|
||||||
=======
|
=======
|
||||||
|
|
||||||
If you have problems with the software or hardware, please contact our
|
If you have problems with the software or hardware, please contact our
|
||||||
customer support team via email at support@chelsio.com or check our website
|
customer support team via email at support@chelsio.com or check our website
|
||||||
at http://www.chelsio.com
|
at http://www.chelsio.com
|
||||||
|
|
||||||
===============================================================================
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
Chelsio Communications
|
Chelsio Communications
|
||||||
370 San Aleso Ave.
|
370 San Aleso Ave.
|
||||||
@@ -343,10 +386,8 @@ You should have received a copy of the GNU General Public License along
|
|||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
|
THIS SOFTWARE IS PROVIDED ``AS IS`` AND WITHOUT ANY EXPRESS OR IMPLIED
|
||||||
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
|
||||||
Copyright (c) 2003-2005 Chelsio Communications. All rights reserved.
|
Copyright |copy| 2003-2005 Chelsio Communications. All rights reserved.
|
||||||
|
|
||||||
===============================================================================
|
|
@@ -1,24 +1,27 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
NOTE
|
================================================
|
||||||
----
|
Cirrus Logic LAN CS8900/CS8920 Ethernet Adapters
|
||||||
|
================================================
|
||||||
|
|
||||||
This document was contributed by Cirrus Logic for kernel 2.2.5. This version
|
.. note::
|
||||||
has been updated for 2.3.48 by Andrew Morton.
|
|
||||||
|
This document was contributed by Cirrus Logic for kernel 2.2.5. This version
|
||||||
|
has been updated for 2.3.48 by Andrew Morton.
|
||||||
|
|
||||||
|
Still, this is too outdated! A major cleanup is needed here.
|
||||||
|
|
||||||
Cirrus make a copy of this driver available at their website, as
|
Cirrus make a copy of this driver available at their website, as
|
||||||
described below. In general, you should use the driver version which
|
described below. In general, you should use the driver version which
|
||||||
comes with your Linux distribution.
|
comes with your Linux distribution.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS
|
|
||||||
Linux Network Interface Driver ver. 2.00 <kernel 2.3.48>
|
Linux Network Interface Driver ver. 2.00 <kernel 2.3.48>
|
||||||
===============================================================================
|
|
||||||
|
|
||||||
|
|
||||||
TABLE OF CONTENTS
|
.. TABLE OF CONTENTS
|
||||||
|
|
||||||
1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS
|
1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS
|
||||||
1.1 Product Overview
|
1.1 Product Overview
|
||||||
1.2 Driver Description
|
1.2 Driver Description
|
||||||
1.2.1 Driver Name
|
1.2.1 Driver Name
|
||||||
@@ -26,18 +29,18 @@ TABLE OF CONTENTS
|
|||||||
1.3 System Requirements
|
1.3 System Requirements
|
||||||
1.4 Licensing Information
|
1.4 Licensing Information
|
||||||
|
|
||||||
2.0 ADAPTER INSTALLATION and CONFIGURATION
|
2.0 ADAPTER INSTALLATION and CONFIGURATION
|
||||||
2.1 CS8900-based Adapter Configuration
|
2.1 CS8900-based Adapter Configuration
|
||||||
2.2 CS8920-based Adapter Configuration
|
2.2 CS8920-based Adapter Configuration
|
||||||
|
|
||||||
3.0 LOADING THE DRIVER AS A MODULE
|
3.0 LOADING THE DRIVER AS A MODULE
|
||||||
|
|
||||||
4.0 COMPILING THE DRIVER
|
4.0 COMPILING THE DRIVER
|
||||||
4.1 Compiling the Driver as a Loadable Module
|
4.1 Compiling the Driver as a Loadable Module
|
||||||
4.2 Compiling the driver to support memory mode
|
4.2 Compiling the driver to support memory mode
|
||||||
4.3 Compiling the driver to support Rx DMA
|
4.3 Compiling the driver to support Rx DMA
|
||||||
|
|
||||||
5.0 TESTING AND TROUBLESHOOTING
|
5.0 TESTING AND TROUBLESHOOTING
|
||||||
5.1 Known Defects and Limitations
|
5.1 Known Defects and Limitations
|
||||||
5.2 Testing the Adapter
|
5.2 Testing the Adapter
|
||||||
5.2.1 Diagnostic Self-Test
|
5.2.1 Diagnostic Self-Test
|
||||||
@@ -45,7 +48,7 @@ TABLE OF CONTENTS
|
|||||||
5.3 Using the Adapter's LEDs
|
5.3 Using the Adapter's LEDs
|
||||||
5.4 Resolving I/O Conflicts
|
5.4 Resolving I/O Conflicts
|
||||||
|
|
||||||
6.0 TECHNICAL SUPPORT
|
6.0 TECHNICAL SUPPORT
|
||||||
6.1 Contacting Cirrus Logic's Technical Support
|
6.1 Contacting Cirrus Logic's Technical Support
|
||||||
6.2 Information Required Before Contacting Technical Support
|
6.2 Information Required Before Contacting Technical Support
|
||||||
6.3 Obtaining the Latest Driver Version
|
6.3 Obtaining the Latest Driver Version
|
||||||
@@ -53,11 +56,12 @@ TABLE OF CONTENTS
|
|||||||
6.5 Kernel boot parameters
|
6.5 Kernel boot parameters
|
||||||
|
|
||||||
|
|
||||||
1.0 CIRRUS LOGIC LAN CS8900/CS8920 ETHERNET ADAPTERS
|
1. Cirrus Logic LAN CS8900/CS8920 Ethernet Adapters
|
||||||
===============================================================================
|
===================================================
|
||||||
|
|
||||||
|
|
||||||
1.1 PRODUCT OVERVIEW
|
1.1. Product Overview
|
||||||
|
=====================
|
||||||
|
|
||||||
The CS8900-based ISA Ethernet Adapters from Cirrus Logic follow
|
The CS8900-based ISA Ethernet Adapters from Cirrus Logic follow
|
||||||
IEEE 802.3 standards and support half or full-duplex operation in ISA bus
|
IEEE 802.3 standards and support half or full-duplex operation in ISA bus
|
||||||
@@ -73,7 +77,8 @@ adapters. Refer to the "Adapter Configuration" section for details on
|
|||||||
configuring both types of adapters.
|
configuring both types of adapters.
|
||||||
|
|
||||||
|
|
||||||
1.2 DRIVER DESCRIPTION
|
1.2. Driver Description
|
||||||
|
=======================
|
||||||
|
|
||||||
The CS8900/CS8920 Ethernet Adapter driver for Linux supports the Linux
|
The CS8900/CS8920 Ethernet Adapter driver for Linux supports the Linux
|
||||||
v2.3.48 or greater kernel. It can be compiled directly into the kernel
|
v2.3.48 or greater kernel. It can be compiled directly into the kernel
|
||||||
@@ -85,18 +90,21 @@ or loaded at run-time as a device driver module.
|
|||||||
|
|
||||||
The files in the driver at Cirrus' website include:
|
The files in the driver at Cirrus' website include:
|
||||||
|
|
||||||
readme.txt - this file
|
=================== ====================================================
|
||||||
build - batch file to compile cs89x0.c.
|
readme.txt this file
|
||||||
cs89x0.c - driver C code
|
build batch file to compile cs89x0.c.
|
||||||
cs89x0.h - driver header file
|
cs89x0.c driver C code
|
||||||
cs89x0.o - pre-compiled module (for v2.2.5 kernel)
|
cs89x0.h driver header file
|
||||||
config/Config.in - sample file to include cs89x0 driver in the kernel.
|
cs89x0.o pre-compiled module (for v2.2.5 kernel)
|
||||||
config/Makefile - sample file to include cs89x0 driver in the kernel.
|
config/Config.in sample file to include cs89x0 driver in the kernel.
|
||||||
config/Space.c - sample file to include cs89x0 driver in the kernel.
|
config/Makefile sample file to include cs89x0 driver in the kernel.
|
||||||
|
config/Space.c sample file to include cs89x0 driver in the kernel.
|
||||||
|
=================== ====================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1.3 SYSTEM REQUIREMENTS
|
1.3. System Requirements
|
||||||
|
------------------------
|
||||||
|
|
||||||
The following hardware is required:
|
The following hardware is required:
|
||||||
|
|
||||||
@@ -123,7 +131,8 @@ The following software is required:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
1.4 LICENSING INFORMATION
|
1.4. Licensing Information
|
||||||
|
--------------------------
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it under
|
This program is free software; you can redistribute it and/or modify it under
|
||||||
the terms of the GNU General Public License as published by the Free Software
|
the terms of the GNU General Public License as published by the Free Software
|
||||||
@@ -139,8 +148,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
2.0 ADAPTER INSTALLATION and CONFIGURATION
|
2. Adapter Installation and Configuration
|
||||||
===============================================================================
|
=========================================
|
||||||
|
|
||||||
Both the CS8900 and CS8920-based adapters can be configured using parameters
|
Both the CS8900 and CS8920-based adapters can be configured using parameters
|
||||||
stored in an on-board EEPROM. You must use the DOS-based CS8900/20 Setup
|
stored in an on-board EEPROM. You must use the DOS-based CS8900/20 Setup
|
||||||
@@ -157,10 +166,11 @@ Utility before installation in the target LINUX system. (Not required if
|
|||||||
installing a CS8900-based adapter and the default configuration is acceptable.)
|
installing a CS8900-based adapter and the default configuration is acceptable.)
|
||||||
|
|
||||||
|
|
||||||
2.1 CS8900-BASED ADAPTER CONFIGURATION
|
2.1. CS8900-based Adapter Configuration
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
CS8900-based adapters shipped from Cirrus Logic have been configured
|
CS8900-based adapters shipped from Cirrus Logic have been configured
|
||||||
with the following "default" settings:
|
with the following "default" settings::
|
||||||
|
|
||||||
Operation Mode: Memory Mode
|
Operation Mode: Memory Mode
|
||||||
IRQ: 10
|
IRQ: 10
|
||||||
@@ -177,7 +187,8 @@ another adapter exists. To change the adapter's configuration, run the
|
|||||||
CS8900/20 Setup Utility.
|
CS8900/20 Setup Utility.
|
||||||
|
|
||||||
|
|
||||||
2.2 CS8920-BASED ADAPTER CONFIGURATION
|
2.2. CS8920-based Adapter Configuration
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
CS8920-based adapters are shipped from Cirrus Logic configured as Plug
|
CS8920-based adapters are shipped from Cirrus Logic configured as Plug
|
||||||
and Play (PnP) enabled. However, since the cs89x0 driver does NOT
|
and Play (PnP) enabled. However, since the cs89x0 driver does NOT
|
||||||
@@ -187,6 +198,7 @@ adapter before installation in the target Linux system. Failure to do
|
|||||||
this will leave the adapter inactive and the driver will be unable to
|
this will leave the adapter inactive and the driver will be unable to
|
||||||
communicate with the adapter.
|
communicate with the adapter.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
****************************************************************
|
****************************************************************
|
||||||
* CS8920-BASED ADAPTERS: *
|
* CS8920-BASED ADAPTERS: *
|
||||||
@@ -200,8 +212,8 @@ communicate with the adapter.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
3.0 LOADING THE DRIVER AS A MODULE
|
3. Loading the Driver as a Module
|
||||||
===============================================================================
|
=================================
|
||||||
|
|
||||||
If the driver is compiled as a loadable module, you can load the driver module
|
If the driver is compiled as a loadable module, you can load the driver module
|
||||||
with the 'modprobe' command. Many of the adapter's configuration parameters can
|
with the 'modprobe' command. Many of the adapter's configuration parameters can
|
||||||
@@ -209,31 +221,31 @@ be specified as command-line arguments to the load command. This facility
|
|||||||
provides a means to override the EEPROM's settings or for interface
|
provides a means to override the EEPROM's settings or for interface
|
||||||
configuration when an EEPROM is not used.
|
configuration when an EEPROM is not used.
|
||||||
|
|
||||||
Example:
|
Example::
|
||||||
|
|
||||||
insmod cs89x0.o io=0x200 irq=0xA media=aui
|
insmod cs89x0.o io=0x200 irq=0xA media=aui
|
||||||
|
|
||||||
This example loads the module and configures the adapter to use an IO port base
|
This example loads the module and configures the adapter to use an IO port base
|
||||||
address of 200h, interrupt 10, and use the AUI media connection. The following
|
address of 200h, interrupt 10, and use the AUI media connection. The following
|
||||||
configuration options are available on the command line:
|
configuration options are available on the command line::
|
||||||
|
|
||||||
* io=### - specify IO address (200h-360h)
|
io=### - specify IO address (200h-360h)
|
||||||
* irq=## - specify interrupt level
|
irq=## - specify interrupt level
|
||||||
* use_dma=1 - Enable DMA
|
use_dma=1 - Enable DMA
|
||||||
* dma=# - specify dma channel (Driver is compiled to support
|
dma=# - specify dma channel (Driver is compiled to support
|
||||||
Rx DMA only)
|
Rx DMA only)
|
||||||
* dmasize=# (16 or 64) - DMA size 16K or 64K. Default value is set to 16.
|
dmasize=# (16 or 64) - DMA size 16K or 64K. Default value is set to 16.
|
||||||
* media=rj45 - specify media type
|
media=rj45 - specify media type
|
||||||
or media=bnc
|
or media=bnc
|
||||||
or media=aui
|
or media=aui
|
||||||
or media=auto
|
or media=auto
|
||||||
* duplex=full - specify forced half/full/autonegotiate duplex
|
duplex=full - specify forced half/full/autonegotiate duplex
|
||||||
or duplex=half
|
or duplex=half
|
||||||
or duplex=auto
|
or duplex=auto
|
||||||
* debug=# - debug level (only available if the driver was compiled
|
debug=# - debug level (only available if the driver was compiled
|
||||||
for debugging)
|
for debugging)
|
||||||
|
|
||||||
NOTES:
|
**Notes:**
|
||||||
|
|
||||||
a) If an EEPROM is present, any specified command-line parameter
|
a) If an EEPROM is present, any specified command-line parameter
|
||||||
will override the corresponding configuration value stored in
|
will override the corresponding configuration value stored in
|
||||||
@@ -245,7 +257,7 @@ c) The driver's hardware probe routine is designed to avoid
|
|||||||
writing to I/O space until it knows that there is a cs89x0
|
writing to I/O space until it knows that there is a cs89x0
|
||||||
card at the written addresses. This could cause problems
|
card at the written addresses. This could cause problems
|
||||||
with device probing. To avoid this behaviour, add one
|
with device probing. To avoid this behaviour, add one
|
||||||
to the `io=' module parameter. This doesn't actually change
|
to the ``io=`` module parameter. This doesn't actually change
|
||||||
the I/O address, but it is a flag to tell the driver
|
the I/O address, but it is a flag to tell the driver
|
||||||
to partially initialise the hardware before trying to
|
to partially initialise the hardware before trying to
|
||||||
identify the card. This could be dangerous if you are
|
identify the card. This could be dangerous if you are
|
||||||
@@ -282,7 +294,7 @@ h) Many Linux distributions use the 'modprobe' command to load
|
|||||||
module when it is loaded. All the configuration options which are
|
module when it is loaded. All the configuration options which are
|
||||||
described above may be placed within /etc/conf.modules.
|
described above may be placed within /etc/conf.modules.
|
||||||
|
|
||||||
For example:
|
For example::
|
||||||
|
|
||||||
> cat /etc/conf.modules
|
> cat /etc/conf.modules
|
||||||
...
|
...
|
||||||
@@ -305,7 +317,7 @@ j) The cs89x0 supports DMA for receiving only. DMA mode is
|
|||||||
|
|
||||||
k) If your Linux kernel was compiled with inbuilt plug-and-play
|
k) If your Linux kernel was compiled with inbuilt plug-and-play
|
||||||
support you will be able to find information about the cs89x0 card
|
support you will be able to find information about the cs89x0 card
|
||||||
with the command
|
with the command::
|
||||||
|
|
||||||
cat /proc/isapnp
|
cat /proc/isapnp
|
||||||
|
|
||||||
@@ -321,11 +333,11 @@ n) If the cs89x0 driver is compiled directly into the kernel, DMA
|
|||||||
mode may be selected by providing the kernel with a boot option
|
mode may be selected by providing the kernel with a boot option
|
||||||
'cs89x0_dma=N' where 'N' is the desired DMA channel number (5, 6 or 7).
|
'cs89x0_dma=N' where 'N' is the desired DMA channel number (5, 6 or 7).
|
||||||
|
|
||||||
Kernel boot options may be provided on the LILO command line:
|
Kernel boot options may be provided on the LILO command line::
|
||||||
|
|
||||||
LILO boot: linux cs89x0_dma=5
|
LILO boot: linux cs89x0_dma=5
|
||||||
|
|
||||||
or they may be placed in /etc/lilo.conf:
|
or they may be placed in /etc/lilo.conf::
|
||||||
|
|
||||||
image=/boot/bzImage-2.3.48
|
image=/boot/bzImage-2.3.48
|
||||||
append="cs89x0_dma=5"
|
append="cs89x0_dma=5"
|
||||||
@@ -337,43 +349,35 @@ n) If the cs89x0 driver is compiled directly into the kernel, DMA
|
|||||||
(64k mode is not available).
|
(64k mode is not available).
|
||||||
|
|
||||||
|
|
||||||
4.0 COMPILING THE DRIVER
|
4. Compiling the Driver
|
||||||
===============================================================================
|
=======================
|
||||||
|
|
||||||
The cs89x0 driver can be compiled directly into the kernel or compiled into
|
The cs89x0 driver can be compiled directly into the kernel or compiled into
|
||||||
a loadable device driver module.
|
a loadable device driver module.
|
||||||
|
|
||||||
|
Just use the standard way to configure the driver and compile the Kernel.
|
||||||
|
|
||||||
4.1 COMPILING THE DRIVER AS A LOADABLE MODULE
|
|
||||||
|
|
||||||
To compile the driver into a loadable module, use the following command
|
4.1. Compiling the Driver to Support Rx DMA
|
||||||
(single command line, without quotes):
|
-------------------------------------------
|
||||||
|
|
||||||
"gcc -D__KERNEL__ -I/usr/src/linux/include -I/usr/src/linux/net/inet -Wall
|
|
||||||
-Wstrict-prototypes -O2 -fomit-frame-pointer -DMODULE -DCONFIG_MODVERSIONS
|
|
||||||
-c cs89x0.c"
|
|
||||||
|
|
||||||
4.2 COMPILING THE DRIVER TO SUPPORT MEMORY MODE
|
|
||||||
|
|
||||||
Support for memory mode was not carried over into the 2.3 series kernels.
|
|
||||||
|
|
||||||
4.3 COMPILING THE DRIVER TO SUPPORT Rx DMA
|
|
||||||
|
|
||||||
The compile-time optionality for DMA was removed in the 2.3 kernel
|
The compile-time optionality for DMA was removed in the 2.3 kernel
|
||||||
series. DMA support is now unconditionally part of the driver. It is
|
series. DMA support is now unconditionally part of the driver. It is
|
||||||
enabled by the 'use_dma=1' module option.
|
enabled by the 'use_dma=1' module option.
|
||||||
|
|
||||||
|
|
||||||
5.0 TESTING AND TROUBLESHOOTING
|
5. Testing and Troubleshooting
|
||||||
===============================================================================
|
==============================
|
||||||
|
|
||||||
5.1 KNOWN DEFECTS and LIMITATIONS
|
5.1. Known Defects and Limitations
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
Refer to the RELEASE.TXT file distributed as part of this archive for a list of
|
Refer to the RELEASE.TXT file distributed as part of this archive for a list of
|
||||||
known defects, driver limitations, and work arounds.
|
known defects, driver limitations, and work arounds.
|
||||||
|
|
||||||
|
|
||||||
5.2 TESTING THE ADAPTER
|
5.2. Testing the Adapter
|
||||||
|
------------------------
|
||||||
|
|
||||||
Once the adapter has been installed and configured, the diagnostic option of
|
Once the adapter has been installed and configured, the diagnostic option of
|
||||||
the CS8900/20 Setup Utility can be used to test the functionality of the
|
the CS8900/20 Setup Utility can be used to test the functionality of the
|
||||||
@@ -384,56 +388,66 @@ adapter to communicate across the Ethernet with another PC equipped with a
|
|||||||
CS8900/20-based adapter card (it must also be running the CS8900/20 Setup
|
CS8900/20-based adapter card (it must also be running the CS8900/20 Setup
|
||||||
Utility).
|
Utility).
|
||||||
|
|
||||||
NOTE: The Setup Utility's diagnostics are designed to run in a
|
.. note::
|
||||||
|
|
||||||
|
The Setup Utility's diagnostics are designed to run in a
|
||||||
DOS-only operating system environment. DO NOT run the diagnostics
|
DOS-only operating system environment. DO NOT run the diagnostics
|
||||||
from a DOS or command prompt session under Windows 95, Windows NT,
|
from a DOS or command prompt session under Windows 95, Windows NT,
|
||||||
OS/2, or other operating system.
|
OS/2, or other operating system.
|
||||||
|
|
||||||
To run the diagnostics tests on the CS8900/20 adapter:
|
To run the diagnostics tests on the CS8900/20 adapter:
|
||||||
|
|
||||||
1.) Boot DOS on the PC and start the CS8900/20 Setup Utility.
|
1. Boot DOS on the PC and start the CS8900/20 Setup Utility.
|
||||||
|
|
||||||
2.) The adapter's current configuration is displayed. Hit the ENTER key to
|
2. The adapter's current configuration is displayed. Hit the ENTER key to
|
||||||
get to the main menu.
|
get to the main menu.
|
||||||
|
|
||||||
4.) Select 'Diagnostics' (ALT-G) from the main menu.
|
4. Select 'Diagnostics' (ALT-G) from the main menu.
|
||||||
* Select 'Self-Test' to test the adapter's basic functionality.
|
* Select 'Self-Test' to test the adapter's basic functionality.
|
||||||
* Select 'Network Test' to test the network connection and cabling.
|
* Select 'Network Test' to test the network connection and cabling.
|
||||||
|
|
||||||
|
|
||||||
5.2.1 DIAGNOSTIC SELF-TEST
|
5.2.1. Diagnostic Self-test
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The diagnostic self-test checks the adapter's basic functionality as well as
|
The diagnostic self-test checks the adapter's basic functionality as well as
|
||||||
its ability to communicate across the ISA bus based on the system resources
|
its ability to communicate across the ISA bus based on the system resources
|
||||||
assigned during hardware configuration. The following tests are performed:
|
assigned during hardware configuration. The following tests are performed:
|
||||||
|
|
||||||
* IO Register Read/Write Test
|
* IO Register Read/Write Test
|
||||||
|
|
||||||
The IO Register Read/Write test insures that the CS8900/20 can be
|
The IO Register Read/Write test insures that the CS8900/20 can be
|
||||||
accessed in IO mode, and that the IO base address is correct.
|
accessed in IO mode, and that the IO base address is correct.
|
||||||
|
|
||||||
* Shared Memory Test
|
* Shared Memory Test
|
||||||
|
|
||||||
The Shared Memory test insures the CS8900/20 can be accessed in memory
|
The Shared Memory test insures the CS8900/20 can be accessed in memory
|
||||||
mode and that the range of memory addresses assigned does not conflict
|
mode and that the range of memory addresses assigned does not conflict
|
||||||
with other devices in the system.
|
with other devices in the system.
|
||||||
|
|
||||||
* Interrupt Test
|
* Interrupt Test
|
||||||
|
|
||||||
The Interrupt test insures there are no conflicts with the assigned IRQ
|
The Interrupt test insures there are no conflicts with the assigned IRQ
|
||||||
signal.
|
signal.
|
||||||
|
|
||||||
* EEPROM Test
|
* EEPROM Test
|
||||||
|
|
||||||
The EEPROM test insures the EEPROM can be read.
|
The EEPROM test insures the EEPROM can be read.
|
||||||
|
|
||||||
* Chip RAM Test
|
* Chip RAM Test
|
||||||
|
|
||||||
The Chip RAM test insures the 4K of memory internal to the CS8900/20 is
|
The Chip RAM test insures the 4K of memory internal to the CS8900/20 is
|
||||||
working properly.
|
working properly.
|
||||||
|
|
||||||
* Internal Loop-back Test
|
* Internal Loop-back Test
|
||||||
|
|
||||||
The Internal Loop Back test insures the adapter's transmitter and
|
The Internal Loop Back test insures the adapter's transmitter and
|
||||||
receiver are operating properly. If this test fails, make sure the
|
receiver are operating properly. If this test fails, make sure the
|
||||||
adapter's cable is connected to the network (check for LED activity for
|
adapter's cable is connected to the network (check for LED activity for
|
||||||
example).
|
example).
|
||||||
|
|
||||||
* Boot PROM Test
|
* Boot PROM Test
|
||||||
|
|
||||||
The Boot PROM test insures the Boot PROM is present, and can be read.
|
The Boot PROM test insures the Boot PROM is present, and can be read.
|
||||||
Failure indicates the Boot PROM was not successfully read due to a
|
Failure indicates the Boot PROM was not successfully read due to a
|
||||||
hardware problem or due to a conflicts on the Boot PROM address
|
hardware problem or due to a conflicts on the Boot PROM address
|
||||||
@@ -446,7 +460,8 @@ option to reconfigure the adapter by selecting a different value for the system
|
|||||||
resource that failed.
|
resource that failed.
|
||||||
|
|
||||||
|
|
||||||
5.2.2 DIAGNOSTIC NETWORK TEST
|
5.2.2. Diagnostic Network Test
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The Diagnostic Network Test verifies a working network connection by
|
The Diagnostic Network Test verifies a working network connection by
|
||||||
transferring data between two CS8900/20 adapters installed in different PCs
|
transferring data between two CS8900/20 adapters installed in different PCs
|
||||||
@@ -466,15 +481,15 @@ either PC.
|
|||||||
|
|
||||||
To setup the Diagnostic Network Test:
|
To setup the Diagnostic Network Test:
|
||||||
|
|
||||||
1.) Select a PC with a CS8900/20-based adapter and a known working network
|
1. Select a PC with a CS8900/20-based adapter and a known working network
|
||||||
connection to act as the Responder. Run the CS8900/20 Setup Utility
|
connection to act as the Responder. Run the CS8900/20 Setup Utility
|
||||||
and select 'Diagnostics -> Network Test -> Responder' from the main
|
and select 'Diagnostics -> Network Test -> Responder' from the main
|
||||||
menu. Hit ENTER to start the Responder.
|
menu. Hit ENTER to start the Responder.
|
||||||
|
|
||||||
2.) Return to the PC with the CS8900/20-based adapter you want to test and
|
2. Return to the PC with the CS8900/20-based adapter you want to test and
|
||||||
start the CS8900/20 Setup Utility.
|
start the CS8900/20 Setup Utility.
|
||||||
|
|
||||||
3.) From the main menu, Select 'Diagnostic -> Network Test -> Initiator'.
|
3. From the main menu, Select 'Diagnostic -> Network Test -> Initiator'.
|
||||||
Hit ENTER to start the test.
|
Hit ENTER to start the test.
|
||||||
|
|
||||||
You may stop the test on the Initiator at any time while allowing the Responder
|
You may stop the test on the Initiator at any time while allowing the Responder
|
||||||
@@ -484,7 +499,8 @@ Responder.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
5.3 USING THE ADAPTER'S LEDs
|
5.3. Using the Adapter's LEDs
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
The 2 and 3-media adapters have two LEDs visible on the back end of the board
|
The 2 and 3-media adapters have two LEDs visible on the back end of the board
|
||||||
located near the 10Base-T connector.
|
located near the 10Base-T connector.
|
||||||
@@ -497,20 +513,21 @@ TX/RX LED: The yellow LED lights briefly each time the adapter transmits or
|
|||||||
receives data. (The yellow LED will appear to "flicker" on a typical network.)
|
receives data. (The yellow LED will appear to "flicker" on a typical network.)
|
||||||
|
|
||||||
|
|
||||||
5.4 RESOLVING I/O CONFLICTS
|
5.4. Resolving I/O Conflicts
|
||||||
|
----------------------------
|
||||||
|
|
||||||
An IO conflict occurs when two or more adapter use the same ISA resource (IO
|
An IO conflict occurs when two or more adapter use the same ISA resource (IO
|
||||||
address, memory address or IRQ). You can usually detect an IO conflict in one
|
address, memory address or IRQ). You can usually detect an IO conflict in one
|
||||||
of four ways after installing and or configuring the CS8900/20-based adapter:
|
of four ways after installing and or configuring the CS8900/20-based adapter:
|
||||||
|
|
||||||
1.) The system does not boot properly (or at all).
|
1. The system does not boot properly (or at all).
|
||||||
|
|
||||||
2.) The driver cannot communicate with the adapter, reporting an "Adapter
|
2. The driver cannot communicate with the adapter, reporting an "Adapter
|
||||||
not found" error message.
|
not found" error message.
|
||||||
|
|
||||||
3.) You cannot connect to the network or the driver will not load.
|
3. You cannot connect to the network or the driver will not load.
|
||||||
|
|
||||||
4.) If you have configured the adapter to run in memory mode but the driver
|
4. If you have configured the adapter to run in memory mode but the driver
|
||||||
reports it is using IO mode when loading, this is an indication of a
|
reports it is using IO mode when loading, this is an indication of a
|
||||||
memory address conflict.
|
memory address conflict.
|
||||||
|
|
||||||
@@ -529,8 +546,10 @@ before loading the driver again.
|
|||||||
When manually configuring the adapter, keep in mind the typical ISA system
|
When manually configuring the adapter, keep in mind the typical ISA system
|
||||||
resource usage as indicated in the tables below.
|
resource usage as indicated in the tables below.
|
||||||
|
|
||||||
I/O Address Device IRQ Device
|
::
|
||||||
----------- -------- --- --------
|
|
||||||
|
I/O Address Device IRQ Device
|
||||||
|
----------- -------- --- --------
|
||||||
200-20F Game I/O adapter 3 COM2, Bus Mouse
|
200-20F Game I/O adapter 3 COM2, Bus Mouse
|
||||||
230-23F Bus Mouse 4 COM1
|
230-23F Bus Mouse 4 COM1
|
||||||
270-27F LPT3: third parallel port 5 LPT2
|
270-27F LPT3: third parallel port 5 LPT2
|
||||||
@@ -539,32 +558,34 @@ I/O Address Device IRQ Device
|
|||||||
8 Real-time Clock
|
8 Real-time Clock
|
||||||
9 EGA/VGA display adapter
|
9 EGA/VGA display adapter
|
||||||
12 Mouse (PS/2)
|
12 Mouse (PS/2)
|
||||||
Memory Address Device 13 Math Coprocessor
|
Memory Address Device 13 Math Coprocessor
|
||||||
-------------- --------------------- 14 Hard Disk controller
|
-------------- --------------------- 14 Hard Disk controller
|
||||||
A000-BFFF EGA Graphics Adapter
|
A000-BFFF EGA Graphics Adapter
|
||||||
A000-C7FF VGA Graphics Adapter
|
A000-C7FF VGA Graphics Adapter
|
||||||
B000-BFFF Mono Graphics Adapter
|
B000-BFFF Mono Graphics Adapter
|
||||||
B800-BFFF Color Graphics Adapter
|
B800-BFFF Color Graphics Adapter
|
||||||
E000-FFFF AT BIOS
|
E000-FFFF AT BIOS
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
6.0 TECHNICAL SUPPORT
|
6. Technical Support
|
||||||
===============================================================================
|
====================
|
||||||
|
|
||||||
6.1 CONTACTING CIRRUS LOGIC'S TECHNICAL SUPPORT
|
6.1. Contacting Cirrus Logic's Technical Support
|
||||||
|
------------------------------------------------
|
||||||
|
|
||||||
Cirrus Logic's CS89XX Technical Application Support can be reached at:
|
Cirrus Logic's CS89XX Technical Application Support can be reached at::
|
||||||
|
|
||||||
Telephone :(800) 888-5016 (from inside U.S. and Canada)
|
Telephone :(800) 888-5016 (from inside U.S. and Canada)
|
||||||
:(512) 442-7555 (from outside the U.S. and Canada)
|
:(512) 442-7555 (from outside the U.S. and Canada)
|
||||||
Fax :(512) 912-3871
|
Fax :(512) 912-3871
|
||||||
Email :ethernet@crystal.cirrus.com
|
Email :ethernet@crystal.cirrus.com
|
||||||
WWW :http://www.cirrus.com
|
WWW :http://www.cirrus.com
|
||||||
|
|
||||||
|
|
||||||
6.2 INFORMATION REQUIRED BEFORE CONTACTING TECHNICAL SUPPORT
|
6.2. Information Required before Contacting Technical Support
|
||||||
|
-------------------------------------------------------------
|
||||||
|
|
||||||
Before contacting Cirrus Logic for technical support, be prepared to provide as
|
Before contacting Cirrus Logic for technical support, be prepared to provide as
|
||||||
Much of the following information as possible.
|
Much of the following information as possible.
|
||||||
@@ -597,7 +618,8 @@ Much of the following information as possible.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
6.3 OBTAINING THE LATEST DRIVER VERSION
|
6.3 Obtaining the Latest Driver Version
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
You can obtain the latest CS89XX drivers and support software from Cirrus Logic's
|
You can obtain the latest CS89XX drivers and support software from Cirrus Logic's
|
||||||
Web site. You can also contact Cirrus Logic's Technical Support (email:
|
Web site. You can also contact Cirrus Logic's Technical Support (email:
|
||||||
@@ -608,17 +630,18 @@ Cirrus Logic maintains a web page at http://www.cirrus.com with the
|
|||||||
latest drivers and technical publications.
|
latest drivers and technical publications.
|
||||||
|
|
||||||
|
|
||||||
6.4 Current maintainer
|
6.4. Current maintainer
|
||||||
|
-----------------------
|
||||||
|
|
||||||
In February 2000 the maintenance of this driver was assumed by Andrew
|
In February 2000 the maintenance of this driver was assumed by Andrew
|
||||||
Morton.
|
Morton.
|
||||||
|
|
||||||
6.5 Kernel module parameters
|
6.5 Kernel module parameters
|
||||||
|
----------------------------
|
||||||
|
|
||||||
For use in embedded environments with no cs89x0 EEPROM, the kernel boot
|
For use in embedded environments with no cs89x0 EEPROM, the kernel boot
|
||||||
parameter `cs89x0_media=' has been implemented. Usage is:
|
parameter ``cs89x0_media=`` has been implemented. Usage is::
|
||||||
|
|
||||||
cs89x0_media=rj45 or
|
cs89x0_media=rj45 or
|
||||||
cs89x0_media=aui or
|
cs89x0_media=aui or
|
||||||
cs89x0_media=bnc
|
cs89x0_media=bnc
|
||||||
|
|
@@ -1,7 +1,11 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=====================
|
||||||
DM9000 Network driver
|
DM9000 Network driver
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Copyright 2008 Simtec Electronics,
|
Copyright 2008 Simtec Electronics,
|
||||||
|
|
||||||
Ben Dooks <ben@simtec.co.uk> <ben-linux@fluff.org>
|
Ben Dooks <ben@simtec.co.uk> <ben-linux@fluff.org>
|
||||||
|
|
||||||
|
|
||||||
@@ -30,9 +34,9 @@ These resources should be specified in that order, as the ordering of the
|
|||||||
two address regions is important (the driver expects these to be address
|
two address regions is important (the driver expects these to be address
|
||||||
and then data).
|
and then data).
|
||||||
|
|
||||||
An example from arch/arm/mach-s3c2410/mach-bast.c is:
|
An example from arch/arm/mach-s3c2410/mach-bast.c is::
|
||||||
|
|
||||||
static struct resource bast_dm9k_resource[] = {
|
static struct resource bast_dm9k_resource[] = {
|
||||||
[0] = {
|
[0] = {
|
||||||
.start = S3C2410_CS5 + BAST_PA_DM9000,
|
.start = S3C2410_CS5 + BAST_PA_DM9000,
|
||||||
.end = S3C2410_CS5 + BAST_PA_DM9000 + 3,
|
.end = S3C2410_CS5 + BAST_PA_DM9000 + 3,
|
||||||
@@ -48,14 +52,14 @@ static struct resource bast_dm9k_resource[] = {
|
|||||||
.end = IRQ_DM9000,
|
.end = IRQ_DM9000,
|
||||||
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device bast_device_dm9k = {
|
static struct platform_device bast_device_dm9k = {
|
||||||
.name = "dm9000",
|
.name = "dm9000",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.num_resources = ARRAY_SIZE(bast_dm9k_resource),
|
.num_resources = ARRAY_SIZE(bast_dm9k_resource),
|
||||||
.resource = bast_dm9k_resource,
|
.resource = bast_dm9k_resource,
|
||||||
};
|
};
|
||||||
|
|
||||||
Note the setting of the IRQ trigger flag in bast_dm9k_resource[2].flags,
|
Note the setting of the IRQ trigger flag in bast_dm9k_resource[2].flags,
|
||||||
as this will generate a warning if it is not present. The trigger from
|
as this will generate a warning if it is not present. The trigger from
|
||||||
@@ -64,13 +68,13 @@ handler to ensure that the IRQ is setup correctly.
|
|||||||
|
|
||||||
This shows a typical platform device, without the optional configuration
|
This shows a typical platform device, without the optional configuration
|
||||||
platform data supplied. The next example uses the same resources, but adds
|
platform data supplied. The next example uses the same resources, but adds
|
||||||
the optional platform data to pass extra configuration data:
|
the optional platform data to pass extra configuration data::
|
||||||
|
|
||||||
static struct dm9000_plat_data bast_dm9k_platdata = {
|
static struct dm9000_plat_data bast_dm9k_platdata = {
|
||||||
.flags = DM9000_PLATF_16BITONLY,
|
.flags = DM9000_PLATF_16BITONLY,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_device bast_device_dm9k = {
|
static struct platform_device bast_device_dm9k = {
|
||||||
.name = "dm9000",
|
.name = "dm9000",
|
||||||
.id = 0,
|
.id = 0,
|
||||||
.num_resources = ARRAY_SIZE(bast_dm9k_resource),
|
.num_resources = ARRAY_SIZE(bast_dm9k_resource),
|
||||||
@@ -78,7 +82,7 @@ static struct platform_device bast_device_dm9k = {
|
|||||||
.dev = {
|
.dev = {
|
||||||
.platform_data = &bast_dm9k_platdata,
|
.platform_data = &bast_dm9k_platdata,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
The platform data is defined in include/linux/dm9000.h and described below.
|
The platform data is defined in include/linux/dm9000.h and described below.
|
||||||
|
|
@@ -1,35 +1,41 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
===================================
|
||||||
|
DEC EtherWORKS Ethernet De4x5 cards
|
||||||
|
===================================
|
||||||
|
|
||||||
Originally, this driver was written for the Digital Equipment
|
Originally, this driver was written for the Digital Equipment
|
||||||
Corporation series of EtherWORKS Ethernet cards:
|
Corporation series of EtherWORKS Ethernet cards:
|
||||||
|
|
||||||
DE425 TP/COAX EISA
|
- DE425 TP/COAX EISA
|
||||||
DE434 TP PCI
|
- DE434 TP PCI
|
||||||
DE435 TP/COAX/AUI PCI
|
- DE435 TP/COAX/AUI PCI
|
||||||
DE450 TP/COAX/AUI PCI
|
- DE450 TP/COAX/AUI PCI
|
||||||
DE500 10/100 PCI Fasternet
|
- DE500 10/100 PCI Fasternet
|
||||||
|
|
||||||
but it will now attempt to support all cards which conform to the
|
but it will now attempt to support all cards which conform to the
|
||||||
Digital Semiconductor SROM Specification. The driver currently
|
Digital Semiconductor SROM Specification. The driver currently
|
||||||
recognises the following chips:
|
recognises the following chips:
|
||||||
|
|
||||||
DC21040 (no SROM)
|
- DC21040 (no SROM)
|
||||||
DC21041[A]
|
- DC21041[A]
|
||||||
DC21140[A]
|
- DC21140[A]
|
||||||
DC21142
|
- DC21142
|
||||||
DC21143
|
- DC21143
|
||||||
|
|
||||||
So far the driver is known to work with the following cards:
|
So far the driver is known to work with the following cards:
|
||||||
|
|
||||||
KINGSTON
|
- KINGSTON
|
||||||
Linksys
|
- Linksys
|
||||||
ZNYX342
|
- ZNYX342
|
||||||
SMC8432
|
- SMC8432
|
||||||
SMC9332 (w/new SROM)
|
- SMC9332 (w/new SROM)
|
||||||
ZNYX31[45]
|
- ZNYX31[45]
|
||||||
ZNYX346 10/100 4 port (can act as a 10/100 bridge!)
|
- ZNYX346 10/100 4 port (can act as a 10/100 bridge!)
|
||||||
|
|
||||||
The driver has been tested on a relatively busy network using the DE425,
|
The driver has been tested on a relatively busy network using the DE425,
|
||||||
DE434, DE435 and DE500 cards and benchmarked with 'ttcp': it transferred
|
DE434, DE435 and DE500 cards and benchmarked with 'ttcp': it transferred
|
||||||
16M of data to a DECstation 5000/200 as follows:
|
16M of data to a DECstation 5000/200 as follows::
|
||||||
|
|
||||||
TCP UDP
|
TCP UDP
|
||||||
TX RX TX RX
|
TX RX TX RX
|
||||||
@@ -42,7 +48,7 @@
|
|||||||
measurement. Their error is +/-20k on a quiet (private) network and also
|
measurement. Their error is +/-20k on a quiet (private) network and also
|
||||||
depend on what load the CPU has.
|
depend on what load the CPU has.
|
||||||
|
|
||||||
=========================================================================
|
----------------------------------------------------------------------------
|
||||||
|
|
||||||
The ability to load this driver as a loadable module has been included
|
The ability to load this driver as a loadable module has been included
|
||||||
and used extensively during the driver development (to save those long
|
and used extensively during the driver development (to save those long
|
||||||
@@ -58,13 +64,15 @@
|
|||||||
temporary directory.
|
temporary directory.
|
||||||
2) for fixed autoprobes (not recommended), edit the source code near
|
2) for fixed autoprobes (not recommended), edit the source code near
|
||||||
line 5594 to reflect the I/O address you're using, or assign these when
|
line 5594 to reflect the I/O address you're using, or assign these when
|
||||||
loading by:
|
loading by::
|
||||||
|
|
||||||
insmod de4x5 io=0xghh where g = bus number
|
insmod de4x5 io=0xghh where g = bus number
|
||||||
hh = device number
|
hh = device number
|
||||||
|
|
||||||
NB: autoprobing for modules is now supported by default. You may just
|
.. note::
|
||||||
use:
|
|
||||||
|
autoprobing for modules is now supported by default. You may just
|
||||||
|
use::
|
||||||
|
|
||||||
insmod de4x5
|
insmod de4x5
|
||||||
|
|
||||||
@@ -158,17 +166,20 @@
|
|||||||
either at the end of the parameter list or with another board name. The
|
either at the end of the parameter list or with another board name. The
|
||||||
following parameters are allowed:
|
following parameters are allowed:
|
||||||
|
|
||||||
|
========= ===============================================
|
||||||
fdx for full duplex
|
fdx for full duplex
|
||||||
autosense to set the media/speed; with the following
|
autosense to set the media/speed; with the following
|
||||||
sub-parameters:
|
sub-parameters:
|
||||||
TP, TP_NW, BNC, AUI, BNC_AUI, 100Mb, 10Mb, AUTO
|
TP, TP_NW, BNC, AUI, BNC_AUI, 100Mb, 10Mb, AUTO
|
||||||
|
========= ===============================================
|
||||||
|
|
||||||
Case sensitivity is important for the sub-parameters. They *must* be
|
Case sensitivity is important for the sub-parameters. They *must* be
|
||||||
upper case. Examples:
|
upper case. Examples::
|
||||||
|
|
||||||
insmod de4x5 args='eth1:fdx autosense=BNC eth0:autosense=100Mb'.
|
insmod de4x5 args='eth1:fdx autosense=BNC eth0:autosense=100Mb'.
|
||||||
|
|
||||||
For a compiled in driver, in linux/drivers/net/CONFIG, place e.g.
|
For a compiled in driver, in linux/drivers/net/CONFIG, place e.g.::
|
||||||
|
|
||||||
DE4X5_OPTS = -DDE4X5_PARM='"eth0:fdx autosense=AUI eth2:autosense=TP"'
|
DE4X5_OPTS = -DDE4X5_PARM='"eth0:fdx autosense=AUI eth2:autosense=TP"'
|
||||||
|
|
||||||
Yes, I know full duplex isn't permissible on BNC or AUI; they're just
|
Yes, I know full duplex isn't permissible on BNC or AUI; they're just
|
@@ -1,6 +1,11 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
==============================================================
|
||||||
|
Davicom DM9102(A)/DM9132/DM9801 fast ethernet driver for Linux
|
||||||
|
==============================================================
|
||||||
|
|
||||||
Note: This driver doesn't have a maintainer.
|
Note: This driver doesn't have a maintainer.
|
||||||
|
|
||||||
Davicom DM9102(A)/DM9132/DM9801 fast ethernet driver for Linux.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or
|
This program is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU General Public License
|
modify it under the terms of the GNU General Public License
|
||||||
@@ -16,29 +21,29 @@ GNU General Public License for more details.
|
|||||||
This driver provides kernel support for Davicom DM9102(A)/DM9132/DM9801 ethernet cards ( CNET
|
This driver provides kernel support for Davicom DM9102(A)/DM9132/DM9801 ethernet cards ( CNET
|
||||||
10/100 ethernet cards uses Davicom chipset too, so this driver supports CNET cards too ).If you
|
10/100 ethernet cards uses Davicom chipset too, so this driver supports CNET cards too ).If you
|
||||||
didn't compile this driver as a module, it will automatically load itself on boot and print a
|
didn't compile this driver as a module, it will automatically load itself on boot and print a
|
||||||
line similar to :
|
line similar to::
|
||||||
|
|
||||||
dmfe: Davicom DM9xxx net driver, version 1.36.4 (2002-01-17)
|
dmfe: Davicom DM9xxx net driver, version 1.36.4 (2002-01-17)
|
||||||
|
|
||||||
If you compiled this driver as a module, you have to load it on boot.You can load it with command :
|
If you compiled this driver as a module, you have to load it on boot.You can load it with command::
|
||||||
|
|
||||||
insmod dmfe
|
insmod dmfe
|
||||||
|
|
||||||
This way it will autodetect the device mode.This is the suggested way to load the module.Or you can pass
|
This way it will autodetect the device mode.This is the suggested way to load the module.Or you can pass
|
||||||
a mode= setting to module while loading, like :
|
a mode= setting to module while loading, like::
|
||||||
|
|
||||||
insmod dmfe mode=0 # Force 10M Half Duplex
|
insmod dmfe mode=0 # Force 10M Half Duplex
|
||||||
insmod dmfe mode=1 # Force 100M Half Duplex
|
insmod dmfe mode=1 # Force 100M Half Duplex
|
||||||
insmod dmfe mode=4 # Force 10M Full Duplex
|
insmod dmfe mode=4 # Force 10M Full Duplex
|
||||||
insmod dmfe mode=5 # Force 100M Full Duplex
|
insmod dmfe mode=5 # Force 100M Full Duplex
|
||||||
|
|
||||||
Next you should configure your network interface with a command similar to :
|
Next you should configure your network interface with a command similar to::
|
||||||
|
|
||||||
ifconfig eth0 172.22.3.18
|
ifconfig eth0 172.22.3.18
|
||||||
^^^^^^^^^^^
|
^^^^^^^^^^^
|
||||||
Your IP Address
|
Your IP Address
|
||||||
|
|
||||||
Then you may have to modify the default routing table with command :
|
Then you may have to modify the default routing table with command::
|
||||||
|
|
||||||
route add default eth0
|
route add default eth0
|
||||||
|
|
||||||
@@ -48,10 +53,10 @@ Now your ethernet card should be up and running.
|
|||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
|
|
||||||
Implement pci_driver::suspend() and pci_driver::resume() power management methods.
|
- Implement pci_driver::suspend() and pci_driver::resume() power management methods.
|
||||||
Check on 64 bit boxes.
|
- Check on 64 bit boxes.
|
||||||
Check and fix on big endian boxes.
|
- Check and fix on big endian boxes.
|
||||||
Test and make sure PCI latency is now correct for all cases.
|
- Test and make sure PCI latency is now correct for all cases.
|
||||||
|
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
@@ -60,7 +65,7 @@ Sten Wang <sten_wang@davicom.com.tw > : Original Author
|
|||||||
|
|
||||||
Contributors:
|
Contributors:
|
||||||
|
|
||||||
Marcelo Tosatti <marcelo@conectiva.com.br>
|
- Marcelo Tosatti <marcelo@conectiva.com.br>
|
||||||
Alan Cox <alan@lxorguk.ukuu.org.uk>
|
- Alan Cox <alan@lxorguk.ukuu.org.uk>
|
||||||
Jeff Garzik <jgarzik@pobox.com>
|
- Jeff Garzik <jgarzik@pobox.com>
|
||||||
Vojtech Pavlik <vojtech@suse.cz>
|
- Vojtech Pavlik <vojtech@suse.cz>
|
@@ -1,10 +1,13 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
D-Link DL2000-based Gigabit Ethernet Adapter Installation
|
=========================================================
|
||||||
for Linux
|
D-Link DL2000-based Gigabit Ethernet Adapter Installation
|
||||||
May 23, 2002
|
=========================================================
|
||||||
|
|
||||||
|
May 23, 2002
|
||||||
|
|
||||||
|
.. Contents
|
||||||
|
|
||||||
Contents
|
|
||||||
========
|
|
||||||
- Compatibility List
|
- Compatibility List
|
||||||
- Quick Install
|
- Quick Install
|
||||||
- Compiling the Driver
|
- Compiling the Driver
|
||||||
@@ -15,12 +18,13 @@ Contents
|
|||||||
|
|
||||||
|
|
||||||
Compatibility List
|
Compatibility List
|
||||||
=================
|
==================
|
||||||
|
|
||||||
Adapter Support:
|
Adapter Support:
|
||||||
|
|
||||||
D-Link DGE-550T Gigabit Ethernet Adapter.
|
- D-Link DGE-550T Gigabit Ethernet Adapter.
|
||||||
D-Link DGE-550SX Gigabit Ethernet Adapter.
|
- D-Link DGE-550SX Gigabit Ethernet Adapter.
|
||||||
D-Link DL2000-based Gigabit Ethernet Adapter.
|
- D-Link DL2000-based Gigabit Ethernet Adapter.
|
||||||
|
|
||||||
|
|
||||||
The driver support Linux kernel 2.4.7 later. We had tested it
|
The driver support Linux kernel 2.4.7 later. We had tested it
|
||||||
@@ -34,28 +38,32 @@ on the environments below.
|
|||||||
|
|
||||||
Quick Install
|
Quick Install
|
||||||
=============
|
=============
|
||||||
Install linux driver as following command:
|
Install linux driver as following command::
|
||||||
|
|
||||||
1. make all
|
1. make all
|
||||||
2. insmod dl2k.ko
|
2. insmod dl2k.ko
|
||||||
3. ifconfig eth0 up 10.xxx.xxx.xxx netmask 255.0.0.0
|
3. ifconfig eth0 up 10.xxx.xxx.xxx netmask 255.0.0.0
|
||||||
^^^^^^^^^^^^^^^\ ^^^^^^^^\
|
^^^^^^^^^^^^^^^\ ^^^^^^^^\
|
||||||
IP NETMASK
|
IP NETMASK
|
||||||
|
|
||||||
Now eth0 should active, you can test it by "ping" or get more information by
|
Now eth0 should active, you can test it by "ping" or get more information by
|
||||||
"ifconfig". If tested ok, continue the next step.
|
"ifconfig". If tested ok, continue the next step.
|
||||||
|
|
||||||
4. cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net
|
4. ``cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net``
|
||||||
5. Add the following line to /etc/modprobe.d/dl2k.conf:
|
5. Add the following line to /etc/modprobe.d/dl2k.conf::
|
||||||
|
|
||||||
alias eth0 dl2k
|
alias eth0 dl2k
|
||||||
6. Run depmod to updated module indexes.
|
|
||||||
7. Run "netconfig" or "netconf" to create configuration script ifcfg-eth0
|
6. Run ``depmod`` to updated module indexes.
|
||||||
|
7. Run ``netconfig`` or ``netconf`` to create configuration script ifcfg-eth0
|
||||||
located at /etc/sysconfig/network-scripts or create it manually.
|
located at /etc/sysconfig/network-scripts or create it manually.
|
||||||
|
|
||||||
[see - Configuration Script Sample]
|
[see - Configuration Script Sample]
|
||||||
8. Driver will automatically load and configure at next boot time.
|
8. Driver will automatically load and configure at next boot time.
|
||||||
|
|
||||||
Compiling the Driver
|
Compiling the Driver
|
||||||
====================
|
====================
|
||||||
In Linux, NIC drivers are most commonly configured as loadable modules.
|
In Linux, NIC drivers are most commonly configured as loadable modules.
|
||||||
The approach of building a monolithic kernel has become obsolete. The driver
|
The approach of building a monolithic kernel has become obsolete. The driver
|
||||||
can be compiled as part of a monolithic kernel, but is strongly discouraged.
|
can be compiled as part of a monolithic kernel, but is strongly discouraged.
|
||||||
The remainder of this section assumes the driver is built as a loadable module.
|
The remainder of this section assumes the driver is built as a loadable module.
|
||||||
@@ -73,57 +81,72 @@ to compile and link the driver:
|
|||||||
CD-ROM drive
|
CD-ROM drive
|
||||||
------------
|
------------
|
||||||
|
|
||||||
[root@XXX /] mkdir cdrom
|
::
|
||||||
[root@XXX /] mount -r -t iso9660 -o conv=auto /dev/cdrom /cdrom
|
|
||||||
[root@XXX /] cd root
|
[root@XXX /] mkdir cdrom
|
||||||
[root@XXX /root] mkdir dl2k
|
[root@XXX /] mount -r -t iso9660 -o conv=auto /dev/cdrom /cdrom
|
||||||
[root@XXX /root] cd dl2k
|
[root@XXX /] cd root
|
||||||
[root@XXX dl2k] cp /cdrom/linux/dl2k.tgz /root/dl2k
|
[root@XXX /root] mkdir dl2k
|
||||||
[root@XXX dl2k] tar xfvz dl2k.tgz
|
[root@XXX /root] cd dl2k
|
||||||
[root@XXX dl2k] make all
|
[root@XXX dl2k] cp /cdrom/linux/dl2k.tgz /root/dl2k
|
||||||
|
[root@XXX dl2k] tar xfvz dl2k.tgz
|
||||||
|
[root@XXX dl2k] make all
|
||||||
|
|
||||||
Floppy disc drive
|
Floppy disc drive
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
[root@XXX /] cd root
|
::
|
||||||
[root@XXX /root] mkdir dl2k
|
|
||||||
[root@XXX /root] cd dl2k
|
[root@XXX /] cd root
|
||||||
[root@XXX dl2k] mcopy a:/linux/dl2k.tgz /root/dl2k
|
[root@XXX /root] mkdir dl2k
|
||||||
[root@XXX dl2k] tar xfvz dl2k.tgz
|
[root@XXX /root] cd dl2k
|
||||||
[root@XXX dl2k] make all
|
[root@XXX dl2k] mcopy a:/linux/dl2k.tgz /root/dl2k
|
||||||
|
[root@XXX dl2k] tar xfvz dl2k.tgz
|
||||||
|
[root@XXX dl2k] make all
|
||||||
|
|
||||||
Installing the Driver
|
Installing the Driver
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
Manual Installation
|
Manual Installation
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
Once the driver has been compiled, it must be loaded, enabled, and bound
|
Once the driver has been compiled, it must be loaded, enabled, and bound
|
||||||
to a protocol stack in order to establish network connectivity. To load a
|
to a protocol stack in order to establish network connectivity. To load a
|
||||||
module enter the command:
|
module enter the command::
|
||||||
|
|
||||||
insmod dl2k.o
|
insmod dl2k.o
|
||||||
|
|
||||||
or
|
or::
|
||||||
|
|
||||||
insmod dl2k.o <optional parameter> ; add parameter
|
insmod dl2k.o <optional parameter> ; add parameter
|
||||||
|
|
||||||
===============================================================
|
---------------------------------------------------------
|
||||||
example: insmod dl2k.o media=100mbps_hd
|
|
||||||
or insmod dl2k.o media=3
|
example::
|
||||||
or insmod dl2k.o media=3,2 ; for 2 cards
|
|
||||||
===============================================================
|
insmod dl2k.o media=100mbps_hd
|
||||||
|
|
||||||
|
or::
|
||||||
|
|
||||||
|
insmod dl2k.o media=3
|
||||||
|
|
||||||
|
or::
|
||||||
|
|
||||||
|
insmod dl2k.o media=3,2 ; for 2 cards
|
||||||
|
|
||||||
|
---------------------------------------------------------
|
||||||
|
|
||||||
Please reference the list of the command line parameters supported by
|
Please reference the list of the command line parameters supported by
|
||||||
the Linux device driver below.
|
the Linux device driver below.
|
||||||
|
|
||||||
The insmod command only loads the driver and gives it a name of the form
|
The insmod command only loads the driver and gives it a name of the form
|
||||||
eth0, eth1, etc. To bring the NIC into an operational state,
|
eth0, eth1, etc. To bring the NIC into an operational state,
|
||||||
it is necessary to issue the following command:
|
it is necessary to issue the following command::
|
||||||
|
|
||||||
ifconfig eth0 up
|
ifconfig eth0 up
|
||||||
|
|
||||||
Finally, to bind the driver to the active protocol (e.g., TCP/IP with
|
Finally, to bind the driver to the active protocol (e.g., TCP/IP with
|
||||||
Linux), enter the following command:
|
Linux), enter the following command::
|
||||||
|
|
||||||
ifup eth0
|
ifup eth0
|
||||||
|
|
||||||
@@ -131,32 +154,32 @@ Installing the Driver
|
|||||||
script that contains the necessary network information. A sample will be
|
script that contains the necessary network information. A sample will be
|
||||||
given in the next paragraph.
|
given in the next paragraph.
|
||||||
|
|
||||||
The commands to unload a driver are as follows:
|
The commands to unload a driver are as follows::
|
||||||
|
|
||||||
ifdown eth0
|
ifdown eth0
|
||||||
ifconfig eth0 down
|
ifconfig eth0 down
|
||||||
rmmod dl2k.o
|
rmmod dl2k.o
|
||||||
|
|
||||||
The following are the commands to list the currently loaded modules and
|
The following are the commands to list the currently loaded modules and
|
||||||
to see the current network configuration.
|
to see the current network configuration::
|
||||||
|
|
||||||
lsmod
|
lsmod
|
||||||
ifconfig
|
ifconfig
|
||||||
|
|
||||||
|
|
||||||
Automated Installation
|
Automated Installation
|
||||||
----------------------
|
----------------------
|
||||||
This section describes how to install the driver such that it is
|
This section describes how to install the driver such that it is
|
||||||
automatically loaded and configured at boot time. The following description
|
automatically loaded and configured at boot time. The following description
|
||||||
is based on a Red Hat 6.0/7.0 distribution, but it can easily be ported to
|
is based on a Red Hat 6.0/7.0 distribution, but it can easily be ported to
|
||||||
other distributions as well.
|
other distributions as well.
|
||||||
|
|
||||||
Red Hat v6.x/v7.x
|
Red Hat v6.x/v7.x
|
||||||
-----------------
|
-----------------
|
||||||
1. Copy dl2k.o to the network modules directory, typically
|
1. Copy dl2k.o to the network modules directory, typically
|
||||||
/lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net.
|
/lib/modules/2.x.x-xx/net or /lib/modules/2.x.x/kernel/drivers/net.
|
||||||
2. Locate the boot module configuration file, most commonly in the
|
2. Locate the boot module configuration file, most commonly in the
|
||||||
/etc/modprobe.d/ directory. Add the following lines:
|
/etc/modprobe.d/ directory. Add the following lines::
|
||||||
|
|
||||||
alias ethx dl2k
|
alias ethx dl2k
|
||||||
options dl2k <optional parameters>
|
options dl2k <optional parameters>
|
||||||
@@ -180,11 +203,15 @@ parameter. Below is a list of the command line parameters supported by the
|
|||||||
Linux device
|
Linux device
|
||||||
driver.
|
driver.
|
||||||
|
|
||||||
mtu=packet_size - Specifies the maximum packet size. default
|
|
||||||
|
=============================== ==============================================
|
||||||
|
mtu=packet_size Specifies the maximum packet size. default
|
||||||
is 1500.
|
is 1500.
|
||||||
|
|
||||||
media=media_type - Specifies the media type the NIC operates at.
|
media=media_type Specifies the media type the NIC operates at.
|
||||||
autosense Autosensing active media.
|
autosense Autosensing active media.
|
||||||
|
|
||||||
|
=========== =========================
|
||||||
10mbps_hd 10Mbps half duplex.
|
10mbps_hd 10Mbps half duplex.
|
||||||
10mbps_fd 10Mbps full duplex.
|
10mbps_fd 10Mbps full duplex.
|
||||||
100mbps_hd 100Mbps half duplex.
|
100mbps_hd 100Mbps half duplex.
|
||||||
@@ -198,16 +225,17 @@ media=media_type - Specifies the media type the NIC operates at.
|
|||||||
4 100Mbps full duplex.
|
4 100Mbps full duplex.
|
||||||
5 1000Mbps half duplex.
|
5 1000Mbps half duplex.
|
||||||
6 1000Mbps full duplex.
|
6 1000Mbps full duplex.
|
||||||
|
=========== =========================
|
||||||
|
|
||||||
By default, the NIC operates at autosense.
|
By default, the NIC operates at autosense.
|
||||||
1000mbps_fd and 1000mbps_hd types are only
|
1000mbps_fd and 1000mbps_hd types are only
|
||||||
available for fiber adapter.
|
available for fiber adapter.
|
||||||
|
|
||||||
vlan=n - Specifies the VLAN ID. If vlan=0, the
|
vlan=n Specifies the VLAN ID. If vlan=0, the
|
||||||
Virtual Local Area Network (VLAN) function is
|
Virtual Local Area Network (VLAN) function is
|
||||||
disable.
|
disable.
|
||||||
|
|
||||||
jumbo=[0|1] - Specifies the jumbo frame support. If jumbo=1,
|
jumbo=[0|1] Specifies the jumbo frame support. If jumbo=1,
|
||||||
the NIC accept jumbo frames. By default, this
|
the NIC accept jumbo frames. By default, this
|
||||||
function is disabled.
|
function is disabled.
|
||||||
Jumbo frame usually improve the performance
|
Jumbo frame usually improve the performance
|
||||||
@@ -215,8 +243,8 @@ jumbo=[0|1] - Specifies the jumbo frame support. If jumbo=1,
|
|||||||
This feature need jumbo frame compatible
|
This feature need jumbo frame compatible
|
||||||
remote.
|
remote.
|
||||||
|
|
||||||
rx_coalesce=m - Number of rx frame handled each interrupt.
|
rx_coalesce=m Number of rx frame handled each interrupt.
|
||||||
rx_timeout=n - Rx DMA wait time for an interrupt.
|
rx_timeout=n Rx DMA wait time for an interrupt.
|
||||||
If set rx_coalesce > 0, hardware only assert
|
If set rx_coalesce > 0, hardware only assert
|
||||||
an interrupt for m frames. Hardware won't
|
an interrupt for m frames. Hardware won't
|
||||||
assert rx interrupt until m frames received or
|
assert rx interrupt until m frames received or
|
||||||
@@ -229,54 +257,58 @@ rx_timeout=n - Rx DMA wait time for an interrupt.
|
|||||||
that is, hardware assert only 1 interrupt
|
that is, hardware assert only 1 interrupt
|
||||||
for 10 frames received or timeout of 512 us.
|
for 10 frames received or timeout of 512 us.
|
||||||
|
|
||||||
tx_coalesce=n - Number of tx frame handled each interrupt.
|
tx_coalesce=n Number of tx frame handled each interrupt.
|
||||||
Set n > 1 can reduce the interrupts
|
Set n > 1 can reduce the interrupts
|
||||||
congestion usually lower performance of
|
congestion usually lower performance of
|
||||||
high speed network card. Default is 16.
|
high speed network card. Default is 16.
|
||||||
|
|
||||||
tx_flow=[1|0] - Specifies the Tx flow control. If tx_flow=0,
|
tx_flow=[1|0] Specifies the Tx flow control. If tx_flow=0,
|
||||||
the Tx flow control disable else driver
|
the Tx flow control disable else driver
|
||||||
autodetect.
|
autodetect.
|
||||||
rx_flow=[1|0] - Specifies the Rx flow control. If rx_flow=0,
|
rx_flow=[1|0] Specifies the Rx flow control. If rx_flow=0,
|
||||||
the Rx flow control enable else driver
|
the Rx flow control enable else driver
|
||||||
autodetect.
|
autodetect.
|
||||||
|
=============================== ==============================================
|
||||||
|
|
||||||
|
|
||||||
Configuration Script Sample
|
Configuration Script Sample
|
||||||
===========================
|
===========================
|
||||||
Here is a sample of a simple configuration script:
|
Here is a sample of a simple configuration script::
|
||||||
|
|
||||||
DEVICE=eth0
|
DEVICE=eth0
|
||||||
USERCTL=no
|
USERCTL=no
|
||||||
ONBOOT=yes
|
ONBOOT=yes
|
||||||
POOTPROTO=none
|
POOTPROTO=none
|
||||||
BROADCAST=207.200.5.255
|
BROADCAST=207.200.5.255
|
||||||
NETWORK=207.200.5.0
|
NETWORK=207.200.5.0
|
||||||
NETMASK=255.255.255.0
|
NETMASK=255.255.255.0
|
||||||
IPADDR=207.200.5.2
|
IPADDR=207.200.5.2
|
||||||
|
|
||||||
|
|
||||||
Troubleshooting
|
Troubleshooting
|
||||||
===============
|
===============
|
||||||
Q1. Source files contain ^ M behind every line.
|
Q1. Source files contain ^ M behind every line.
|
||||||
|
|
||||||
Make sure all files are Unix file format (no LF). Try the following
|
Make sure all files are Unix file format (no LF). Try the following
|
||||||
shell command to convert files.
|
shell command to convert files::
|
||||||
|
|
||||||
cat dl2k.c | col -b > dl2k.tmp
|
cat dl2k.c | col -b > dl2k.tmp
|
||||||
mv dl2k.tmp dl2k.c
|
mv dl2k.tmp dl2k.c
|
||||||
|
|
||||||
OR
|
OR::
|
||||||
|
|
||||||
cat dl2k.c | tr -d "\r" > dl2k.tmp
|
cat dl2k.c | tr -d "\r" > dl2k.tmp
|
||||||
mv dl2k.tmp dl2k.c
|
mv dl2k.tmp dl2k.c
|
||||||
|
|
||||||
Q2: Could not find header files (*.h) ?
|
Q2: Could not find header files (``*.h``)?
|
||||||
|
|
||||||
To compile the driver, you need kernel header files. After
|
To compile the driver, you need kernel header files. After
|
||||||
installing the kernel source, the header files are usually located in
|
installing the kernel source, the header files are usually located in
|
||||||
/usr/src/linux/include, which is the default include directory configured
|
/usr/src/linux/include, which is the default include directory configured
|
||||||
in Makefile. For some distributions, there is a copy of header files in
|
in Makefile. For some distributions, there is a copy of header files in
|
||||||
/usr/src/include/linux and /usr/src/include/asm, that you can change the
|
/usr/src/include/linux and /usr/src/include/asm, that you can change the
|
||||||
INCLUDEDIR in Makefile to /usr/include without installing kernel source.
|
INCLUDEDIR in Makefile to /usr/include without installing kernel source.
|
||||||
|
|
||||||
Note that RH 7.0 didn't provide correct header files in /usr/include,
|
Note that RH 7.0 didn't provide correct header files in /usr/include,
|
||||||
including those files will make a wrong version driver.
|
including those files will make a wrong version driver.
|
||||||
|
|
@@ -1,12 +1,14 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
==============================
|
||||||
The QorIQ DPAA Ethernet Driver
|
The QorIQ DPAA Ethernet Driver
|
||||||
==============================
|
==============================
|
||||||
|
|
||||||
Authors:
|
Authors:
|
||||||
Madalin Bucur <madalin.bucur@nxp.com>
|
- Madalin Bucur <madalin.bucur@nxp.com>
|
||||||
Camelia Groza <camelia.groza@nxp.com>
|
- Camelia Groza <camelia.groza@nxp.com>
|
||||||
|
|
||||||
Contents
|
.. Contents
|
||||||
========
|
|
||||||
|
|
||||||
- DPAA Ethernet Overview
|
- DPAA Ethernet Overview
|
||||||
- DPAA Ethernet Supported SoCs
|
- DPAA Ethernet Supported SoCs
|
||||||
@@ -34,7 +36,7 @@ following drivers in the Linux kernel:
|
|||||||
- Queue Manager (QMan), Buffer Manager (BMan)
|
- Queue Manager (QMan), Buffer Manager (BMan)
|
||||||
drivers/soc/fsl/qbman
|
drivers/soc/fsl/qbman
|
||||||
|
|
||||||
A simplified view of the dpaa_eth interfaces mapped to FMan MACs:
|
A simplified view of the dpaa_eth interfaces mapped to FMan MACs::
|
||||||
|
|
||||||
dpaa_eth /eth0\ ... /ethN\
|
dpaa_eth /eth0\ ... /ethN\
|
||||||
driver | | | |
|
driver | | | |
|
||||||
@@ -50,7 +52,8 @@ A simplified view of the dpaa_eth interfaces mapped to FMan MACs:
|
|||||||
FMan HW blocks: MURAM, MACs, Ports, SP
|
FMan HW blocks: MURAM, MACs, Ports, SP
|
||||||
---------------------------------------------------------
|
---------------------------------------------------------
|
||||||
|
|
||||||
The dpaa_eth relation to the QMan, BMan and FMan:
|
The dpaa_eth relation to the QMan, BMan and FMan::
|
||||||
|
|
||||||
________________________________
|
________________________________
|
||||||
dpaa_eth / eth0 \
|
dpaa_eth / eth0 \
|
||||||
driver / \
|
driver / \
|
||||||
@@ -66,65 +69,68 @@ The dpaa_eth relation to the QMan, BMan and FMan:
|
|||||||
----------------------- --------
|
----------------------- --------
|
||||||
|
|
||||||
where the acronyms used above (and in the code) are:
|
where the acronyms used above (and in the code) are:
|
||||||
DPAA = Data Path Acceleration Architecture
|
|
||||||
FMan = DPAA Frame Manager
|
=============== ===========================================================
|
||||||
QMan = DPAA Queue Manager
|
DPAA Data Path Acceleration Architecture
|
||||||
BMan = DPAA Buffers Manager
|
FMan DPAA Frame Manager
|
||||||
QMI = QMan interface in FMan
|
QMan DPAA Queue Manager
|
||||||
BMI = BMan interface in FMan
|
BMan DPAA Buffers Manager
|
||||||
FMan SP = FMan Storage Profiles
|
QMI QMan interface in FMan
|
||||||
MURAM = Multi-user RAM in FMan
|
BMI BMan interface in FMan
|
||||||
FQ = QMan Frame Queue
|
FMan SP FMan Storage Profiles
|
||||||
Rx Dfl FQ = default reception FQ
|
MURAM Multi-user RAM in FMan
|
||||||
Rx Err FQ = Rx error frames FQ
|
FQ QMan Frame Queue
|
||||||
Tx Cnf FQ = Tx confirmation FQs
|
Rx Dfl FQ default reception FQ
|
||||||
Tx FQs = transmission frame queues
|
Rx Err FQ Rx error frames FQ
|
||||||
dtsec = datapath three speed Ethernet controller (10/100/1000 Mbps)
|
Tx Cnf FQ Tx confirmation FQs
|
||||||
tgec = ten gigabit Ethernet controller (10 Gbps)
|
Tx FQs transmission frame queues
|
||||||
memac = multirate Ethernet MAC (10/100/1000/10000)
|
dtsec datapath three speed Ethernet controller (10/100/1000 Mbps)
|
||||||
|
tgec ten gigabit Ethernet controller (10 Gbps)
|
||||||
|
memac multirate Ethernet MAC (10/100/1000/10000)
|
||||||
|
=============== ===========================================================
|
||||||
|
|
||||||
DPAA Ethernet Supported SoCs
|
DPAA Ethernet Supported SoCs
|
||||||
============================
|
============================
|
||||||
|
|
||||||
The DPAA drivers enable the Ethernet controllers present on the following SoCs:
|
The DPAA drivers enable the Ethernet controllers present on the following SoCs:
|
||||||
|
|
||||||
# PPC
|
PPC
|
||||||
P1023
|
- P1023
|
||||||
P2041
|
- P2041
|
||||||
P3041
|
- P3041
|
||||||
P4080
|
- P4080
|
||||||
P5020
|
- P5020
|
||||||
P5040
|
- P5040
|
||||||
T1023
|
- T1023
|
||||||
T1024
|
- T1024
|
||||||
T1040
|
- T1040
|
||||||
T1042
|
- T1042
|
||||||
T2080
|
- T2080
|
||||||
T4240
|
- T4240
|
||||||
B4860
|
- B4860
|
||||||
|
|
||||||
# ARM
|
ARM
|
||||||
LS1043A
|
- LS1043A
|
||||||
LS1046A
|
- LS1046A
|
||||||
|
|
||||||
Configuring DPAA Ethernet in your kernel
|
Configuring DPAA Ethernet in your kernel
|
||||||
========================================
|
========================================
|
||||||
|
|
||||||
To enable the DPAA Ethernet driver, the following Kconfig options are required:
|
To enable the DPAA Ethernet driver, the following Kconfig options are required::
|
||||||
|
|
||||||
# common for arch/arm64 and arch/powerpc platforms
|
# common for arch/arm64 and arch/powerpc platforms
|
||||||
CONFIG_FSL_DPAA=y
|
CONFIG_FSL_DPAA=y
|
||||||
CONFIG_FSL_FMAN=y
|
CONFIG_FSL_FMAN=y
|
||||||
CONFIG_FSL_DPAA_ETH=y
|
CONFIG_FSL_DPAA_ETH=y
|
||||||
CONFIG_FSL_XGMAC_MDIO=y
|
CONFIG_FSL_XGMAC_MDIO=y
|
||||||
|
|
||||||
# for arch/powerpc only
|
# for arch/powerpc only
|
||||||
CONFIG_FSL_PAMU=y
|
CONFIG_FSL_PAMU=y
|
||||||
|
|
||||||
# common options needed for the PHYs used on the RDBs
|
# common options needed for the PHYs used on the RDBs
|
||||||
CONFIG_VITESSE_PHY=y
|
CONFIG_VITESSE_PHY=y
|
||||||
CONFIG_REALTEK_PHY=y
|
CONFIG_REALTEK_PHY=y
|
||||||
CONFIG_AQUANTIA_PHY=y
|
CONFIG_AQUANTIA_PHY=y
|
||||||
|
|
||||||
DPAA Ethernet Frame Processing
|
DPAA Ethernet Frame Processing
|
||||||
==============================
|
==============================
|
||||||
@@ -167,7 +173,9 @@ classes as follows:
|
|||||||
* priorities 8 to 11 - traffic class 2 (medium-high priority)
|
* priorities 8 to 11 - traffic class 2 (medium-high priority)
|
||||||
* priorities 12 to 15 - traffic class 3 (high priority)
|
* priorities 12 to 15 - traffic class 3 (high priority)
|
||||||
|
|
||||||
tc qdisc add dev <int> root handle 1: \
|
::
|
||||||
|
|
||||||
|
tc qdisc add dev <int> root handle 1: \
|
||||||
mqprio num_tc 4 map 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 hw 1
|
mqprio num_tc 4 map 0 0 0 0 1 1 1 1 2 2 2 2 3 3 3 3 hw 1
|
||||||
|
|
||||||
DPAA IRQ Affinity and Receive Side Scaling
|
DPAA IRQ Affinity and Receive Side Scaling
|
||||||
@@ -201,11 +209,11 @@ of these frame queues will arrive at the same portal and will always
|
|||||||
be processed by the same CPU. This ensures intra-flow order preservation
|
be processed by the same CPU. This ensures intra-flow order preservation
|
||||||
and workload distribution for multiple traffic flows.
|
and workload distribution for multiple traffic flows.
|
||||||
|
|
||||||
RSS can be turned off for a certain interface using ethtool, i.e.
|
RSS can be turned off for a certain interface using ethtool, i.e.::
|
||||||
|
|
||||||
# ethtool -N fm1-mac9 rx-flow-hash tcp4 ""
|
# ethtool -N fm1-mac9 rx-flow-hash tcp4 ""
|
||||||
|
|
||||||
To turn it back on, one needs to set rx-flow-hash for tcp4/6 or udp4/6:
|
To turn it back on, one needs to set rx-flow-hash for tcp4/6 or udp4/6::
|
||||||
|
|
||||||
# ethtool -N fm1-mac9 rx-flow-hash udp4 sfdn
|
# ethtool -N fm1-mac9 rx-flow-hash udp4 sfdn
|
||||||
|
|
||||||
@@ -216,7 +224,7 @@ going to control the rx-flow-hashing for all protocols on that interface.
|
|||||||
Besides using the FMan Keygen computed hash for spreading traffic on the
|
Besides using the FMan Keygen computed hash for spreading traffic on the
|
||||||
128 Rx FQs, the DPAA Ethernet driver also sets the skb hash value when
|
128 Rx FQs, the DPAA Ethernet driver also sets the skb hash value when
|
||||||
the NETIF_F_RXHASH feature is on (active by default). This can be turned
|
the NETIF_F_RXHASH feature is on (active by default). This can be turned
|
||||||
on or off through ethtool, i.e.:
|
on or off through ethtool, i.e.::
|
||||||
|
|
||||||
# ethtool -K fm1-mac9 rx-hashing off
|
# ethtool -K fm1-mac9 rx-hashing off
|
||||||
# ethtool -k fm1-mac9 | grep hash
|
# ethtool -k fm1-mac9 | grep hash
|
||||||
@@ -246,6 +254,7 @@ The following statistics are exported for each interface through ethtool:
|
|||||||
- Rx error count per CPU
|
- Rx error count per CPU
|
||||||
- Rx error count per type
|
- Rx error count per type
|
||||||
- congestion related statistics:
|
- congestion related statistics:
|
||||||
|
|
||||||
- congestion status
|
- congestion status
|
||||||
- time spent in congestion
|
- time spent in congestion
|
||||||
- number of time the device entered congestion
|
- number of time the device entered congestion
|
@@ -1,10 +1,15 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
===========================
|
||||||
The Gianfar Ethernet Driver
|
The Gianfar Ethernet Driver
|
||||||
|
===========================
|
||||||
|
|
||||||
Author: Andy Fleming <afleming@freescale.com>
|
:Author: Andy Fleming <afleming@freescale.com>
|
||||||
Updated: 2005-07-28
|
:Updated: 2005-07-28
|
||||||
|
|
||||||
|
|
||||||
CHECKSUM OFFLOADING
|
Checksum Offloading
|
||||||
|
===================
|
||||||
|
|
||||||
The eTSEC controller (first included in parts from late 2005 like
|
The eTSEC controller (first included in parts from late 2005 like
|
||||||
the 8548) has the ability to perform TCP, UDP, and IP checksums
|
the 8548) has the ability to perform TCP, UDP, and IP checksums
|
||||||
@@ -15,13 +20,15 @@ packets. Use ethtool to enable or disable this feature for RX
|
|||||||
and TX.
|
and TX.
|
||||||
|
|
||||||
VLAN
|
VLAN
|
||||||
|
====
|
||||||
|
|
||||||
In order to use VLAN, please consult Linux documentation on
|
In order to use VLAN, please consult Linux documentation on
|
||||||
configuring VLANs. The gianfar driver supports hardware insertion and
|
configuring VLANs. The gianfar driver supports hardware insertion and
|
||||||
extraction of VLAN headers, but not filtering. Filtering will be
|
extraction of VLAN headers, but not filtering. Filtering will be
|
||||||
done by the kernel.
|
done by the kernel.
|
||||||
|
|
||||||
MULTICASTING
|
Multicasting
|
||||||
|
============
|
||||||
|
|
||||||
The gianfar driver supports using the group hash table on the
|
The gianfar driver supports using the group hash table on the
|
||||||
TSEC (and the extended hash table on the eTSEC) for multicast
|
TSEC (and the extended hash table on the eTSEC) for multicast
|
||||||
@@ -29,13 +36,15 @@ filtering. On the eTSEC, the exact-match MAC registers are used
|
|||||||
before the hash tables. See Linux documentation on how to join
|
before the hash tables. See Linux documentation on how to join
|
||||||
multicast groups.
|
multicast groups.
|
||||||
|
|
||||||
PADDING
|
Padding
|
||||||
|
=======
|
||||||
|
|
||||||
The gianfar driver supports padding received frames with 2 bytes
|
The gianfar driver supports padding received frames with 2 bytes
|
||||||
to align the IP header to a 16-byte boundary, when supported by
|
to align the IP header to a 16-byte boundary, when supported by
|
||||||
hardware.
|
hardware.
|
||||||
|
|
||||||
ETHTOOL
|
Ethtool
|
||||||
|
=======
|
||||||
|
|
||||||
The gianfar driver supports the use of ethtool for many
|
The gianfar driver supports the use of ethtool for many
|
||||||
configuration options. You must run ethtool only on currently
|
configuration options. You must run ethtool only on currently
|
@@ -27,6 +27,30 @@ Contents:
|
|||||||
netronome/nfp
|
netronome/nfp
|
||||||
pensando/ionic
|
pensando/ionic
|
||||||
stmicro/stmmac
|
stmicro/stmmac
|
||||||
|
3com/3c509
|
||||||
|
3com/vortex
|
||||||
|
amazon/ena
|
||||||
|
aquantia/atlantic
|
||||||
|
chelsio/cxgb
|
||||||
|
cirrus/cs89x0
|
||||||
|
davicom/dm9000
|
||||||
|
dec/de4x5
|
||||||
|
dec/dmfe
|
||||||
|
dlink/dl2k
|
||||||
|
freescale/dpaa
|
||||||
|
freescale/gianfar
|
||||||
|
intel/ipw2100
|
||||||
|
intel/ipw2200
|
||||||
|
microsoft/netvsc
|
||||||
|
neterion/s2io
|
||||||
|
neterion/vxge
|
||||||
|
qualcomm/rmnet
|
||||||
|
sb1000
|
||||||
|
smsc/smc9
|
||||||
|
ti/cpsw_switchdev
|
||||||
|
ti/cpsw
|
||||||
|
ti/tlan
|
||||||
|
toshiba/spider_net
|
||||||
|
|
||||||
.. only:: subproject and html
|
.. only:: subproject and html
|
||||||
|
|
||||||
|
@@ -33,7 +33,7 @@ The following features are now available in supported kernels:
|
|||||||
- SNMP
|
- SNMP
|
||||||
|
|
||||||
Channel Bonding documentation can be found in the Linux kernel source:
|
Channel Bonding documentation can be found in the Linux kernel source:
|
||||||
/Documentation/networking/bonding.txt
|
/Documentation/networking/bonding.rst
|
||||||
|
|
||||||
|
|
||||||
Identifying Your Adapter
|
Identifying Your Adapter
|
||||||
|
@@ -1,31 +1,37 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
.. include:: <isonum.txt>
|
||||||
|
|
||||||
Intel(R) PRO/Wireless 2100 Driver for Linux in support of:
|
===========================================
|
||||||
|
Intel(R) PRO/Wireless 2100 Driver for Linux
|
||||||
|
===========================================
|
||||||
|
|
||||||
Intel(R) PRO/Wireless 2100 Network Connection
|
Support for:
|
||||||
|
|
||||||
Copyright (C) 2003-2006, Intel Corporation
|
- Intel(R) PRO/Wireless 2100 Network Connection
|
||||||
|
|
||||||
|
Copyright |copy| 2003-2006, Intel Corporation
|
||||||
|
|
||||||
README.ipw2100
|
README.ipw2100
|
||||||
|
|
||||||
Version: git-1.1.5
|
:Version: git-1.1.5
|
||||||
Date : January 25, 2006
|
:Date: January 25, 2006
|
||||||
|
|
||||||
Index
|
.. Index
|
||||||
-----------------------------------------------
|
|
||||||
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
||||||
1. Introduction
|
1. Introduction
|
||||||
2. Release git-1.1.5 Current Features
|
2. Release git-1.1.5 Current Features
|
||||||
3. Command Line Parameters
|
3. Command Line Parameters
|
||||||
4. Sysfs Helper Files
|
4. Sysfs Helper Files
|
||||||
5. Radio Kill Switch
|
5. Radio Kill Switch
|
||||||
6. Dynamic Firmware
|
6. Dynamic Firmware
|
||||||
7. Power Management
|
7. Power Management
|
||||||
8. Support
|
8. Support
|
||||||
9. License
|
9. License
|
||||||
|
|
||||||
|
|
||||||
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
||||||
-----------------------------------------------
|
=================================================
|
||||||
|
|
||||||
Important Notice FOR ALL USERS OR DISTRIBUTORS!!!!
|
Important Notice FOR ALL USERS OR DISTRIBUTORS!!!!
|
||||||
|
|
||||||
@@ -75,7 +81,7 @@ obtain a tested driver from Intel Customer Support at:
|
|||||||
http://www.intel.com/support/wireless/sb/CS-006408.htm
|
http://www.intel.com/support/wireless/sb/CS-006408.htm
|
||||||
|
|
||||||
1. Introduction
|
1. Introduction
|
||||||
-----------------------------------------------
|
===============
|
||||||
|
|
||||||
This document provides a brief overview of the features supported by the
|
This document provides a brief overview of the features supported by the
|
||||||
IPW2100 driver project. The main project website, where the latest
|
IPW2100 driver project. The main project website, where the latest
|
||||||
@@ -89,7 +95,8 @@ for the driver project.
|
|||||||
|
|
||||||
|
|
||||||
2. Release git-1.1.5 Current Supported Features
|
2. Release git-1.1.5 Current Supported Features
|
||||||
-----------------------------------------------
|
===============================================
|
||||||
|
|
||||||
- Managed (BSS) and Ad-Hoc (IBSS)
|
- Managed (BSS) and Ad-Hoc (IBSS)
|
||||||
- WEP (shared key and open)
|
- WEP (shared key and open)
|
||||||
- Wireless Tools support
|
- Wireless Tools support
|
||||||
@@ -105,11 +112,11 @@ performed on a given feature.
|
|||||||
|
|
||||||
|
|
||||||
3. Command Line Parameters
|
3. Command Line Parameters
|
||||||
-----------------------------------------------
|
==========================
|
||||||
|
|
||||||
If the driver is built as a module, the following optional parameters are used
|
If the driver is built as a module, the following optional parameters are used
|
||||||
by entering them on the command line with the modprobe command using this
|
by entering them on the command line with the modprobe command using this
|
||||||
syntax:
|
syntax::
|
||||||
|
|
||||||
modprobe ipw2100 [<option>=<VAL1><,VAL2>...]
|
modprobe ipw2100 [<option>=<VAL1><,VAL2>...]
|
||||||
|
|
||||||
@@ -119,61 +126,76 @@ For example, to disable the radio on driver loading, enter:
|
|||||||
|
|
||||||
The ipw2100 driver supports the following module parameters:
|
The ipw2100 driver supports the following module parameters:
|
||||||
|
|
||||||
Name Value Example:
|
========= ============== ============ ==============================
|
||||||
debug 0x0-0xffffffff debug=1024
|
Name Value Example Meaning
|
||||||
mode 0,1,2 mode=1 /* AdHoc */
|
========= ============== ============ ==============================
|
||||||
channel int channel=3 /* Only valid in AdHoc or Monitor */
|
debug 0x0-0xffffffff debug=1024 Debug level set to 1024
|
||||||
associate boolean associate=0 /* Do NOT auto associate */
|
mode 0,1,2 mode=1 AdHoc
|
||||||
disable boolean disable=1 /* Do not power the HW */
|
channel int channel=3 Only valid in AdHoc or Monitor
|
||||||
|
associate boolean associate=0 Do NOT auto associate
|
||||||
|
disable boolean disable=1 Do not power the HW
|
||||||
|
========= ============== ============ ==============================
|
||||||
|
|
||||||
|
|
||||||
4. Sysfs Helper Files
|
4. Sysfs Helper Files
|
||||||
---------------------------
|
=====================
|
||||||
-----------------------------------------------
|
|
||||||
|
|
||||||
There are several ways to control the behavior of the driver. Many of the
|
There are several ways to control the behavior of the driver. Many of the
|
||||||
general capabilities are exposed through the Wireless Tools (iwconfig). There
|
general capabilities are exposed through the Wireless Tools (iwconfig). There
|
||||||
are a few capabilities that are exposed through entries in the Linux Sysfs.
|
are a few capabilities that are exposed through entries in the Linux Sysfs.
|
||||||
|
|
||||||
|
|
||||||
----- Driver Level ------
|
**Driver Level**
|
||||||
|
|
||||||
For the driver level files, look in /sys/bus/pci/drivers/ipw2100/
|
For the driver level files, look in /sys/bus/pci/drivers/ipw2100/
|
||||||
|
|
||||||
debug_level
|
debug_level
|
||||||
|
|
||||||
This controls the same global as the 'debug' module parameter. For
|
This controls the same global as the 'debug' module parameter. For
|
||||||
information on the various debugging levels available, run the 'dvals'
|
information on the various debugging levels available, run the 'dvals'
|
||||||
script found in the driver source directory.
|
script found in the driver source directory.
|
||||||
|
|
||||||
NOTE: 'debug_level' is only enabled if CONFIG_IPW2100_DEBUG is turn
|
.. note::
|
||||||
on.
|
|
||||||
|
|
||||||
----- Device Level ------
|
'debug_level' is only enabled if CONFIG_IPW2100_DEBUG is turn on.
|
||||||
For the device level files look in
|
|
||||||
|
**Device Level**
|
||||||
|
|
||||||
|
For the device level files look in::
|
||||||
|
|
||||||
/sys/bus/pci/drivers/ipw2100/{PCI-ID}/
|
/sys/bus/pci/drivers/ipw2100/{PCI-ID}/
|
||||||
|
|
||||||
For example:
|
For example::
|
||||||
|
|
||||||
/sys/bus/pci/drivers/ipw2100/0000:02:01.0
|
/sys/bus/pci/drivers/ipw2100/0000:02:01.0
|
||||||
|
|
||||||
For the device level files, see /sys/bus/pci/drivers/ipw2100:
|
For the device level files, see /sys/bus/pci/drivers/ipw2100:
|
||||||
|
|
||||||
rf_kill
|
rf_kill
|
||||||
read -
|
read
|
||||||
0 = RF kill not enabled (radio on)
|
|
||||||
1 = SW based RF kill active (radio off)
|
|
||||||
2 = HW based RF kill active (radio off)
|
|
||||||
3 = Both HW and SW RF kill active (radio off)
|
|
||||||
write -
|
|
||||||
0 = If SW based RF kill active, turn the radio back on
|
|
||||||
1 = If radio is on, activate SW based RF kill
|
|
||||||
|
|
||||||
NOTE: If you enable the SW based RF kill and then toggle the HW
|
== =========================================
|
||||||
|
0 RF kill not enabled (radio on)
|
||||||
|
1 SW based RF kill active (radio off)
|
||||||
|
2 HW based RF kill active (radio off)
|
||||||
|
3 Both HW and SW RF kill active (radio off)
|
||||||
|
== =========================================
|
||||||
|
|
||||||
|
write
|
||||||
|
|
||||||
|
== ==================================================
|
||||||
|
0 If SW based RF kill active, turn the radio back on
|
||||||
|
1 If radio is on, activate SW based RF kill
|
||||||
|
== ==================================================
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
If you enable the SW based RF kill and then toggle the HW
|
||||||
based RF kill from ON -> OFF -> ON, the radio will NOT come back on
|
based RF kill from ON -> OFF -> ON, the radio will NOT come back on
|
||||||
|
|
||||||
|
|
||||||
5. Radio Kill Switch
|
5. Radio Kill Switch
|
||||||
-----------------------------------------------
|
====================
|
||||||
|
|
||||||
Most laptops provide the ability for the user to physically disable the radio.
|
Most laptops provide the ability for the user to physically disable the radio.
|
||||||
Some vendors have implemented this as a physical switch that requires no
|
Some vendors have implemented this as a physical switch that requires no
|
||||||
software to turn the radio off and on. On other laptops, however, the switch
|
software to turn the radio off and on. On other laptops, however, the switch
|
||||||
@@ -186,7 +208,8 @@ on your system.
|
|||||||
|
|
||||||
|
|
||||||
6. Dynamic Firmware
|
6. Dynamic Firmware
|
||||||
-----------------------------------------------
|
===================
|
||||||
|
|
||||||
As the firmware is licensed under a restricted use license, it can not be
|
As the firmware is licensed under a restricted use license, it can not be
|
||||||
included within the kernel sources. To enable the IPW2100 you will need a
|
included within the kernel sources. To enable the IPW2100 you will need a
|
||||||
firmware image to load into the wireless NIC's processors.
|
firmware image to load into the wireless NIC's processors.
|
||||||
@@ -197,16 +220,19 @@ See INSTALL for instructions on installing the firmware.
|
|||||||
|
|
||||||
|
|
||||||
7. Power Management
|
7. Power Management
|
||||||
-----------------------------------------------
|
===================
|
||||||
|
|
||||||
The IPW2100 supports the configuration of the Power Save Protocol
|
The IPW2100 supports the configuration of the Power Save Protocol
|
||||||
through a private wireless extension interface. The IPW2100 supports
|
through a private wireless extension interface. The IPW2100 supports
|
||||||
the following different modes:
|
the following different modes:
|
||||||
|
|
||||||
|
=== ===========================================================
|
||||||
off No power management. Radio is always on.
|
off No power management. Radio is always on.
|
||||||
on Automatic power management
|
on Automatic power management
|
||||||
1-5 Different levels of power management. The higher the
|
1-5 Different levels of power management. The higher the
|
||||||
number the greater the power savings, but with an impact to
|
number the greater the power savings, but with an impact to
|
||||||
packet latencies.
|
packet latencies.
|
||||||
|
=== ===========================================================
|
||||||
|
|
||||||
Power management works by powering down the radio after a certain
|
Power management works by powering down the radio after a certain
|
||||||
interval of time has passed where no packets are passed through the
|
interval of time has passed where no packets are passed through the
|
||||||
@@ -220,12 +246,13 @@ any buffered packets. If you have an AP that does not correctly support
|
|||||||
the PSP protocol you may experience packet loss or very poor performance
|
the PSP protocol you may experience packet loss or very poor performance
|
||||||
while power management is enabled. If this is the case, you will need
|
while power management is enabled. If this is the case, you will need
|
||||||
to try and find a firmware update for your AP, or disable power
|
to try and find a firmware update for your AP, or disable power
|
||||||
management (via `iwconfig eth1 power off`)
|
management (via ``iwconfig eth1 power off``)
|
||||||
|
|
||||||
To configure the power level on the IPW2100 you use a combination of
|
To configure the power level on the IPW2100 you use a combination of
|
||||||
iwconfig and iwpriv. iwconfig is used to turn power management on, off,
|
iwconfig and iwpriv. iwconfig is used to turn power management on, off,
|
||||||
and set it to auto.
|
and set it to auto.
|
||||||
|
|
||||||
|
========================= ====================================
|
||||||
iwconfig eth1 power off Disables radio power down
|
iwconfig eth1 power off Disables radio power down
|
||||||
iwconfig eth1 power on Enables radio power management to
|
iwconfig eth1 power on Enables radio power management to
|
||||||
last set level (defaults to AUTO)
|
last set level (defaults to AUTO)
|
||||||
@@ -235,8 +262,9 @@ and set it to auto.
|
|||||||
iwpriv eth1 set_power 1-5 Set the power level as specified,
|
iwpriv eth1 set_power 1-5 Set the power level as specified,
|
||||||
enabling power management if not
|
enabling power management if not
|
||||||
previously enabled.
|
previously enabled.
|
||||||
|
========================= ====================================
|
||||||
|
|
||||||
You can view the current power level setting via:
|
You can view the current power level setting via::
|
||||||
|
|
||||||
iwpriv eth1 get_power
|
iwpriv eth1 get_power
|
||||||
|
|
||||||
@@ -250,7 +278,7 @@ level if `iwconfig eth1 power on` is invoked.
|
|||||||
|
|
||||||
|
|
||||||
8. Support
|
8. Support
|
||||||
-----------------------------------------------
|
==========
|
||||||
|
|
||||||
For general development information and support,
|
For general development information and support,
|
||||||
go to:
|
go to:
|
||||||
@@ -267,9 +295,9 @@ For installation support on the ipw2100 1.1.0 driver on Linux kernels
|
|||||||
http://supportmail.intel.com
|
http://supportmail.intel.com
|
||||||
|
|
||||||
9. License
|
9. License
|
||||||
-----------------------------------------------
|
==========
|
||||||
|
|
||||||
Copyright(c) 2003 - 2006 Intel Corporation. All rights reserved.
|
Copyright |copy| 2003 - 2006 Intel Corporation. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License (version 2) as
|
under the terms of the GNU General Public License (version 2) as
|
||||||
@@ -288,6 +316,8 @@ For installation support on the ipw2100 1.1.0 driver on Linux kernels
|
|||||||
file called LICENSE.
|
file called LICENSE.
|
||||||
|
|
||||||
License Contact Information:
|
License Contact Information:
|
||||||
|
|
||||||
James P. Ketrenos <ipw2100-admin@linux.intel.com>
|
James P. Ketrenos <ipw2100-admin@linux.intel.com>
|
||||||
|
|
||||||
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||||
|
|
@@ -1,8 +1,15 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
.. include:: <isonum.txt>
|
||||||
|
|
||||||
Intel(R) PRO/Wireless 2915ABG Driver for Linux in support of:
|
==============================================
|
||||||
|
Intel(R) PRO/Wireless 2915ABG Driver for Linux
|
||||||
|
==============================================
|
||||||
|
|
||||||
Intel(R) PRO/Wireless 2200BG Network Connection
|
|
||||||
Intel(R) PRO/Wireless 2915ABG Network Connection
|
Support for:
|
||||||
|
|
||||||
|
- Intel(R) PRO/Wireless 2200BG Network Connection
|
||||||
|
- Intel(R) PRO/Wireless 2915ABG Network Connection
|
||||||
|
|
||||||
Note: The Intel(R) PRO/Wireless 2915ABG Driver for Linux and Intel(R)
|
Note: The Intel(R) PRO/Wireless 2915ABG Driver for Linux and Intel(R)
|
||||||
PRO/Wireless 2200BG Driver for Linux is a unified driver that works on
|
PRO/Wireless 2200BG Driver for Linux is a unified driver that works on
|
||||||
@@ -10,35 +17,35 @@ both hardware adapters listed above. In this document the Intel(R)
|
|||||||
PRO/Wireless 2915ABG Driver for Linux will be used to reference the
|
PRO/Wireless 2915ABG Driver for Linux will be used to reference the
|
||||||
unified driver.
|
unified driver.
|
||||||
|
|
||||||
Copyright (C) 2004-2006, Intel Corporation
|
Copyright |copy| 2004-2006, Intel Corporation
|
||||||
|
|
||||||
README.ipw2200
|
README.ipw2200
|
||||||
|
|
||||||
Version: 1.1.2
|
:Version: 1.1.2
|
||||||
Date : March 30, 2006
|
:Date: March 30, 2006
|
||||||
|
|
||||||
|
|
||||||
Index
|
.. Index
|
||||||
-----------------------------------------------
|
|
||||||
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
||||||
1. Introduction
|
1. Introduction
|
||||||
1.1. Overview of features
|
1.1. Overview of features
|
||||||
1.2. Module parameters
|
1.2. Module parameters
|
||||||
1.3. Wireless Extension Private Methods
|
1.3. Wireless Extension Private Methods
|
||||||
1.4. Sysfs Helper Files
|
1.4. Sysfs Helper Files
|
||||||
1.5. Supported channels
|
1.5. Supported channels
|
||||||
2. Ad-Hoc Networking
|
2. Ad-Hoc Networking
|
||||||
3. Interacting with Wireless Tools
|
3. Interacting with Wireless Tools
|
||||||
3.1. iwconfig mode
|
3.1. iwconfig mode
|
||||||
3.2. iwconfig sens
|
3.2. iwconfig sens
|
||||||
4. About the Version Numbers
|
4. About the Version Numbers
|
||||||
5. Firmware installation
|
5. Firmware installation
|
||||||
6. Support
|
6. Support
|
||||||
7. License
|
7. License
|
||||||
|
|
||||||
|
|
||||||
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
0. IMPORTANT INFORMATION BEFORE USING THIS DRIVER
|
||||||
-----------------------------------------------
|
=================================================
|
||||||
|
|
||||||
Important Notice FOR ALL USERS OR DISTRIBUTORS!!!!
|
Important Notice FOR ALL USERS OR DISTRIBUTORS!!!!
|
||||||
|
|
||||||
@@ -89,7 +96,8 @@ http://support.intel.com
|
|||||||
|
|
||||||
|
|
||||||
1. Introduction
|
1. Introduction
|
||||||
-----------------------------------------------
|
===============
|
||||||
|
|
||||||
The following sections attempt to provide a brief introduction to using
|
The following sections attempt to provide a brief introduction to using
|
||||||
the Intel(R) PRO/Wireless 2915ABG Driver for Linux.
|
the Intel(R) PRO/Wireless 2915ABG Driver for Linux.
|
||||||
|
|
||||||
@@ -102,7 +110,7 @@ file.
|
|||||||
|
|
||||||
|
|
||||||
1.1. Overview of Features
|
1.1. Overview of Features
|
||||||
-----------------------------------------------
|
-------------------------
|
||||||
The current release (1.1.2) supports the following features:
|
The current release (1.1.2) supports the following features:
|
||||||
|
|
||||||
+ BSS mode (Infrastructure, Managed)
|
+ BSS mode (Infrastructure, Managed)
|
||||||
@@ -129,16 +137,16 @@ performed on a given feature.
|
|||||||
|
|
||||||
|
|
||||||
1.2. Command Line Parameters
|
1.2. Command Line Parameters
|
||||||
-----------------------------------------------
|
----------------------------
|
||||||
|
|
||||||
Like many modules used in the Linux kernel, the Intel(R) PRO/Wireless
|
Like many modules used in the Linux kernel, the Intel(R) PRO/Wireless
|
||||||
2915ABG Driver for Linux allows configuration options to be provided
|
2915ABG Driver for Linux allows configuration options to be provided
|
||||||
as module parameters. The most common way to specify a module parameter
|
as module parameters. The most common way to specify a module parameter
|
||||||
is via the command line.
|
is via the command line.
|
||||||
|
|
||||||
The general form is:
|
The general form is::
|
||||||
|
|
||||||
% modprobe ipw2200 parameter=value
|
% modprobe ipw2200 parameter=value
|
||||||
|
|
||||||
Where the supported parameter are:
|
Where the supported parameter are:
|
||||||
|
|
||||||
@@ -179,7 +187,7 @@ Where the supported parameter are:
|
|||||||
|
|
||||||
|
|
||||||
1.3. Wireless Extension Private Methods
|
1.3. Wireless Extension Private Methods
|
||||||
-----------------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
As an interface designed to handle generic hardware, there are certain
|
As an interface designed to handle generic hardware, there are certain
|
||||||
capabilities not exposed through the normal Wireless Tool interface. As
|
capabilities not exposed through the normal Wireless Tool interface. As
|
||||||
@@ -187,7 +195,7 @@ such, a provision is provided for a driver to declare custom, or
|
|||||||
private, methods. The Intel(R) PRO/Wireless 2915ABG Driver for Linux
|
private, methods. The Intel(R) PRO/Wireless 2915ABG Driver for Linux
|
||||||
defines several of these to configure various settings.
|
defines several of these to configure various settings.
|
||||||
|
|
||||||
The general form of using the private wireless methods is:
|
The general form of using the private wireless methods is::
|
||||||
|
|
||||||
% iwpriv $IFNAME method parameters
|
% iwpriv $IFNAME method parameters
|
||||||
|
|
||||||
@@ -208,9 +216,13 @@ The supported private methods are:
|
|||||||
Can be used to configure which IEEE mode the driver will
|
Can be used to configure which IEEE mode the driver will
|
||||||
support.
|
support.
|
||||||
|
|
||||||
Usage:
|
Usage::
|
||||||
|
|
||||||
% iwpriv eth1 set_mode {mode}
|
% iwpriv eth1 set_mode {mode}
|
||||||
|
|
||||||
Where {mode} is a number in the range 1-7:
|
Where {mode} is a number in the range 1-7:
|
||||||
|
|
||||||
|
== =====================
|
||||||
1 802.11a (2915 only)
|
1 802.11a (2915 only)
|
||||||
2 802.11b
|
2 802.11b
|
||||||
3 802.11ab (2915 only)
|
3 802.11ab (2915 only)
|
||||||
@@ -218,6 +230,7 @@ The supported private methods are:
|
|||||||
5 802.11ag (2915 only)
|
5 802.11ag (2915 only)
|
||||||
6 802.11bg
|
6 802.11bg
|
||||||
7 802.11abg (2915 only)
|
7 802.11abg (2915 only)
|
||||||
|
== =====================
|
||||||
|
|
||||||
get_preamble
|
get_preamble
|
||||||
Can be used to report configuration of preamble length.
|
Can be used to report configuration of preamble length.
|
||||||
@@ -225,15 +238,20 @@ The supported private methods are:
|
|||||||
set_preamble
|
set_preamble
|
||||||
Can be used to set the configuration of preamble length:
|
Can be used to set the configuration of preamble length:
|
||||||
|
|
||||||
Usage:
|
Usage::
|
||||||
|
|
||||||
% iwpriv eth1 set_preamble {mode}
|
% iwpriv eth1 set_preamble {mode}
|
||||||
|
|
||||||
Where {mode} is one of:
|
Where {mode} is one of:
|
||||||
|
|
||||||
|
== ========================================
|
||||||
1 Long preamble only
|
1 Long preamble only
|
||||||
0 Auto (long or short based on connection)
|
0 Auto (long or short based on connection)
|
||||||
|
== ========================================
|
||||||
|
|
||||||
|
|
||||||
1.4. Sysfs Helper Files:
|
1.4. Sysfs Helper Files
|
||||||
-----------------------------------------------
|
-----------------------
|
||||||
|
|
||||||
The Linux kernel provides a pseudo file system that can be used to
|
The Linux kernel provides a pseudo file system that can be used to
|
||||||
access various components of the operating system. The Intel(R)
|
access various components of the operating system. The Intel(R)
|
||||||
@@ -242,17 +260,17 @@ parameters through this mechanism.
|
|||||||
|
|
||||||
An entry in the sysfs can support reading and/or writing. You can
|
An entry in the sysfs can support reading and/or writing. You can
|
||||||
typically query the contents of a sysfs entry through the use of cat,
|
typically query the contents of a sysfs entry through the use of cat,
|
||||||
and can set the contents via echo. For example:
|
and can set the contents via echo. For example::
|
||||||
|
|
||||||
% cat /sys/bus/pci/drivers/ipw2200/debug_level
|
% cat /sys/bus/pci/drivers/ipw2200/debug_level
|
||||||
|
|
||||||
Will report the current debug level of the driver's logging subsystem
|
Will report the current debug level of the driver's logging subsystem
|
||||||
(only available if CONFIG_IPW2200_DEBUG was configured when the driver
|
(only available if CONFIG_IPW2200_DEBUG was configured when the driver
|
||||||
was built).
|
was built).
|
||||||
|
|
||||||
You can set the debug level via:
|
You can set the debug level via::
|
||||||
|
|
||||||
% echo $VALUE > /sys/bus/pci/drivers/ipw2200/debug_level
|
% echo $VALUE > /sys/bus/pci/drivers/ipw2200/debug_level
|
||||||
|
|
||||||
Where $VALUE would be a number in the case of this sysfs entry. The
|
Where $VALUE would be a number in the case of this sysfs entry. The
|
||||||
input to sysfs files does not have to be a number. For example, the
|
input to sysfs files does not have to be a number. For example, the
|
||||||
@@ -266,39 +284,48 @@ level, which applies only to the single specific instance.
|
|||||||
|
|
||||||
|
|
||||||
1.4.1 Driver Level Sysfs Helper Files
|
1.4.1 Driver Level Sysfs Helper Files
|
||||||
-----------------------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
For the driver level files, look in /sys/bus/pci/drivers/ipw2200/
|
For the driver level files, look in /sys/bus/pci/drivers/ipw2200/
|
||||||
|
|
||||||
debug_level
|
debug_level
|
||||||
|
|
||||||
This controls the same global as the 'debug' module parameter
|
This controls the same global as the 'debug' module parameter
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
1.4.2 Device Level Sysfs Helper Files
|
1.4.2 Device Level Sysfs Helper Files
|
||||||
-----------------------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
For the device level files, look in
|
For the device level files, look in::
|
||||||
|
|
||||||
/sys/bus/pci/drivers/ipw2200/{PCI-ID}/
|
/sys/bus/pci/drivers/ipw2200/{PCI-ID}/
|
||||||
|
|
||||||
For example:
|
For example:::
|
||||||
|
|
||||||
/sys/bus/pci/drivers/ipw2200/0000:02:01.0
|
/sys/bus/pci/drivers/ipw2200/0000:02:01.0
|
||||||
|
|
||||||
For the device level files, see /sys/bus/pci/drivers/ipw2200:
|
For the device level files, see /sys/bus/pci/drivers/ipw2200:
|
||||||
|
|
||||||
rf_kill
|
rf_kill
|
||||||
read -
|
read -
|
||||||
0 = RF kill not enabled (radio on)
|
|
||||||
1 = SW based RF kill active (radio off)
|
|
||||||
2 = HW based RF kill active (radio off)
|
|
||||||
3 = Both HW and SW RF kill active (radio off)
|
|
||||||
write -
|
|
||||||
0 = If SW based RF kill active, turn the radio back on
|
|
||||||
1 = If radio is on, activate SW based RF kill
|
|
||||||
|
|
||||||
NOTE: If you enable the SW based RF kill and then toggle the HW
|
== =========================================
|
||||||
|
0 RF kill not enabled (radio on)
|
||||||
|
1 SW based RF kill active (radio off)
|
||||||
|
2 HW based RF kill active (radio off)
|
||||||
|
3 Both HW and SW RF kill active (radio off)
|
||||||
|
== =========================================
|
||||||
|
|
||||||
|
write -
|
||||||
|
|
||||||
|
== ==================================================
|
||||||
|
0 If SW based RF kill active, turn the radio back on
|
||||||
|
1 If radio is on, activate SW based RF kill
|
||||||
|
== ==================================================
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
If you enable the SW based RF kill and then toggle the HW
|
||||||
based RF kill from ON -> OFF -> ON, the radio will NOT come back on
|
based RF kill from ON -> OFF -> ON, the radio will NOT come back on
|
||||||
|
|
||||||
ucode
|
ucode
|
||||||
@@ -306,18 +333,28 @@ For the device level files, see /sys/bus/pci/drivers/ipw2200:
|
|||||||
|
|
||||||
led
|
led
|
||||||
read -
|
read -
|
||||||
0 = LED code disabled
|
|
||||||
1 = LED code enabled
|
|
||||||
write -
|
|
||||||
0 = Disable LED code
|
|
||||||
1 = Enable LED code
|
|
||||||
|
|
||||||
NOTE: The LED code has been reported to hang some systems when
|
== =================
|
||||||
|
0 LED code disabled
|
||||||
|
1 LED code enabled
|
||||||
|
== =================
|
||||||
|
|
||||||
|
write -
|
||||||
|
|
||||||
|
== ================
|
||||||
|
0 Disable LED code
|
||||||
|
1 Enable LED code
|
||||||
|
== ================
|
||||||
|
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The LED code has been reported to hang some systems when
|
||||||
running ifconfig and is therefore disabled by default.
|
running ifconfig and is therefore disabled by default.
|
||||||
|
|
||||||
|
|
||||||
1.5. Supported channels
|
1.5. Supported channels
|
||||||
-----------------------------------------------
|
-----------------------
|
||||||
|
|
||||||
Upon loading the Intel(R) PRO/Wireless 2915ABG Driver for Linux, a
|
Upon loading the Intel(R) PRO/Wireless 2915ABG Driver for Linux, a
|
||||||
message stating the detected geography code and the number of 802.11
|
message stating the detected geography code and the number of 802.11
|
||||||
@@ -326,27 +363,42 @@ channels supported by the card will be displayed in the log.
|
|||||||
The geography code corresponds to a regulatory domain as shown in the
|
The geography code corresponds to a regulatory domain as shown in the
|
||||||
table below.
|
table below.
|
||||||
|
|
||||||
Supported channels
|
+------+----------------------------+--------------------+
|
||||||
Code Geography 802.11bg 802.11a
|
| | | Supported channels |
|
||||||
|
| Code | Geography +----------+---------+
|
||||||
--- Restricted 11 0
|
| | | 802.11bg | 802.11a |
|
||||||
ZZF Custom US/Canada 11 8
|
+======+============================+==========+=========+
|
||||||
ZZD Rest of World 13 0
|
| --- | Restricted | 11 | 0 |
|
||||||
ZZA Custom USA & Europe & High 11 13
|
+------+----------------------------+----------+---------+
|
||||||
ZZB Custom NA & Europe 11 13
|
| ZZF | Custom US/Canada | 11 | 8 |
|
||||||
ZZC Custom Japan 11 4
|
+------+----------------------------+----------+---------+
|
||||||
ZZM Custom 11 0
|
| ZZD | Rest of World | 13 | 0 |
|
||||||
ZZE Europe 13 19
|
+------+----------------------------+----------+---------+
|
||||||
ZZJ Custom Japan 14 4
|
| ZZA | Custom USA & Europe & High | 11 | 13 |
|
||||||
ZZR Rest of World 14 0
|
+------+----------------------------+----------+---------+
|
||||||
ZZH High Band 13 4
|
| ZZB | Custom NA & Europe | 11 | 13 |
|
||||||
ZZG Custom Europe 13 4
|
+------+----------------------------+----------+---------+
|
||||||
ZZK Europe 13 24
|
| ZZC | Custom Japan | 11 | 4 |
|
||||||
ZZL Europe 11 13
|
+------+----------------------------+----------+---------+
|
||||||
|
| ZZM | Custom | 11 | 0 |
|
||||||
|
+------+----------------------------+----------+---------+
|
||||||
|
| ZZE | Europe | 13 | 19 |
|
||||||
|
+------+----------------------------+----------+---------+
|
||||||
|
| ZZJ | Custom Japan | 14 | 4 |
|
||||||
|
+------+----------------------------+----------+---------+
|
||||||
|
| ZZR | Rest of World | 14 | 0 |
|
||||||
|
+------+----------------------------+----------+---------+
|
||||||
|
| ZZH | High Band | 13 | 4 |
|
||||||
|
+------+----------------------------+----------+---------+
|
||||||
|
| ZZG | Custom Europe | 13 | 4 |
|
||||||
|
+------+----------------------------+----------+---------+
|
||||||
|
| ZZK | Europe | 13 | 24 |
|
||||||
|
+------+----------------------------+----------+---------+
|
||||||
|
| ZZL | Europe | 11 | 13 |
|
||||||
|
+------+----------------------------+----------+---------+
|
||||||
|
|
||||||
2. Ad-Hoc Networking
|
2. Ad-Hoc Networking
|
||||||
-----------------------------------------------
|
=====================
|
||||||
|
|
||||||
When using a device in an Ad-Hoc network, it is useful to understand the
|
When using a device in an Ad-Hoc network, it is useful to understand the
|
||||||
sequence and requirements for the driver to be able to create, join, or
|
sequence and requirements for the driver to be able to create, join, or
|
||||||
@@ -357,13 +409,13 @@ have a consistent experience while using the driver as a member of an
|
|||||||
Ad-Hoc network.
|
Ad-Hoc network.
|
||||||
|
|
||||||
2.1. Joining an Ad-Hoc Network
|
2.1. Joining an Ad-Hoc Network
|
||||||
-----------------------------------------------
|
------------------------------
|
||||||
|
|
||||||
The easiest way to get onto an Ad-Hoc network is to join one that
|
The easiest way to get onto an Ad-Hoc network is to join one that
|
||||||
already exists.
|
already exists.
|
||||||
|
|
||||||
2.2. Creating an Ad-Hoc Network
|
2.2. Creating an Ad-Hoc Network
|
||||||
-----------------------------------------------
|
-------------------------------
|
||||||
|
|
||||||
An Ad-Hoc networks is created using the syntax of the Wireless tool.
|
An Ad-Hoc networks is created using the syntax of the Wireless tool.
|
||||||
|
|
||||||
@@ -371,21 +423,21 @@ For Example:
|
|||||||
iwconfig eth1 mode ad-hoc essid testing channel 2
|
iwconfig eth1 mode ad-hoc essid testing channel 2
|
||||||
|
|
||||||
2.3. Merging Ad-Hoc Networks
|
2.3. Merging Ad-Hoc Networks
|
||||||
-----------------------------------------------
|
----------------------------
|
||||||
|
|
||||||
|
|
||||||
3. Interaction with Wireless Tools
|
3. Interaction with Wireless Tools
|
||||||
-----------------------------------------------
|
==================================
|
||||||
|
|
||||||
3.1 iwconfig mode
|
3.1 iwconfig mode
|
||||||
-----------------------------------------------
|
-----------------
|
||||||
|
|
||||||
When configuring the mode of the adapter, all run-time configured parameters
|
When configuring the mode of the adapter, all run-time configured parameters
|
||||||
are reset to the value used when the module was loaded. This includes
|
are reset to the value used when the module was loaded. This includes
|
||||||
channels, rates, ESSID, etc.
|
channels, rates, ESSID, etc.
|
||||||
|
|
||||||
3.2 iwconfig sens
|
3.2 iwconfig sens
|
||||||
-----------------------------------------------
|
-----------------
|
||||||
|
|
||||||
The 'iwconfig ethX sens XX' command will not set the signal sensitivity
|
The 'iwconfig ethX sens XX' command will not set the signal sensitivity
|
||||||
threshold, as described in iwconfig documentation, but rather the number
|
threshold, as described in iwconfig documentation, but rather the number
|
||||||
@@ -395,7 +447,7 @@ threshold to 3 times the given value.
|
|||||||
|
|
||||||
|
|
||||||
4. About the Version Numbers
|
4. About the Version Numbers
|
||||||
-----------------------------------------------
|
=============================
|
||||||
|
|
||||||
Due to the nature of open source development projects, there are
|
Due to the nature of open source development projects, there are
|
||||||
frequently changes being incorporated that have not gone through
|
frequently changes being incorporated that have not gone through
|
||||||
@@ -422,7 +474,7 @@ The major version number will be incremented when significant changes
|
|||||||
are made to the driver. Currently, there are no major changes planned.
|
are made to the driver. Currently, there are no major changes planned.
|
||||||
|
|
||||||
5. Firmware installation
|
5. Firmware installation
|
||||||
----------------------------------------------
|
========================
|
||||||
|
|
||||||
The driver requires a firmware image, download it and extract the
|
The driver requires a firmware image, download it and extract the
|
||||||
files under /lib/firmware (or wherever your hotplug's firmware.agent
|
files under /lib/firmware (or wherever your hotplug's firmware.agent
|
||||||
@@ -434,7 +486,7 @@ The firmware can be downloaded from the following URL:
|
|||||||
|
|
||||||
|
|
||||||
6. Support
|
6. Support
|
||||||
-----------------------------------------------
|
==========
|
||||||
|
|
||||||
For direct support of the 1.0.0 version, you can contact
|
For direct support of the 1.0.0 version, you can contact
|
||||||
http://supportmail.intel.com, or you can use the open source project
|
http://supportmail.intel.com, or you can use the open source project
|
||||||
@@ -446,9 +498,9 @@ For general information and support, go to:
|
|||||||
|
|
||||||
|
|
||||||
7. License
|
7. License
|
||||||
-----------------------------------------------
|
==========
|
||||||
|
|
||||||
Copyright(c) 2003 - 2006 Intel Corporation. All rights reserved.
|
Copyright |copy| 2003 - 2006 Intel Corporation. All rights reserved.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify it
|
This program is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU General Public License version 2 as
|
under the terms of the GNU General Public License version 2 as
|
||||||
@@ -467,6 +519,8 @@ For general information and support, go to:
|
|||||||
file called LICENSE.
|
file called LICENSE.
|
||||||
|
|
||||||
Contact Information:
|
Contact Information:
|
||||||
|
|
||||||
James P. Ketrenos <ipw2100-admin@linux.intel.com>
|
James P. Ketrenos <ipw2100-admin@linux.intel.com>
|
||||||
|
|
||||||
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
|
||||||
|
|
@@ -37,7 +37,7 @@ The following features are available in this kernel:
|
|||||||
- SNMP
|
- SNMP
|
||||||
|
|
||||||
Channel Bonding documentation can be found in the Linux kernel source:
|
Channel Bonding documentation can be found in the Linux kernel source:
|
||||||
/Documentation/networking/bonding.txt
|
/Documentation/networking/bonding.rst
|
||||||
|
|
||||||
The driver information previously displayed in the /proc filesystem is not
|
The driver information previously displayed in the /proc filesystem is not
|
||||||
supported in this release. Alternatively, you can use ethtool (version 1.6
|
supported in this release. Alternatively, you can use ethtool (version 1.6
|
||||||
|
@@ -1,3 +1,6 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
======================
|
||||||
Hyper-V network driver
|
Hyper-V network driver
|
||||||
======================
|
======================
|
||||||
|
|
||||||
@@ -10,15 +13,15 @@ Windows 10.
|
|||||||
Features
|
Features
|
||||||
========
|
========
|
||||||
|
|
||||||
Checksum offload
|
Checksum offload
|
||||||
----------------
|
----------------
|
||||||
The netvsc driver supports checksum offload as long as the
|
The netvsc driver supports checksum offload as long as the
|
||||||
Hyper-V host version does. Windows Server 2016 and Azure
|
Hyper-V host version does. Windows Server 2016 and Azure
|
||||||
support checksum offload for TCP and UDP for both IPv4 and
|
support checksum offload for TCP and UDP for both IPv4 and
|
||||||
IPv6. Windows Server 2012 only supports checksum offload for TCP.
|
IPv6. Windows Server 2012 only supports checksum offload for TCP.
|
||||||
|
|
||||||
Receive Side Scaling
|
Receive Side Scaling
|
||||||
--------------------
|
--------------------
|
||||||
Hyper-V supports receive side scaling. For TCP & UDP, packets can
|
Hyper-V supports receive side scaling. For TCP & UDP, packets can
|
||||||
be distributed among available queues based on IP address and port
|
be distributed among available queues based on IP address and port
|
||||||
number.
|
number.
|
||||||
@@ -32,30 +35,37 @@ Features
|
|||||||
hashing. Using L3 hashing is recommended in this case.
|
hashing. Using L3 hashing is recommended in this case.
|
||||||
|
|
||||||
For example, for UDP over IPv4 on eth0:
|
For example, for UDP over IPv4 on eth0:
|
||||||
To include UDP port numbers in hashing:
|
|
||||||
|
To include UDP port numbers in hashing::
|
||||||
|
|
||||||
ethtool -N eth0 rx-flow-hash udp4 sdfn
|
ethtool -N eth0 rx-flow-hash udp4 sdfn
|
||||||
To exclude UDP port numbers in hashing:
|
|
||||||
|
To exclude UDP port numbers in hashing::
|
||||||
|
|
||||||
ethtool -N eth0 rx-flow-hash udp4 sd
|
ethtool -N eth0 rx-flow-hash udp4 sd
|
||||||
To show UDP hash level:
|
|
||||||
|
To show UDP hash level::
|
||||||
|
|
||||||
ethtool -n eth0 rx-flow-hash udp4
|
ethtool -n eth0 rx-flow-hash udp4
|
||||||
|
|
||||||
Generic Receive Offload, aka GRO
|
Generic Receive Offload, aka GRO
|
||||||
--------------------------------
|
--------------------------------
|
||||||
The driver supports GRO and it is enabled by default. GRO coalesces
|
The driver supports GRO and it is enabled by default. GRO coalesces
|
||||||
like packets and significantly reduces CPU usage under heavy Rx
|
like packets and significantly reduces CPU usage under heavy Rx
|
||||||
load.
|
load.
|
||||||
|
|
||||||
Large Receive Offload (LRO), or Receive Side Coalescing (RSC)
|
Large Receive Offload (LRO), or Receive Side Coalescing (RSC)
|
||||||
-------------------------------------------------------------
|
-------------------------------------------------------------
|
||||||
The driver supports LRO/RSC in the vSwitch feature. It reduces the per packet
|
The driver supports LRO/RSC in the vSwitch feature. It reduces the per packet
|
||||||
processing overhead by coalescing multiple TCP segments when possible. The
|
processing overhead by coalescing multiple TCP segments when possible. The
|
||||||
feature is enabled by default on VMs running on Windows Server 2019 and
|
feature is enabled by default on VMs running on Windows Server 2019 and
|
||||||
later. It may be changed by ethtool command:
|
later. It may be changed by ethtool command::
|
||||||
|
|
||||||
ethtool -K eth0 lro on
|
ethtool -K eth0 lro on
|
||||||
ethtool -K eth0 lro off
|
ethtool -K eth0 lro off
|
||||||
|
|
||||||
SR-IOV support
|
SR-IOV support
|
||||||
--------------
|
--------------
|
||||||
Hyper-V supports SR-IOV as a hardware acceleration option. If SR-IOV
|
Hyper-V supports SR-IOV as a hardware acceleration option. If SR-IOV
|
||||||
is enabled in both the vSwitch and the guest configuration, then the
|
is enabled in both the vSwitch and the guest configuration, then the
|
||||||
Virtual Function (VF) device is passed to the guest as a PCI
|
Virtual Function (VF) device is passed to the guest as a PCI
|
||||||
@@ -70,8 +80,8 @@ Features
|
|||||||
flow direction is desired, these should be applied directly to the
|
flow direction is desired, these should be applied directly to the
|
||||||
VF slave device.
|
VF slave device.
|
||||||
|
|
||||||
Receive Buffer
|
Receive Buffer
|
||||||
--------------
|
--------------
|
||||||
Packets are received into a receive area which is created when device
|
Packets are received into a receive area which is created when device
|
||||||
is probed. The receive area is broken into MTU sized chunks and each may
|
is probed. The receive area is broken into MTU sized chunks and each may
|
||||||
contain one or more packets. The number of receive sections may be changed
|
contain one or more packets. The number of receive sections may be changed
|
||||||
@@ -83,8 +93,8 @@ Features
|
|||||||
will use slower method to handle very large packets or if the send buffer
|
will use slower method to handle very large packets or if the send buffer
|
||||||
area is exhausted.
|
area is exhausted.
|
||||||
|
|
||||||
XDP support
|
XDP support
|
||||||
-----------
|
-----------
|
||||||
XDP (eXpress Data Path) is a feature that runs eBPF bytecode at the early
|
XDP (eXpress Data Path) is a feature that runs eBPF bytecode at the early
|
||||||
stage when packets arrive at a NIC card. The goal is to increase performance
|
stage when packets arrive at a NIC card. The goal is to increase performance
|
||||||
for packet processing, reducing the overhead of SKB allocation and other
|
for packet processing, reducing the overhead of SKB allocation and other
|
||||||
@@ -99,7 +109,8 @@ Features
|
|||||||
overwritten by setting of synthetic NIC.
|
overwritten by setting of synthetic NIC.
|
||||||
|
|
||||||
XDP program cannot run with LRO (RSC) enabled, so you need to disable LRO
|
XDP program cannot run with LRO (RSC) enabled, so you need to disable LRO
|
||||||
before running XDP:
|
before running XDP::
|
||||||
|
|
||||||
ethtool -K eth0 lro off
|
ethtool -K eth0 lro off
|
||||||
|
|
||||||
XDP_REDIRECT action is not yet supported.
|
XDP_REDIRECT action is not yet supported.
|
196
Documentation/networking/device_drivers/neterion/s2io.rst
Normal file
196
Documentation/networking/device_drivers/neterion/s2io.rst
Normal file
@@ -0,0 +1,196 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=========================================================
|
||||||
|
Neterion's (Formerly S2io) Xframe I/II PCI-X 10GbE driver
|
||||||
|
=========================================================
|
||||||
|
|
||||||
|
Release notes for Neterion's (Formerly S2io) Xframe I/II PCI-X 10GbE driver.
|
||||||
|
|
||||||
|
.. Contents
|
||||||
|
- 1. Introduction
|
||||||
|
- 2. Identifying the adapter/interface
|
||||||
|
- 3. Features supported
|
||||||
|
- 4. Command line parameters
|
||||||
|
- 5. Performance suggestions
|
||||||
|
- 6. Available Downloads
|
||||||
|
|
||||||
|
|
||||||
|
1. Introduction
|
||||||
|
===============
|
||||||
|
This Linux driver supports Neterion's Xframe I PCI-X 1.0 and
|
||||||
|
Xframe II PCI-X 2.0 adapters. It supports several features
|
||||||
|
such as jumbo frames, MSI/MSI-X, checksum offloads, TSO, UFO and so on.
|
||||||
|
See below for complete list of features.
|
||||||
|
|
||||||
|
All features are supported for both IPv4 and IPv6.
|
||||||
|
|
||||||
|
2. Identifying the adapter/interface
|
||||||
|
====================================
|
||||||
|
|
||||||
|
a. Insert the adapter(s) in your system.
|
||||||
|
b. Build and load driver::
|
||||||
|
|
||||||
|
# insmod s2io.ko
|
||||||
|
|
||||||
|
c. View log messages::
|
||||||
|
|
||||||
|
# dmesg | tail -40
|
||||||
|
|
||||||
|
You will see messages similar to::
|
||||||
|
|
||||||
|
eth3: Neterion Xframe I 10GbE adapter (rev 3), Version 2.0.9.1, Intr type INTA
|
||||||
|
eth4: Neterion Xframe II 10GbE adapter (rev 2), Version 2.0.9.1, Intr type INTA
|
||||||
|
eth4: Device is on 64 bit 133MHz PCIX(M1) bus
|
||||||
|
|
||||||
|
The above messages identify the adapter type(Xframe I/II), adapter revision,
|
||||||
|
driver version, interface name(eth3, eth4), Interrupt type(INTA, MSI, MSI-X).
|
||||||
|
In case of Xframe II, the PCI/PCI-X bus width and frequency are displayed
|
||||||
|
as well.
|
||||||
|
|
||||||
|
To associate an interface with a physical adapter use "ethtool -p <ethX>".
|
||||||
|
The corresponding adapter's LED will blink multiple times.
|
||||||
|
|
||||||
|
3. Features supported
|
||||||
|
=====================
|
||||||
|
a. Jumbo frames. Xframe I/II supports MTU up to 9600 bytes,
|
||||||
|
modifiable using ip command.
|
||||||
|
|
||||||
|
b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit
|
||||||
|
and receive, TSO.
|
||||||
|
|
||||||
|
c. Multi-buffer receive mode. Scattering of packet across multiple
|
||||||
|
buffers. Currently driver supports 2-buffer mode which yields
|
||||||
|
significant performance improvement on certain platforms(SGI Altix,
|
||||||
|
IBM xSeries).
|
||||||
|
|
||||||
|
d. MSI/MSI-X. Can be enabled on platforms which support this feature
|
||||||
|
(IA64, Xeon) resulting in noticeable performance improvement(up to 7%
|
||||||
|
on certain platforms).
|
||||||
|
|
||||||
|
e. Statistics. Comprehensive MAC-level and software statistics displayed
|
||||||
|
using "ethtool -S" option.
|
||||||
|
|
||||||
|
f. Multi-FIFO/Ring. Supports up to 8 transmit queues and receive rings,
|
||||||
|
with multiple steering options.
|
||||||
|
|
||||||
|
4. Command line parameters
|
||||||
|
==========================
|
||||||
|
|
||||||
|
a. tx_fifo_num
|
||||||
|
Number of transmit queues
|
||||||
|
|
||||||
|
Valid range: 1-8
|
||||||
|
|
||||||
|
Default: 1
|
||||||
|
|
||||||
|
b. rx_ring_num
|
||||||
|
Number of receive rings
|
||||||
|
|
||||||
|
Valid range: 1-8
|
||||||
|
|
||||||
|
Default: 1
|
||||||
|
|
||||||
|
c. tx_fifo_len
|
||||||
|
Size of each transmit queue
|
||||||
|
|
||||||
|
Valid range: Total length of all queues should not exceed 8192
|
||||||
|
|
||||||
|
Default: 4096
|
||||||
|
|
||||||
|
d. rx_ring_sz
|
||||||
|
Size of each receive ring(in 4K blocks)
|
||||||
|
|
||||||
|
Valid range: Limited by memory on system
|
||||||
|
|
||||||
|
Default: 30
|
||||||
|
|
||||||
|
e. intr_type
|
||||||
|
Specifies interrupt type. Possible values 0(INTA), 2(MSI-X)
|
||||||
|
|
||||||
|
Valid values: 0, 2
|
||||||
|
|
||||||
|
Default: 2
|
||||||
|
|
||||||
|
5. Performance suggestions
|
||||||
|
==========================
|
||||||
|
|
||||||
|
General:
|
||||||
|
|
||||||
|
a. Set MTU to maximum(9000 for switch setup, 9600 in back-to-back configuration)
|
||||||
|
b. Set TCP windows size to optimal value.
|
||||||
|
|
||||||
|
For instance, for MTU=1500 a value of 210K has been observed to result in
|
||||||
|
good performance::
|
||||||
|
|
||||||
|
# sysctl -w net.ipv4.tcp_rmem="210000 210000 210000"
|
||||||
|
# sysctl -w net.ipv4.tcp_wmem="210000 210000 210000"
|
||||||
|
|
||||||
|
For MTU=9000, TCP window size of 10 MB is recommended::
|
||||||
|
|
||||||
|
# sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"
|
||||||
|
# sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"
|
||||||
|
|
||||||
|
Transmit performance:
|
||||||
|
|
||||||
|
a. By default, the driver respects BIOS settings for PCI bus parameters.
|
||||||
|
However, you may want to experiment with PCI bus parameters
|
||||||
|
max-split-transactions(MOST) and MMRBC (use setpci command).
|
||||||
|
|
||||||
|
A MOST value of 2 has been found optimal for Opterons and 3 for Itanium.
|
||||||
|
|
||||||
|
It could be different for your hardware.
|
||||||
|
|
||||||
|
Set MMRBC to 4K**.
|
||||||
|
|
||||||
|
For example you can set
|
||||||
|
|
||||||
|
For opteron::
|
||||||
|
|
||||||
|
#setpci -d 17d5:* 62=1d
|
||||||
|
|
||||||
|
For Itanium::
|
||||||
|
|
||||||
|
#setpci -d 17d5:* 62=3d
|
||||||
|
|
||||||
|
For detailed description of the PCI registers, please see Xframe User Guide.
|
||||||
|
|
||||||
|
b. Ensure Transmit Checksum offload is enabled. Use ethtool to set/verify this
|
||||||
|
parameter.
|
||||||
|
|
||||||
|
c. Turn on TSO(using "ethtool -K")::
|
||||||
|
|
||||||
|
# ethtool -K <ethX> tso on
|
||||||
|
|
||||||
|
Receive performance:
|
||||||
|
|
||||||
|
a. By default, the driver respects BIOS settings for PCI bus parameters.
|
||||||
|
However, you may want to set PCI latency timer to 248::
|
||||||
|
|
||||||
|
#setpci -d 17d5:* LATENCY_TIMER=f8
|
||||||
|
|
||||||
|
For detailed description of the PCI registers, please see Xframe User Guide.
|
||||||
|
|
||||||
|
b. Use 2-buffer mode. This results in large performance boost on
|
||||||
|
certain platforms(eg. SGI Altix, IBM xSeries).
|
||||||
|
|
||||||
|
c. Ensure Receive Checksum offload is enabled. Use "ethtool -K ethX" command to
|
||||||
|
set/verify this option.
|
||||||
|
|
||||||
|
d. Enable NAPI feature(in kernel configuration Device Drivers ---> Network
|
||||||
|
device support ---> Ethernet (10000 Mbit) ---> S2IO 10Gbe Xframe NIC) to
|
||||||
|
bring down CPU utilization.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
For AMD opteron platforms with 8131 chipset, MMRBC=1 and MOST=1 are
|
||||||
|
recommended as safe parameters.
|
||||||
|
|
||||||
|
For more information, please review the AMD8131 errata at
|
||||||
|
http://vip.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/
|
||||||
|
26310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf
|
||||||
|
|
||||||
|
6. Support
|
||||||
|
==========
|
||||||
|
|
||||||
|
For further support please contact either your 10GbE Xframe NIC vendor (IBM,
|
||||||
|
HP, SGI etc.)
|
@@ -1,141 +0,0 @@
|
|||||||
Release notes for Neterion's (Formerly S2io) Xframe I/II PCI-X 10GbE driver.
|
|
||||||
|
|
||||||
Contents
|
|
||||||
=======
|
|
||||||
- 1. Introduction
|
|
||||||
- 2. Identifying the adapter/interface
|
|
||||||
- 3. Features supported
|
|
||||||
- 4. Command line parameters
|
|
||||||
- 5. Performance suggestions
|
|
||||||
- 6. Available Downloads
|
|
||||||
|
|
||||||
|
|
||||||
1. Introduction:
|
|
||||||
This Linux driver supports Neterion's Xframe I PCI-X 1.0 and
|
|
||||||
Xframe II PCI-X 2.0 adapters. It supports several features
|
|
||||||
such as jumbo frames, MSI/MSI-X, checksum offloads, TSO, UFO and so on.
|
|
||||||
See below for complete list of features.
|
|
||||||
All features are supported for both IPv4 and IPv6.
|
|
||||||
|
|
||||||
2. Identifying the adapter/interface:
|
|
||||||
a. Insert the adapter(s) in your system.
|
|
||||||
b. Build and load driver
|
|
||||||
# insmod s2io.ko
|
|
||||||
c. View log messages
|
|
||||||
# dmesg | tail -40
|
|
||||||
You will see messages similar to:
|
|
||||||
eth3: Neterion Xframe I 10GbE adapter (rev 3), Version 2.0.9.1, Intr type INTA
|
|
||||||
eth4: Neterion Xframe II 10GbE adapter (rev 2), Version 2.0.9.1, Intr type INTA
|
|
||||||
eth4: Device is on 64 bit 133MHz PCIX(M1) bus
|
|
||||||
|
|
||||||
The above messages identify the adapter type(Xframe I/II), adapter revision,
|
|
||||||
driver version, interface name(eth3, eth4), Interrupt type(INTA, MSI, MSI-X).
|
|
||||||
In case of Xframe II, the PCI/PCI-X bus width and frequency are displayed
|
|
||||||
as well.
|
|
||||||
|
|
||||||
To associate an interface with a physical adapter use "ethtool -p <ethX>".
|
|
||||||
The corresponding adapter's LED will blink multiple times.
|
|
||||||
|
|
||||||
3. Features supported:
|
|
||||||
a. Jumbo frames. Xframe I/II supports MTU up to 9600 bytes,
|
|
||||||
modifiable using ip command.
|
|
||||||
|
|
||||||
b. Offloads. Supports checksum offload(TCP/UDP/IP) on transmit
|
|
||||||
and receive, TSO.
|
|
||||||
|
|
||||||
c. Multi-buffer receive mode. Scattering of packet across multiple
|
|
||||||
buffers. Currently driver supports 2-buffer mode which yields
|
|
||||||
significant performance improvement on certain platforms(SGI Altix,
|
|
||||||
IBM xSeries).
|
|
||||||
|
|
||||||
d. MSI/MSI-X. Can be enabled on platforms which support this feature
|
|
||||||
(IA64, Xeon) resulting in noticeable performance improvement(up to 7%
|
|
||||||
on certain platforms).
|
|
||||||
|
|
||||||
e. Statistics. Comprehensive MAC-level and software statistics displayed
|
|
||||||
using "ethtool -S" option.
|
|
||||||
|
|
||||||
f. Multi-FIFO/Ring. Supports up to 8 transmit queues and receive rings,
|
|
||||||
with multiple steering options.
|
|
||||||
|
|
||||||
4. Command line parameters
|
|
||||||
a. tx_fifo_num
|
|
||||||
Number of transmit queues
|
|
||||||
Valid range: 1-8
|
|
||||||
Default: 1
|
|
||||||
|
|
||||||
b. rx_ring_num
|
|
||||||
Number of receive rings
|
|
||||||
Valid range: 1-8
|
|
||||||
Default: 1
|
|
||||||
|
|
||||||
c. tx_fifo_len
|
|
||||||
Size of each transmit queue
|
|
||||||
Valid range: Total length of all queues should not exceed 8192
|
|
||||||
Default: 4096
|
|
||||||
|
|
||||||
d. rx_ring_sz
|
|
||||||
Size of each receive ring(in 4K blocks)
|
|
||||||
Valid range: Limited by memory on system
|
|
||||||
Default: 30
|
|
||||||
|
|
||||||
e. intr_type
|
|
||||||
Specifies interrupt type. Possible values 0(INTA), 2(MSI-X)
|
|
||||||
Valid values: 0, 2
|
|
||||||
Default: 2
|
|
||||||
|
|
||||||
5. Performance suggestions
|
|
||||||
General:
|
|
||||||
a. Set MTU to maximum(9000 for switch setup, 9600 in back-to-back configuration)
|
|
||||||
b. Set TCP windows size to optimal value.
|
|
||||||
For instance, for MTU=1500 a value of 210K has been observed to result in
|
|
||||||
good performance.
|
|
||||||
# sysctl -w net.ipv4.tcp_rmem="210000 210000 210000"
|
|
||||||
# sysctl -w net.ipv4.tcp_wmem="210000 210000 210000"
|
|
||||||
For MTU=9000, TCP window size of 10 MB is recommended.
|
|
||||||
# sysctl -w net.ipv4.tcp_rmem="10000000 10000000 10000000"
|
|
||||||
# sysctl -w net.ipv4.tcp_wmem="10000000 10000000 10000000"
|
|
||||||
|
|
||||||
Transmit performance:
|
|
||||||
a. By default, the driver respects BIOS settings for PCI bus parameters.
|
|
||||||
However, you may want to experiment with PCI bus parameters
|
|
||||||
max-split-transactions(MOST) and MMRBC (use setpci command).
|
|
||||||
A MOST value of 2 has been found optimal for Opterons and 3 for Itanium.
|
|
||||||
It could be different for your hardware.
|
|
||||||
Set MMRBC to 4K**.
|
|
||||||
|
|
||||||
For example you can set
|
|
||||||
For opteron
|
|
||||||
#setpci -d 17d5:* 62=1d
|
|
||||||
For Itanium
|
|
||||||
#setpci -d 17d5:* 62=3d
|
|
||||||
|
|
||||||
For detailed description of the PCI registers, please see Xframe User Guide.
|
|
||||||
|
|
||||||
b. Ensure Transmit Checksum offload is enabled. Use ethtool to set/verify this
|
|
||||||
parameter.
|
|
||||||
c. Turn on TSO(using "ethtool -K")
|
|
||||||
# ethtool -K <ethX> tso on
|
|
||||||
|
|
||||||
Receive performance:
|
|
||||||
a. By default, the driver respects BIOS settings for PCI bus parameters.
|
|
||||||
However, you may want to set PCI latency timer to 248.
|
|
||||||
#setpci -d 17d5:* LATENCY_TIMER=f8
|
|
||||||
For detailed description of the PCI registers, please see Xframe User Guide.
|
|
||||||
b. Use 2-buffer mode. This results in large performance boost on
|
|
||||||
certain platforms(eg. SGI Altix, IBM xSeries).
|
|
||||||
c. Ensure Receive Checksum offload is enabled. Use "ethtool -K ethX" command to
|
|
||||||
set/verify this option.
|
|
||||||
d. Enable NAPI feature(in kernel configuration Device Drivers ---> Network
|
|
||||||
device support ---> Ethernet (10000 Mbit) ---> S2IO 10Gbe Xframe NIC) to
|
|
||||||
bring down CPU utilization.
|
|
||||||
|
|
||||||
** For AMD opteron platforms with 8131 chipset, MMRBC=1 and MOST=1 are
|
|
||||||
recommended as safe parameters.
|
|
||||||
For more information, please review the AMD8131 errata at
|
|
||||||
http://vip.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/
|
|
||||||
26310_AMD-8131_HyperTransport_PCI-X_Tunnel_Revision_Guide_rev_3_18.pdf
|
|
||||||
|
|
||||||
6. Support
|
|
||||||
For further support please contact either your 10GbE Xframe NIC vendor (IBM,
|
|
||||||
HP, SGI etc.)
|
|
@@ -1,24 +1,30 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
Neterion's (Formerly S2io) X3100 Series 10GbE PCIe Server Adapter Linux driver
|
Neterion's (Formerly S2io) X3100 Series 10GbE PCIe Server Adapter Linux driver
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
|
||||||
Contents
|
.. Contents
|
||||||
--------
|
|
||||||
|
|
||||||
1) Introduction
|
1) Introduction
|
||||||
2) Features supported
|
2) Features supported
|
||||||
3) Configurable driver parameters
|
3) Configurable driver parameters
|
||||||
4) Troubleshooting
|
4) Troubleshooting
|
||||||
|
|
||||||
|
1. Introduction
|
||||||
|
===============
|
||||||
|
|
||||||
1) Introduction:
|
|
||||||
----------------
|
|
||||||
This Linux driver supports all Neterion's X3100 series 10 GbE PCIe I/O
|
This Linux driver supports all Neterion's X3100 series 10 GbE PCIe I/O
|
||||||
Virtualized Server adapters.
|
Virtualized Server adapters.
|
||||||
|
|
||||||
The X3100 series supports four modes of operation, configurable via
|
The X3100 series supports four modes of operation, configurable via
|
||||||
firmware -
|
firmware:
|
||||||
Single function mode
|
|
||||||
Multi function mode
|
- Single function mode
|
||||||
SRIOV mode
|
- Multi function mode
|
||||||
MRIOV mode
|
- SRIOV mode
|
||||||
|
- MRIOV mode
|
||||||
|
|
||||||
The functions share a 10GbE link and the pci-e bus, but hardly anything else
|
The functions share a 10GbE link and the pci-e bus, but hardly anything else
|
||||||
inside the ASIC. Features like independent hw reset, statistics, bandwidth/
|
inside the ASIC. Features like independent hw reset, statistics, bandwidth/
|
||||||
priority allocation and guarantees, GRO, TSO, interrupt moderation etc are
|
priority allocation and guarantees, GRO, TSO, interrupt moderation etc are
|
||||||
@@ -26,41 +32,49 @@ supported independently on each function.
|
|||||||
|
|
||||||
(See below for a complete list of features supported for both IPv4 and IPv6)
|
(See below for a complete list of features supported for both IPv4 and IPv6)
|
||||||
|
|
||||||
2) Features supported:
|
2. Features supported
|
||||||
----------------------
|
=====================
|
||||||
|
|
||||||
i) Single function mode (up to 17 queues)
|
i) Single function mode (up to 17 queues)
|
||||||
|
|
||||||
ii) Multi function mode (up to 17 functions)
|
ii) Multi function mode (up to 17 functions)
|
||||||
|
|
||||||
iii) PCI-SIG's I/O Virtualization
|
iii) PCI-SIG's I/O Virtualization
|
||||||
|
|
||||||
- Single Root mode: v1.0 (up to 17 functions)
|
- Single Root mode: v1.0 (up to 17 functions)
|
||||||
- Multi-Root mode: v1.0 (up to 17 functions)
|
- Multi-Root mode: v1.0 (up to 17 functions)
|
||||||
|
|
||||||
iv) Jumbo frames
|
iv) Jumbo frames
|
||||||
|
|
||||||
X3100 Series supports MTU up to 9600 bytes, modifiable using
|
X3100 Series supports MTU up to 9600 bytes, modifiable using
|
||||||
ip command.
|
ip command.
|
||||||
|
|
||||||
v) Offloads supported: (Enabled by default)
|
v) Offloads supported: (Enabled by default)
|
||||||
Checksum offload (TCP/UDP/IP) on transmit and receive paths
|
|
||||||
TCP Segmentation Offload (TSO) on transmit path
|
- Checksum offload (TCP/UDP/IP) on transmit and receive paths
|
||||||
Generic Receive Offload (GRO) on receive path
|
- TCP Segmentation Offload (TSO) on transmit path
|
||||||
|
- Generic Receive Offload (GRO) on receive path
|
||||||
|
|
||||||
vi) MSI-X: (Enabled by default)
|
vi) MSI-X: (Enabled by default)
|
||||||
|
|
||||||
Resulting in noticeable performance improvement (up to 7% on certain
|
Resulting in noticeable performance improvement (up to 7% on certain
|
||||||
platforms).
|
platforms).
|
||||||
|
|
||||||
vii) NAPI: (Enabled by default)
|
vii) NAPI: (Enabled by default)
|
||||||
|
|
||||||
For better Rx interrupt moderation.
|
For better Rx interrupt moderation.
|
||||||
|
|
||||||
viii)RTH (Receive Traffic Hash): (Enabled by default)
|
viii)RTH (Receive Traffic Hash): (Enabled by default)
|
||||||
|
|
||||||
Receive side steering for better scaling.
|
Receive side steering for better scaling.
|
||||||
|
|
||||||
ix) Statistics
|
ix) Statistics
|
||||||
|
|
||||||
Comprehensive MAC-level and software statistics displayed using
|
Comprehensive MAC-level and software statistics displayed using
|
||||||
"ethtool -S" option.
|
"ethtool -S" option.
|
||||||
|
|
||||||
x) Multiple hardware queues: (Enabled by default)
|
x) Multiple hardware queues: (Enabled by default)
|
||||||
|
|
||||||
Up to 17 hardware based transmit and receive data channels, with
|
Up to 17 hardware based transmit and receive data channels, with
|
||||||
multiple steering options (transmit multiqueue enabled by default).
|
multiple steering options (transmit multiqueue enabled by default).
|
||||||
|
|
||||||
@@ -69,25 +83,33 @@ x) Multiple hardware queues: (Enabled by default)
|
|||||||
|
|
||||||
i) max_config_dev
|
i) max_config_dev
|
||||||
Specifies maximum device functions to be enabled.
|
Specifies maximum device functions to be enabled.
|
||||||
|
|
||||||
Valid range: 1-8
|
Valid range: 1-8
|
||||||
|
|
||||||
ii) max_config_port
|
ii) max_config_port
|
||||||
Specifies number of ports to be enabled.
|
Specifies number of ports to be enabled.
|
||||||
|
|
||||||
Valid range: 1,2
|
Valid range: 1,2
|
||||||
|
|
||||||
Default: 1
|
Default: 1
|
||||||
|
|
||||||
iii)max_config_vpath
|
iii) max_config_vpath
|
||||||
Specifies maximum VPATH(s) configured for each device function.
|
Specifies maximum VPATH(s) configured for each device function.
|
||||||
|
|
||||||
Valid range: 1-17
|
Valid range: 1-17
|
||||||
|
|
||||||
iv) vlan_tag_strip
|
iv) vlan_tag_strip
|
||||||
Enables/disables vlan tag stripping from all received tagged frames that
|
Enables/disables vlan tag stripping from all received tagged frames that
|
||||||
are not replicated at the internal L2 switch.
|
are not replicated at the internal L2 switch.
|
||||||
|
|
||||||
Valid range: 0,1 (disabled, enabled respectively)
|
Valid range: 0,1 (disabled, enabled respectively)
|
||||||
|
|
||||||
Default: 1
|
Default: 1
|
||||||
|
|
||||||
v) addr_learn_en
|
v) addr_learn_en
|
||||||
Enable learning the mac address of the guest OS interface in
|
Enable learning the mac address of the guest OS interface in
|
||||||
virtualization environment.
|
virtualization environment.
|
||||||
|
|
||||||
Valid range: 0,1 (disabled, enabled respectively)
|
Valid range: 0,1 (disabled, enabled respectively)
|
||||||
|
|
||||||
Default: 0
|
Default: 0
|
@@ -11,6 +11,9 @@ Contents
|
|||||||
========
|
========
|
||||||
|
|
||||||
- Identifying the Adapter
|
- Identifying the Adapter
|
||||||
|
- Enabling the driver
|
||||||
|
- Configuring the driver
|
||||||
|
- Statistics
|
||||||
- Support
|
- Support
|
||||||
|
|
||||||
Identifying the Adapter
|
Identifying the Adapter
|
||||||
@@ -28,12 +31,238 @@ and configure them for use. There should be log entries in the kernel
|
|||||||
messages such as these::
|
messages such as these::
|
||||||
|
|
||||||
$ dmesg | grep ionic
|
$ dmesg | grep ionic
|
||||||
ionic Pensando Ethernet NIC Driver, ver 0.15.0-k
|
ionic 0000:b5:00.0: 126.016 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x16 link)
|
||||||
ionic 0000:b5:00.0 enp181s0: renamed from eth0
|
ionic 0000:b5:00.0 enp181s0: renamed from eth0
|
||||||
|
ionic 0000:b5:00.0 enp181s0: Link up - 100 Gbps
|
||||||
|
ionic 0000:b6:00.0: 126.016 Gb/s available PCIe bandwidth (8.0 GT/s PCIe x16 link)
|
||||||
ionic 0000:b6:00.0 enp182s0: renamed from eth0
|
ionic 0000:b6:00.0 enp182s0: renamed from eth0
|
||||||
|
ionic 0000:b6:00.0 enp182s0: Link up - 100 Gbps
|
||||||
|
|
||||||
|
Driver and firmware version information can be gathered with either of
|
||||||
|
ethtool or devlink tools::
|
||||||
|
|
||||||
|
$ ethtool -i enp181s0
|
||||||
|
driver: ionic
|
||||||
|
version: 5.7.0
|
||||||
|
firmware-version: 1.8.0-28
|
||||||
|
...
|
||||||
|
|
||||||
|
$ devlink dev info pci/0000:b5:00.0
|
||||||
|
pci/0000:b5:00.0:
|
||||||
|
driver ionic
|
||||||
|
serial_number FLM18420073
|
||||||
|
versions:
|
||||||
|
fixed:
|
||||||
|
asic.id 0x0
|
||||||
|
asic.rev 0x0
|
||||||
|
running:
|
||||||
|
fw 1.8.0-28
|
||||||
|
|
||||||
|
See Documentation/networking/devlink/ionic.rst for more information
|
||||||
|
on the devlink dev info data.
|
||||||
|
|
||||||
|
Enabling the driver
|
||||||
|
===================
|
||||||
|
|
||||||
|
The driver is enabled via the standard kernel configuration system,
|
||||||
|
using the make command::
|
||||||
|
|
||||||
|
make oldconfig/menuconfig/etc.
|
||||||
|
|
||||||
|
The driver is located in the menu structure at:
|
||||||
|
|
||||||
|
-> Device Drivers
|
||||||
|
-> Network device support (NETDEVICES [=y])
|
||||||
|
-> Ethernet driver support
|
||||||
|
-> Pensando devices
|
||||||
|
-> Pensando Ethernet IONIC Support
|
||||||
|
|
||||||
|
Configuring the Driver
|
||||||
|
======================
|
||||||
|
|
||||||
|
MTU
|
||||||
|
---
|
||||||
|
|
||||||
|
Jumbo frame support is available with a maximim size of 9194 bytes.
|
||||||
|
|
||||||
|
Interrupt coalescing
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
Interrupt coalescing can be configured by changing the rx-usecs value with
|
||||||
|
the "ethtool -C" command. The rx-usecs range is 0-190. The tx-usecs value
|
||||||
|
reflects the rx-usecs value as they are tied together on the same interrupt.
|
||||||
|
|
||||||
|
SR-IOV
|
||||||
|
------
|
||||||
|
|
||||||
|
Minimal SR-IOV support is currently offered and can be enabled by setting
|
||||||
|
the sysfs 'sriov_numvfs' value, if supported by your particular firmware
|
||||||
|
configuration.
|
||||||
|
|
||||||
|
Statistics
|
||||||
|
==========
|
||||||
|
|
||||||
|
Basic hardware stats
|
||||||
|
--------------------
|
||||||
|
|
||||||
|
The commands ``netstat -i``, ``ip -s link show``, and ``ifconfig`` show
|
||||||
|
a limited set of statistics taken directly from firmware. For example::
|
||||||
|
|
||||||
|
$ ip -s link show enp181s0
|
||||||
|
7: enp181s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
|
||||||
|
link/ether 00:ae:cd:00:07:68 brd ff:ff:ff:ff:ff:ff
|
||||||
|
RX: bytes packets errors dropped overrun mcast
|
||||||
|
414 5 0 0 0 0
|
||||||
|
TX: bytes packets errors dropped carrier collsns
|
||||||
|
1384 18 0 0 0 0
|
||||||
|
|
||||||
|
ethtool -S
|
||||||
|
----------
|
||||||
|
|
||||||
|
The statistics shown from the ``ethtool -S`` command includes a combination of
|
||||||
|
driver counters and firmware counters, including port and queue specific values.
|
||||||
|
The driver values are counters computed by the driver, and the firmware values
|
||||||
|
are gathered by the firmware from the port hardware and passed through the
|
||||||
|
driver with no further interpretation.
|
||||||
|
|
||||||
|
Driver port specific::
|
||||||
|
|
||||||
|
tx_packets: 12
|
||||||
|
tx_bytes: 964
|
||||||
|
rx_packets: 5
|
||||||
|
rx_bytes: 414
|
||||||
|
tx_tso: 0
|
||||||
|
tx_tso_bytes: 0
|
||||||
|
tx_csum_none: 12
|
||||||
|
tx_csum: 0
|
||||||
|
rx_csum_none: 0
|
||||||
|
rx_csum_complete: 3
|
||||||
|
rx_csum_error: 0
|
||||||
|
|
||||||
|
Driver queue specific::
|
||||||
|
|
||||||
|
tx_0_pkts: 3
|
||||||
|
tx_0_bytes: 294
|
||||||
|
tx_0_clean: 3
|
||||||
|
tx_0_dma_map_err: 0
|
||||||
|
tx_0_linearize: 0
|
||||||
|
tx_0_frags: 0
|
||||||
|
tx_0_tso: 0
|
||||||
|
tx_0_tso_bytes: 0
|
||||||
|
tx_0_csum_none: 3
|
||||||
|
tx_0_csum: 0
|
||||||
|
tx_0_vlan_inserted: 0
|
||||||
|
rx_0_pkts: 2
|
||||||
|
rx_0_bytes: 120
|
||||||
|
rx_0_dma_map_err: 0
|
||||||
|
rx_0_alloc_err: 0
|
||||||
|
rx_0_csum_none: 0
|
||||||
|
rx_0_csum_complete: 0
|
||||||
|
rx_0_csum_error: 0
|
||||||
|
rx_0_dropped: 0
|
||||||
|
rx_0_vlan_stripped: 0
|
||||||
|
|
||||||
|
Firmware port specific::
|
||||||
|
|
||||||
|
hw_tx_dropped: 0
|
||||||
|
hw_rx_dropped: 0
|
||||||
|
hw_rx_over_errors: 0
|
||||||
|
hw_rx_missed_errors: 0
|
||||||
|
hw_tx_aborted_errors: 0
|
||||||
|
frames_rx_ok: 15
|
||||||
|
frames_rx_all: 15
|
||||||
|
frames_rx_bad_fcs: 0
|
||||||
|
frames_rx_bad_all: 0
|
||||||
|
octets_rx_ok: 1290
|
||||||
|
octets_rx_all: 1290
|
||||||
|
frames_rx_unicast: 10
|
||||||
|
frames_rx_multicast: 5
|
||||||
|
frames_rx_broadcast: 0
|
||||||
|
frames_rx_pause: 0
|
||||||
|
frames_rx_bad_length: 0
|
||||||
|
frames_rx_undersized: 0
|
||||||
|
frames_rx_oversized: 0
|
||||||
|
frames_rx_fragments: 0
|
||||||
|
frames_rx_jabber: 0
|
||||||
|
frames_rx_pripause: 0
|
||||||
|
frames_rx_stomped_crc: 0
|
||||||
|
frames_rx_too_long: 0
|
||||||
|
frames_rx_vlan_good: 3
|
||||||
|
frames_rx_dropped: 0
|
||||||
|
frames_rx_less_than_64b: 0
|
||||||
|
frames_rx_64b: 4
|
||||||
|
frames_rx_65b_127b: 11
|
||||||
|
frames_rx_128b_255b: 0
|
||||||
|
frames_rx_256b_511b: 0
|
||||||
|
frames_rx_512b_1023b: 0
|
||||||
|
frames_rx_1024b_1518b: 0
|
||||||
|
frames_rx_1519b_2047b: 0
|
||||||
|
frames_rx_2048b_4095b: 0
|
||||||
|
frames_rx_4096b_8191b: 0
|
||||||
|
frames_rx_8192b_9215b: 0
|
||||||
|
frames_rx_other: 0
|
||||||
|
frames_tx_ok: 31
|
||||||
|
frames_tx_all: 31
|
||||||
|
frames_tx_bad: 0
|
||||||
|
octets_tx_ok: 2614
|
||||||
|
octets_tx_total: 2614
|
||||||
|
frames_tx_unicast: 8
|
||||||
|
frames_tx_multicast: 21
|
||||||
|
frames_tx_broadcast: 2
|
||||||
|
frames_tx_pause: 0
|
||||||
|
frames_tx_pripause: 0
|
||||||
|
frames_tx_vlan: 0
|
||||||
|
frames_tx_less_than_64b: 0
|
||||||
|
frames_tx_64b: 4
|
||||||
|
frames_tx_65b_127b: 27
|
||||||
|
frames_tx_128b_255b: 0
|
||||||
|
frames_tx_256b_511b: 0
|
||||||
|
frames_tx_512b_1023b: 0
|
||||||
|
frames_tx_1024b_1518b: 0
|
||||||
|
frames_tx_1519b_2047b: 0
|
||||||
|
frames_tx_2048b_4095b: 0
|
||||||
|
frames_tx_4096b_8191b: 0
|
||||||
|
frames_tx_8192b_9215b: 0
|
||||||
|
frames_tx_other: 0
|
||||||
|
frames_tx_pri_0: 0
|
||||||
|
frames_tx_pri_1: 0
|
||||||
|
frames_tx_pri_2: 0
|
||||||
|
frames_tx_pri_3: 0
|
||||||
|
frames_tx_pri_4: 0
|
||||||
|
frames_tx_pri_5: 0
|
||||||
|
frames_tx_pri_6: 0
|
||||||
|
frames_tx_pri_7: 0
|
||||||
|
frames_rx_pri_0: 0
|
||||||
|
frames_rx_pri_1: 0
|
||||||
|
frames_rx_pri_2: 0
|
||||||
|
frames_rx_pri_3: 0
|
||||||
|
frames_rx_pri_4: 0
|
||||||
|
frames_rx_pri_5: 0
|
||||||
|
frames_rx_pri_6: 0
|
||||||
|
frames_rx_pri_7: 0
|
||||||
|
tx_pripause_0_1us_count: 0
|
||||||
|
tx_pripause_1_1us_count: 0
|
||||||
|
tx_pripause_2_1us_count: 0
|
||||||
|
tx_pripause_3_1us_count: 0
|
||||||
|
tx_pripause_4_1us_count: 0
|
||||||
|
tx_pripause_5_1us_count: 0
|
||||||
|
tx_pripause_6_1us_count: 0
|
||||||
|
tx_pripause_7_1us_count: 0
|
||||||
|
rx_pripause_0_1us_count: 0
|
||||||
|
rx_pripause_1_1us_count: 0
|
||||||
|
rx_pripause_2_1us_count: 0
|
||||||
|
rx_pripause_3_1us_count: 0
|
||||||
|
rx_pripause_4_1us_count: 0
|
||||||
|
rx_pripause_5_1us_count: 0
|
||||||
|
rx_pripause_6_1us_count: 0
|
||||||
|
rx_pripause_7_1us_count: 0
|
||||||
|
rx_pause_1us_count: 0
|
||||||
|
frames_tx_truncated: 0
|
||||||
|
|
||||||
|
|
||||||
Support
|
Support
|
||||||
=======
|
=======
|
||||||
|
|
||||||
For general Linux networking support, please use the netdev mailing
|
For general Linux networking support, please use the netdev mailing
|
||||||
list, which is monitored by Pensando personnel::
|
list, which is monitored by Pensando personnel::
|
||||||
|
|
||||||
|
@@ -1,4 +1,11 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
============
|
||||||
|
Rmnet Driver
|
||||||
|
============
|
||||||
|
|
||||||
1. Introduction
|
1. Introduction
|
||||||
|
===============
|
||||||
|
|
||||||
rmnet driver is used for supporting the Multiplexing and aggregation
|
rmnet driver is used for supporting the Multiplexing and aggregation
|
||||||
Protocol (MAP). This protocol is used by all recent chipsets using Qualcomm
|
Protocol (MAP). This protocol is used by all recent chipsets using Qualcomm
|
||||||
@@ -18,17 +25,18 @@ sending aggregated bunch of MAP frames. rmnet driver will de-aggregate
|
|||||||
these MAP frames and send them to appropriate PDN's.
|
these MAP frames and send them to appropriate PDN's.
|
||||||
|
|
||||||
2. Packet format
|
2. Packet format
|
||||||
|
================
|
||||||
|
|
||||||
a. MAP packet (data / control)
|
a. MAP packet (data / control)
|
||||||
|
|
||||||
MAP header has the same endianness of the IP packet.
|
MAP header has the same endianness of the IP packet.
|
||||||
|
|
||||||
Packet format -
|
Packet format::
|
||||||
|
|
||||||
Bit 0 1 2-7 8 - 15 16 - 31
|
Bit 0 1 2-7 8 - 15 16 - 31
|
||||||
Function Command / Data Reserved Pad Multiplexer ID Payload length
|
Function Command / Data Reserved Pad Multiplexer ID Payload length
|
||||||
Bit 32 - x
|
Bit 32 - x
|
||||||
Function Raw Bytes
|
Function Raw Bytes
|
||||||
|
|
||||||
Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command
|
Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command
|
||||||
or data packet. Control packet is used for transport level flow control. Data
|
or data packet. Control packet is used for transport level flow control. Data
|
||||||
@@ -44,24 +52,27 @@ Multiplexer ID is to indicate the PDN on which data has to be sent.
|
|||||||
Payload length includes the padding length but does not include MAP header
|
Payload length includes the padding length but does not include MAP header
|
||||||
length.
|
length.
|
||||||
|
|
||||||
b. MAP packet (command specific)
|
b. MAP packet (command specific)::
|
||||||
|
|
||||||
Bit 0 1 2-7 8 - 15 16 - 31
|
Bit 0 1 2-7 8 - 15 16 - 31
|
||||||
Function Command Reserved Pad Multiplexer ID Payload length
|
Function Command Reserved Pad Multiplexer ID Payload length
|
||||||
Bit 32 - 39 40 - 45 46 - 47 48 - 63
|
Bit 32 - 39 40 - 45 46 - 47 48 - 63
|
||||||
Function Command name Reserved Command Type Reserved
|
Function Command name Reserved Command Type Reserved
|
||||||
Bit 64 - 95
|
Bit 64 - 95
|
||||||
Function Transaction ID
|
Function Transaction ID
|
||||||
Bit 96 - 127
|
Bit 96 - 127
|
||||||
Function Command data
|
Function Command data
|
||||||
|
|
||||||
Command 1 indicates disabling flow while 2 is enabling flow
|
Command 1 indicates disabling flow while 2 is enabling flow
|
||||||
|
|
||||||
Command types -
|
Command types
|
||||||
|
|
||||||
|
= ==========================================
|
||||||
0 for MAP command request
|
0 for MAP command request
|
||||||
1 is to acknowledge the receipt of a command
|
1 is to acknowledge the receipt of a command
|
||||||
2 is for unsupported commands
|
2 is for unsupported commands
|
||||||
3 is for error during processing of commands
|
3 is for error during processing of commands
|
||||||
|
= ==========================================
|
||||||
|
|
||||||
c. Aggregation
|
c. Aggregation
|
||||||
|
|
||||||
@@ -71,9 +82,11 @@ packets and either ACK the MAP command or deliver the IP packet to the
|
|||||||
network stack as needed
|
network stack as needed
|
||||||
|
|
||||||
MAP header|IP Packet|Optional padding|MAP header|IP Packet|Optional padding....
|
MAP header|IP Packet|Optional padding|MAP header|IP Packet|Optional padding....
|
||||||
|
|
||||||
MAP header|IP Packet|Optional padding|MAP header|Command Packet|Optional pad...
|
MAP header|IP Packet|Optional padding|MAP header|Command Packet|Optional pad...
|
||||||
|
|
||||||
3. Userspace configuration
|
3. Userspace configuration
|
||||||
|
==========================
|
||||||
|
|
||||||
rmnet userspace configuration is done through netlink library librmnetctl
|
rmnet userspace configuration is done through netlink library librmnetctl
|
||||||
and command line utility rmnetcli. Utility is hosted in codeaurora forum git.
|
and command line utility rmnetcli. Utility is hosted in codeaurora forum git.
|
222
Documentation/networking/device_drivers/sb1000.rst
Normal file
222
Documentation/networking/device_drivers/sb1000.rst
Normal file
@@ -0,0 +1,222 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
===================
|
||||||
|
SB100 device driver
|
||||||
|
===================
|
||||||
|
|
||||||
|
sb1000 is a module network device driver for the General Instrument (also known
|
||||||
|
as NextLevel) SURFboard1000 internal cable modem board. This is an ISA card
|
||||||
|
which is used by a number of cable TV companies to provide cable modem access.
|
||||||
|
It's a one-way downstream-only cable modem, meaning that your upstream net link
|
||||||
|
is provided by your regular phone modem.
|
||||||
|
|
||||||
|
This driver was written by Franco Venturi <fventuri@mediaone.net>. He deserves
|
||||||
|
a great deal of thanks for this wonderful piece of code!
|
||||||
|
|
||||||
|
Needed tools
|
||||||
|
============
|
||||||
|
|
||||||
|
Support for this device is now a part of the standard Linux kernel. The
|
||||||
|
driver source code file is drivers/net/sb1000.c. In addition to this
|
||||||
|
you will need:
|
||||||
|
|
||||||
|
1. The "cmconfig" program. This is a utility which supplements "ifconfig"
|
||||||
|
to configure the cable modem and network interface (usually called "cm0");
|
||||||
|
|
||||||
|
2. Several PPP scripts which live in /etc/ppp to make connecting via your
|
||||||
|
cable modem easy.
|
||||||
|
|
||||||
|
These utilities can be obtained from:
|
||||||
|
|
||||||
|
http://www.jacksonville.net/~fventuri/
|
||||||
|
|
||||||
|
in Franco's original source code distribution .tar.gz file. Support for
|
||||||
|
the sb1000 driver can be found at:
|
||||||
|
|
||||||
|
- http://web.archive.org/web/%2E/http://home.adelphia.net/~siglercm/sb1000.html
|
||||||
|
- http://web.archive.org/web/%2E/http://linuxpower.cx/~cable/
|
||||||
|
|
||||||
|
along with these utilities.
|
||||||
|
|
||||||
|
3. The standard isapnp tools. These are necessary to configure your SB1000
|
||||||
|
card at boot time (or afterwards by hand) since it's a PnP card.
|
||||||
|
|
||||||
|
If you don't have these installed as a standard part of your Linux
|
||||||
|
distribution, you can find them at:
|
||||||
|
|
||||||
|
http://www.roestock.demon.co.uk/isapnptools/
|
||||||
|
|
||||||
|
or check your Linux distribution binary CD or their web site. For help with
|
||||||
|
isapnp, pnpdump, or /etc/isapnp.conf, go to:
|
||||||
|
|
||||||
|
http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html
|
||||||
|
|
||||||
|
Using the driver
|
||||||
|
================
|
||||||
|
|
||||||
|
To make the SB1000 card work, follow these steps:
|
||||||
|
|
||||||
|
1. Run ``make config``, or ``make menuconfig``, or ``make xconfig``, whichever
|
||||||
|
you prefer, in the top kernel tree directory to set up your kernel
|
||||||
|
configuration. Make sure to say "Y" to "Prompt for development drivers"
|
||||||
|
and to say "M" to the sb1000 driver. Also say "Y" or "M" to all the standard
|
||||||
|
networking questions to get TCP/IP and PPP networking support.
|
||||||
|
|
||||||
|
2. **BEFORE** you build the kernel, edit drivers/net/sb1000.c. Make sure
|
||||||
|
to redefine the value of READ_DATA_PORT to match the I/O address used
|
||||||
|
by isapnp to access your PnP cards. This is the value of READPORT in
|
||||||
|
/etc/isapnp.conf or given by the output of pnpdump.
|
||||||
|
|
||||||
|
3. Build and install the kernel and modules as usual.
|
||||||
|
|
||||||
|
4. Boot your new kernel following the usual procedures.
|
||||||
|
|
||||||
|
5. Set up to configure the new SB1000 PnP card by capturing the output
|
||||||
|
of "pnpdump" to a file and editing this file to set the correct I/O ports,
|
||||||
|
IRQ, and DMA settings for all your PnP cards. Make sure none of the settings
|
||||||
|
conflict with one another. Then test this configuration by running the
|
||||||
|
"isapnp" command with your new config file as the input. Check for
|
||||||
|
errors and fix as necessary. (As an aside, I use I/O ports 0x110 and
|
||||||
|
0x310 and IRQ 11 for my SB1000 card and these work well for me. YMMV.)
|
||||||
|
Then save the finished config file as /etc/isapnp.conf for proper
|
||||||
|
configuration on subsequent reboots.
|
||||||
|
|
||||||
|
6. Download the original file sb1000-1.1.2.tar.gz from Franco's site or one of
|
||||||
|
the others referenced above. As root, unpack it into a temporary directory
|
||||||
|
and do a ``make cmconfig`` and then ``install -c cmconfig /usr/local/sbin``.
|
||||||
|
Don't do ``make install`` because it expects to find all the utilities built
|
||||||
|
and ready for installation, not just cmconfig.
|
||||||
|
|
||||||
|
7. As root, copy all the files under the ppp/ subdirectory in Franco's
|
||||||
|
tar file into /etc/ppp, being careful not to overwrite any files that are
|
||||||
|
already in there. Then modify ppp@gi-on to set the correct login name,
|
||||||
|
phone number, and frequency for the cable modem. Also edit pap-secrets
|
||||||
|
to specify your login name and password and any site-specific information
|
||||||
|
you need.
|
||||||
|
|
||||||
|
8. Be sure to modify /etc/ppp/firewall to use ipchains instead of
|
||||||
|
the older ipfwadm commands from the 2.0.x kernels. There's a neat utility to
|
||||||
|
convert ipfwadm commands to ipchains commands:
|
||||||
|
|
||||||
|
http://users.dhp.com/~whisper/ipfwadm2ipchains/
|
||||||
|
|
||||||
|
You may also wish to modify the firewall script to implement a different
|
||||||
|
firewalling scheme.
|
||||||
|
|
||||||
|
9. Start the PPP connection via the script /etc/ppp/ppp@gi-on. You must be
|
||||||
|
root to do this. It's better to use a utility like sudo to execute
|
||||||
|
frequently used commands like this with root permissions if possible. If you
|
||||||
|
connect successfully the cable modem interface will come up and you'll see a
|
||||||
|
driver message like this at the console::
|
||||||
|
|
||||||
|
cm0: sb1000 at (0x110,0x310), csn 1, S/N 0x2a0d16d8, IRQ 11.
|
||||||
|
sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)
|
||||||
|
|
||||||
|
The "ifconfig" command should show two new interfaces, ppp0 and cm0.
|
||||||
|
|
||||||
|
The command "cmconfig cm0" will give you information about the cable modem
|
||||||
|
interface.
|
||||||
|
|
||||||
|
10. Try pinging a site via ``ping -c 5 www.yahoo.com``, for example. You should
|
||||||
|
see packets received.
|
||||||
|
|
||||||
|
11. If you can't get site names (like www.yahoo.com) to resolve into
|
||||||
|
IP addresses (like 204.71.200.67), be sure your /etc/resolv.conf file
|
||||||
|
has no syntax errors and has the right nameserver IP addresses in it.
|
||||||
|
If this doesn't help, try something like ``ping -c 5 204.71.200.67`` to
|
||||||
|
see if the networking is running but the DNS resolution is where the
|
||||||
|
problem lies.
|
||||||
|
|
||||||
|
12. If you still have problems, go to the support web sites mentioned above
|
||||||
|
and read the information and documentation there.
|
||||||
|
|
||||||
|
Common problems
|
||||||
|
===============
|
||||||
|
|
||||||
|
1. Packets go out on the ppp0 interface but don't come back on the cm0
|
||||||
|
interface. It looks like I'm connected but I can't even ping any
|
||||||
|
numerical IP addresses. (This happens predominantly on Debian systems due
|
||||||
|
to a default boot-time configuration script.)
|
||||||
|
|
||||||
|
Solution
|
||||||
|
As root ``echo 0 > /proc/sys/net/ipv4/conf/cm0/rp_filter`` so it
|
||||||
|
can share the same IP address as the ppp0 interface. Note that this
|
||||||
|
command should probably be added to the /etc/ppp/cablemodem script
|
||||||
|
*right*between* the "/sbin/ifconfig" and "/sbin/cmconfig" commands.
|
||||||
|
You may need to do this to /proc/sys/net/ipv4/conf/ppp0/rp_filter as well.
|
||||||
|
If you do this to /proc/sys/net/ipv4/conf/default/rp_filter on each reboot
|
||||||
|
(in rc.local or some such) then any interfaces can share the same IP
|
||||||
|
addresses.
|
||||||
|
|
||||||
|
2. I get "unresolved symbol" error messages on executing ``insmod sb1000.o``.
|
||||||
|
|
||||||
|
Solution
|
||||||
|
You probably have a non-matching kernel source tree and
|
||||||
|
/usr/include/linux and /usr/include/asm header files. Make sure you
|
||||||
|
install the correct versions of the header files in these two directories.
|
||||||
|
Then rebuild and reinstall the kernel.
|
||||||
|
|
||||||
|
3. When isapnp runs it reports an error, and my SB1000 card isn't working.
|
||||||
|
|
||||||
|
Solution
|
||||||
|
There's a problem with later versions of isapnp using the "(CHECK)"
|
||||||
|
option in the lines that allocate the two I/O addresses for the SB1000 card.
|
||||||
|
This first popped up on RH 6.0. Delete "(CHECK)" for the SB1000 I/O addresses.
|
||||||
|
Make sure they don't conflict with any other pieces of hardware first! Then
|
||||||
|
rerun isapnp and go from there.
|
||||||
|
|
||||||
|
4. I can't execute the /etc/ppp/ppp@gi-on file.
|
||||||
|
|
||||||
|
Solution
|
||||||
|
As root do ``chmod ug+x /etc/ppp/ppp@gi-on``.
|
||||||
|
|
||||||
|
5. The firewall script isn't working (with 2.2.x and higher kernels).
|
||||||
|
|
||||||
|
Solution
|
||||||
|
Use the ipfwadm2ipchains script referenced above to convert the
|
||||||
|
/etc/ppp/firewall script from the deprecated ipfwadm commands to ipchains.
|
||||||
|
|
||||||
|
6. I'm getting *tons* of firewall deny messages in the /var/kern.log,
|
||||||
|
/var/messages, and/or /var/syslog files, and they're filling up my /var
|
||||||
|
partition!!!
|
||||||
|
|
||||||
|
Solution
|
||||||
|
First, tell your ISP that you're receiving DoS (Denial of Service)
|
||||||
|
and/or portscanning (UDP connection attempts) attacks! Look over the deny
|
||||||
|
messages to figure out what the attack is and where it's coming from. Next,
|
||||||
|
edit /etc/ppp/cablemodem and make sure the ",nobroadcast" option is turned on
|
||||||
|
to the "cmconfig" command (uncomment that line). If you're not receiving these
|
||||||
|
denied packets on your broadcast interface (IP address xxx.yyy.zzz.255
|
||||||
|
typically), then someone is attacking your machine in particular. Be careful
|
||||||
|
out there....
|
||||||
|
|
||||||
|
7. Everything seems to work fine but my computer locks up after a while
|
||||||
|
(and typically during a lengthy download through the cable modem)!
|
||||||
|
|
||||||
|
Solution
|
||||||
|
You may need to add a short delay in the driver to 'slow down' the
|
||||||
|
SURFboard because your PC might not be able to keep up with the transfer rate
|
||||||
|
of the SB1000. To do this, it's probably best to download Franco's
|
||||||
|
sb1000-1.1.2.tar.gz archive and build and install sb1000.o manually. You'll
|
||||||
|
want to edit the 'Makefile' and look for the 'SB1000_DELAY'
|
||||||
|
define. Uncomment those 'CFLAGS' lines (and comment out the default ones)
|
||||||
|
and try setting the delay to something like 60 microseconds with:
|
||||||
|
'-DSB1000_DELAY=60'. Then do ``make`` and as root ``make install`` and try
|
||||||
|
it out. If it still doesn't work or you like playing with the driver, you may
|
||||||
|
try other numbers. Remember though that the higher the delay, the slower the
|
||||||
|
driver (which slows down the rest of the PC too when it is actively
|
||||||
|
used). Thanks to Ed Daiga for this tip!
|
||||||
|
|
||||||
|
Credits
|
||||||
|
=======
|
||||||
|
|
||||||
|
This README came from Franco Venturi's original README file which is
|
||||||
|
still supplied with his driver .tar.gz archive. I and all other sb1000 users
|
||||||
|
owe Franco a tremendous "Thank you!" Additional thanks goes to Carl Patten
|
||||||
|
and Ralph Bonnell who are now managing the Linux SB1000 web site, and to
|
||||||
|
the SB1000 users who reported and helped debug the common problems listed
|
||||||
|
above.
|
||||||
|
|
||||||
|
|
||||||
|
Clemmitt Sigler
|
||||||
|
csigler@vt.edu
|
@@ -1,207 +0,0 @@
|
|||||||
sb1000 is a module network device driver for the General Instrument (also known
|
|
||||||
as NextLevel) SURFboard1000 internal cable modem board. This is an ISA card
|
|
||||||
which is used by a number of cable TV companies to provide cable modem access.
|
|
||||||
It's a one-way downstream-only cable modem, meaning that your upstream net link
|
|
||||||
is provided by your regular phone modem.
|
|
||||||
|
|
||||||
This driver was written by Franco Venturi <fventuri@mediaone.net>. He deserves
|
|
||||||
a great deal of thanks for this wonderful piece of code!
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Support for this device is now a part of the standard Linux kernel. The
|
|
||||||
driver source code file is drivers/net/sb1000.c. In addition to this
|
|
||||||
you will need:
|
|
||||||
|
|
||||||
1.) The "cmconfig" program. This is a utility which supplements "ifconfig"
|
|
||||||
to configure the cable modem and network interface (usually called "cm0");
|
|
||||||
and
|
|
||||||
|
|
||||||
2.) Several PPP scripts which live in /etc/ppp to make connecting via your
|
|
||||||
cable modem easy.
|
|
||||||
|
|
||||||
These utilities can be obtained from:
|
|
||||||
|
|
||||||
http://www.jacksonville.net/~fventuri/
|
|
||||||
|
|
||||||
in Franco's original source code distribution .tar.gz file. Support for
|
|
||||||
the sb1000 driver can be found at:
|
|
||||||
|
|
||||||
http://web.archive.org/web/*/http://home.adelphia.net/~siglercm/sb1000.html
|
|
||||||
http://web.archive.org/web/*/http://linuxpower.cx/~cable/
|
|
||||||
|
|
||||||
along with these utilities.
|
|
||||||
|
|
||||||
3.) The standard isapnp tools. These are necessary to configure your SB1000
|
|
||||||
card at boot time (or afterwards by hand) since it's a PnP card.
|
|
||||||
|
|
||||||
If you don't have these installed as a standard part of your Linux
|
|
||||||
distribution, you can find them at:
|
|
||||||
|
|
||||||
http://www.roestock.demon.co.uk/isapnptools/
|
|
||||||
|
|
||||||
or check your Linux distribution binary CD or their web site. For help with
|
|
||||||
isapnp, pnpdump, or /etc/isapnp.conf, go to:
|
|
||||||
|
|
||||||
http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
To make the SB1000 card work, follow these steps:
|
|
||||||
|
|
||||||
1.) Run `make config', or `make menuconfig', or `make xconfig', whichever
|
|
||||||
you prefer, in the top kernel tree directory to set up your kernel
|
|
||||||
configuration. Make sure to say "Y" to "Prompt for development drivers"
|
|
||||||
and to say "M" to the sb1000 driver. Also say "Y" or "M" to all the standard
|
|
||||||
networking questions to get TCP/IP and PPP networking support.
|
|
||||||
|
|
||||||
2.) *BEFORE* you build the kernel, edit drivers/net/sb1000.c. Make sure
|
|
||||||
to redefine the value of READ_DATA_PORT to match the I/O address used
|
|
||||||
by isapnp to access your PnP cards. This is the value of READPORT in
|
|
||||||
/etc/isapnp.conf or given by the output of pnpdump.
|
|
||||||
|
|
||||||
3.) Build and install the kernel and modules as usual.
|
|
||||||
|
|
||||||
4.) Boot your new kernel following the usual procedures.
|
|
||||||
|
|
||||||
5.) Set up to configure the new SB1000 PnP card by capturing the output
|
|
||||||
of "pnpdump" to a file and editing this file to set the correct I/O ports,
|
|
||||||
IRQ, and DMA settings for all your PnP cards. Make sure none of the settings
|
|
||||||
conflict with one another. Then test this configuration by running the
|
|
||||||
"isapnp" command with your new config file as the input. Check for
|
|
||||||
errors and fix as necessary. (As an aside, I use I/O ports 0x110 and
|
|
||||||
0x310 and IRQ 11 for my SB1000 card and these work well for me. YMMV.)
|
|
||||||
Then save the finished config file as /etc/isapnp.conf for proper configuration
|
|
||||||
on subsequent reboots.
|
|
||||||
|
|
||||||
6.) Download the original file sb1000-1.1.2.tar.gz from Franco's site or one of
|
|
||||||
the others referenced above. As root, unpack it into a temporary directory and
|
|
||||||
do a `make cmconfig' and then `install -c cmconfig /usr/local/sbin'. Don't do
|
|
||||||
`make install' because it expects to find all the utilities built and ready for
|
|
||||||
installation, not just cmconfig.
|
|
||||||
|
|
||||||
7.) As root, copy all the files under the ppp/ subdirectory in Franco's
|
|
||||||
tar file into /etc/ppp, being careful not to overwrite any files that are
|
|
||||||
already in there. Then modify ppp@gi-on to set the correct login name,
|
|
||||||
phone number, and frequency for the cable modem. Also edit pap-secrets
|
|
||||||
to specify your login name and password and any site-specific information
|
|
||||||
you need.
|
|
||||||
|
|
||||||
8.) Be sure to modify /etc/ppp/firewall to use ipchains instead of
|
|
||||||
the older ipfwadm commands from the 2.0.x kernels. There's a neat utility to
|
|
||||||
convert ipfwadm commands to ipchains commands:
|
|
||||||
|
|
||||||
http://users.dhp.com/~whisper/ipfwadm2ipchains/
|
|
||||||
|
|
||||||
You may also wish to modify the firewall script to implement a different
|
|
||||||
firewalling scheme.
|
|
||||||
|
|
||||||
9.) Start the PPP connection via the script /etc/ppp/ppp@gi-on. You must be
|
|
||||||
root to do this. It's better to use a utility like sudo to execute
|
|
||||||
frequently used commands like this with root permissions if possible. If you
|
|
||||||
connect successfully the cable modem interface will come up and you'll see a
|
|
||||||
driver message like this at the console:
|
|
||||||
|
|
||||||
cm0: sb1000 at (0x110,0x310), csn 1, S/N 0x2a0d16d8, IRQ 11.
|
|
||||||
sb1000.c:v1.1.2 6/01/98 (fventuri@mediaone.net)
|
|
||||||
|
|
||||||
The "ifconfig" command should show two new interfaces, ppp0 and cm0.
|
|
||||||
The command "cmconfig cm0" will give you information about the cable modem
|
|
||||||
interface.
|
|
||||||
|
|
||||||
10.) Try pinging a site via `ping -c 5 www.yahoo.com', for example. You should
|
|
||||||
see packets received.
|
|
||||||
|
|
||||||
11.) If you can't get site names (like www.yahoo.com) to resolve into
|
|
||||||
IP addresses (like 204.71.200.67), be sure your /etc/resolv.conf file
|
|
||||||
has no syntax errors and has the right nameserver IP addresses in it.
|
|
||||||
If this doesn't help, try something like `ping -c 5 204.71.200.67' to
|
|
||||||
see if the networking is running but the DNS resolution is where the
|
|
||||||
problem lies.
|
|
||||||
|
|
||||||
12.) If you still have problems, go to the support web sites mentioned above
|
|
||||||
and read the information and documentation there.
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Common problems:
|
|
||||||
|
|
||||||
1.) Packets go out on the ppp0 interface but don't come back on the cm0
|
|
||||||
interface. It looks like I'm connected but I can't even ping any
|
|
||||||
numerical IP addresses. (This happens predominantly on Debian systems due
|
|
||||||
to a default boot-time configuration script.)
|
|
||||||
|
|
||||||
Solution -- As root `echo 0 > /proc/sys/net/ipv4/conf/cm0/rp_filter' so it
|
|
||||||
can share the same IP address as the ppp0 interface. Note that this
|
|
||||||
command should probably be added to the /etc/ppp/cablemodem script
|
|
||||||
*right*between* the "/sbin/ifconfig" and "/sbin/cmconfig" commands.
|
|
||||||
You may need to do this to /proc/sys/net/ipv4/conf/ppp0/rp_filter as well.
|
|
||||||
If you do this to /proc/sys/net/ipv4/conf/default/rp_filter on each reboot
|
|
||||||
(in rc.local or some such) then any interfaces can share the same IP
|
|
||||||
addresses.
|
|
||||||
|
|
||||||
2.) I get "unresolved symbol" error messages on executing `insmod sb1000.o'.
|
|
||||||
|
|
||||||
Solution -- You probably have a non-matching kernel source tree and
|
|
||||||
/usr/include/linux and /usr/include/asm header files. Make sure you
|
|
||||||
install the correct versions of the header files in these two directories.
|
|
||||||
Then rebuild and reinstall the kernel.
|
|
||||||
|
|
||||||
3.) When isapnp runs it reports an error, and my SB1000 card isn't working.
|
|
||||||
|
|
||||||
Solution -- There's a problem with later versions of isapnp using the "(CHECK)"
|
|
||||||
option in the lines that allocate the two I/O addresses for the SB1000 card.
|
|
||||||
This first popped up on RH 6.0. Delete "(CHECK)" for the SB1000 I/O addresses.
|
|
||||||
Make sure they don't conflict with any other pieces of hardware first! Then
|
|
||||||
rerun isapnp and go from there.
|
|
||||||
|
|
||||||
4.) I can't execute the /etc/ppp/ppp@gi-on file.
|
|
||||||
|
|
||||||
Solution -- As root do `chmod ug+x /etc/ppp/ppp@gi-on'.
|
|
||||||
|
|
||||||
5.) The firewall script isn't working (with 2.2.x and higher kernels).
|
|
||||||
|
|
||||||
Solution -- Use the ipfwadm2ipchains script referenced above to convert the
|
|
||||||
/etc/ppp/firewall script from the deprecated ipfwadm commands to ipchains.
|
|
||||||
|
|
||||||
6.) I'm getting *tons* of firewall deny messages in the /var/kern.log,
|
|
||||||
/var/messages, and/or /var/syslog files, and they're filling up my /var
|
|
||||||
partition!!!
|
|
||||||
|
|
||||||
Solution -- First, tell your ISP that you're receiving DoS (Denial of Service)
|
|
||||||
and/or portscanning (UDP connection attempts) attacks! Look over the deny
|
|
||||||
messages to figure out what the attack is and where it's coming from. Next,
|
|
||||||
edit /etc/ppp/cablemodem and make sure the ",nobroadcast" option is turned on
|
|
||||||
to the "cmconfig" command (uncomment that line). If you're not receiving these
|
|
||||||
denied packets on your broadcast interface (IP address xxx.yyy.zzz.255
|
|
||||||
typically), then someone is attacking your machine in particular. Be careful
|
|
||||||
out there....
|
|
||||||
|
|
||||||
7.) Everything seems to work fine but my computer locks up after a while
|
|
||||||
(and typically during a lengthy download through the cable modem)!
|
|
||||||
|
|
||||||
Solution -- You may need to add a short delay in the driver to 'slow down' the
|
|
||||||
SURFboard because your PC might not be able to keep up with the transfer rate
|
|
||||||
of the SB1000. To do this, it's probably best to download Franco's
|
|
||||||
sb1000-1.1.2.tar.gz archive and build and install sb1000.o manually. You'll
|
|
||||||
want to edit the 'Makefile' and look for the 'SB1000_DELAY'
|
|
||||||
define. Uncomment those 'CFLAGS' lines (and comment out the default ones)
|
|
||||||
and try setting the delay to something like 60 microseconds with:
|
|
||||||
'-DSB1000_DELAY=60'. Then do `make' and as root `make install' and try
|
|
||||||
it out. If it still doesn't work or you like playing with the driver, you may
|
|
||||||
try other numbers. Remember though that the higher the delay, the slower the
|
|
||||||
driver (which slows down the rest of the PC too when it is actively
|
|
||||||
used). Thanks to Ed Daiga for this tip!
|
|
||||||
|
|
||||||
-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
Credits: This README came from Franco Venturi's original README file which is
|
|
||||||
still supplied with his driver .tar.gz archive. I and all other sb1000 users
|
|
||||||
owe Franco a tremendous "Thank you!" Additional thanks goes to Carl Patten
|
|
||||||
and Ralph Bonnell who are now managing the Linux SB1000 web site, and to
|
|
||||||
the SB1000 users who reported and helped debug the common problems listed
|
|
||||||
above.
|
|
||||||
|
|
||||||
|
|
||||||
Clemmitt Sigler
|
|
||||||
csigler@vt.edu
|
|
48
Documentation/networking/device_drivers/smsc/smc9.rst
Normal file
48
Documentation/networking/device_drivers/smsc/smc9.rst
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
================
|
||||||
|
SMC 9xxxx Driver
|
||||||
|
================
|
||||||
|
|
||||||
|
Revision 0.12
|
||||||
|
|
||||||
|
3/5/96
|
||||||
|
|
||||||
|
Copyright 1996 Erik Stahlman
|
||||||
|
|
||||||
|
Released under terms of the GNU General Public License.
|
||||||
|
|
||||||
|
This file contains the instructions and caveats for my SMC9xxx driver. You
|
||||||
|
should not be using the driver without reading this file.
|
||||||
|
|
||||||
|
Things to note about installation:
|
||||||
|
|
||||||
|
1. The driver should work on all kernels from 1.2.13 until 1.3.71.
|
||||||
|
(A kernel patch is supplied for 1.3.71 )
|
||||||
|
|
||||||
|
2. If you include this into the kernel, you might need to change some
|
||||||
|
options, such as for forcing IRQ.
|
||||||
|
|
||||||
|
|
||||||
|
3. To compile as a module, run 'make'.
|
||||||
|
Make will give you the appropriate options for various kernel support.
|
||||||
|
|
||||||
|
4. Loading the driver as a module::
|
||||||
|
|
||||||
|
use: insmod smc9194.o
|
||||||
|
optional parameters:
|
||||||
|
io=xxxx : your base address
|
||||||
|
irq=xx : your irq
|
||||||
|
ifport=x : 0 for whatever is default
|
||||||
|
1 for twisted pair
|
||||||
|
2 for AUI ( or BNC on some cards )
|
||||||
|
|
||||||
|
How to obtain the latest version?
|
||||||
|
|
||||||
|
FTP:
|
||||||
|
ftp://fenris.campus.vt.edu/smc9/smc9-12.tar.gz
|
||||||
|
ftp://sfbox.vt.edu/filebox/F/fenris/smc9/smc9-12.tar.gz
|
||||||
|
|
||||||
|
|
||||||
|
Contacting me:
|
||||||
|
erik@mail.vt.edu
|
@@ -1,42 +0,0 @@
|
|||||||
|
|
||||||
SMC 9xxxx Driver
|
|
||||||
Revision 0.12
|
|
||||||
3/5/96
|
|
||||||
Copyright 1996 Erik Stahlman
|
|
||||||
Released under terms of the GNU General Public License.
|
|
||||||
|
|
||||||
This file contains the instructions and caveats for my SMC9xxx driver. You
|
|
||||||
should not be using the driver without reading this file.
|
|
||||||
|
|
||||||
Things to note about installation:
|
|
||||||
|
|
||||||
1. The driver should work on all kernels from 1.2.13 until 1.3.71.
|
|
||||||
(A kernel patch is supplied for 1.3.71 )
|
|
||||||
|
|
||||||
2. If you include this into the kernel, you might need to change some
|
|
||||||
options, such as for forcing IRQ.
|
|
||||||
|
|
||||||
|
|
||||||
3. To compile as a module, run 'make' .
|
|
||||||
Make will give you the appropriate options for various kernel support.
|
|
||||||
|
|
||||||
4. Loading the driver as a module :
|
|
||||||
|
|
||||||
use: insmod smc9194.o
|
|
||||||
optional parameters:
|
|
||||||
io=xxxx : your base address
|
|
||||||
irq=xx : your irq
|
|
||||||
ifport=x : 0 for whatever is default
|
|
||||||
1 for twisted pair
|
|
||||||
2 for AUI ( or BNC on some cards )
|
|
||||||
|
|
||||||
How to obtain the latest version?
|
|
||||||
|
|
||||||
FTP:
|
|
||||||
ftp://fenris.campus.vt.edu/smc9/smc9-12.tar.gz
|
|
||||||
ftp://sfbox.vt.edu/filebox/F/fenris/smc9/smc9-12.tar.gz
|
|
||||||
|
|
||||||
|
|
||||||
Contacting me:
|
|
||||||
erik@mail.vt.edu
|
|
||||||
|
|
587
Documentation/networking/device_drivers/ti/cpsw.rst
Normal file
587
Documentation/networking/device_drivers/ti/cpsw.rst
Normal file
@@ -0,0 +1,587 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
======================================
|
||||||
|
Texas Instruments CPSW ethernet driver
|
||||||
|
======================================
|
||||||
|
|
||||||
|
Multiqueue & CBS & MQPRIO
|
||||||
|
=========================
|
||||||
|
|
||||||
|
|
||||||
|
The cpsw has 3 CBS shapers for each external ports. This document
|
||||||
|
describes MQPRIO and CBS Qdisc offload configuration for cpsw driver
|
||||||
|
based on examples. It potentially can be used in audio video bridging
|
||||||
|
(AVB) and time sensitive networking (TSN).
|
||||||
|
|
||||||
|
The following examples were tested on AM572x EVM and BBB boards.
|
||||||
|
|
||||||
|
Test setup
|
||||||
|
==========
|
||||||
|
|
||||||
|
Under consideration two examples with AM572x EVM running cpsw driver
|
||||||
|
in dual_emac mode.
|
||||||
|
|
||||||
|
Several prerequisites:
|
||||||
|
|
||||||
|
- TX queues must be rated starting from txq0 that has highest priority
|
||||||
|
- Traffic classes are used starting from 0, that has highest priority
|
||||||
|
- CBS shapers should be used with rated queues
|
||||||
|
- The bandwidth for CBS shapers has to be set a little bit more then
|
||||||
|
potential incoming rate, thus, rate of all incoming tx queues has
|
||||||
|
to be a little less
|
||||||
|
- Real rates can differ, due to discreetness
|
||||||
|
- Map skb-priority to txq is not enough, also skb-priority to l2 prio
|
||||||
|
map has to be created with ip or vconfig tool
|
||||||
|
- Any l2/socket prio (0 - 7) for classes can be used, but for
|
||||||
|
simplicity default values are used: 3 and 2
|
||||||
|
- only 2 classes tested: A and B, but checked and can work with more,
|
||||||
|
maximum allowed 4, but only for 3 rate can be set.
|
||||||
|
|
||||||
|
Test setup for examples
|
||||||
|
=======================
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
+-------------------------------+
|
||||||
|
|--+ |
|
||||||
|
| | Workstation0 |
|
||||||
|
|E | MAC 18:03:73:66:87:42 |
|
||||||
|
+-----------------------------+ +--|t | |
|
||||||
|
| | 1 | E | | |h |./tsn_listener -d \ |
|
||||||
|
| Target board: | 0 | t |--+ |0 | 18:03:73:66:87:42 -i eth0 \|
|
||||||
|
| AM572x EVM | 0 | h | | | -s 1500 |
|
||||||
|
| | 0 | 0 | |--+ |
|
||||||
|
| Only 2 classes: |Mb +---| +-------------------------------+
|
||||||
|
| class A, class B | |
|
||||||
|
| | +---| +-------------------------------+
|
||||||
|
| | 1 | E | |--+ |
|
||||||
|
| | 0 | t | | | Workstation1 |
|
||||||
|
| | 0 | h |--+ |E | MAC 20:cf:30:85:7d:fd |
|
||||||
|
| |Mb | 1 | +--|t | |
|
||||||
|
+-----------------------------+ |h |./tsn_listener -d \ |
|
||||||
|
|0 | 20:cf:30:85:7d:fd -i eth0 \|
|
||||||
|
| | -s 1500 |
|
||||||
|
|--+ |
|
||||||
|
+-------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
Example 1: One port tx AVB configuration scheme for target board
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
(prints and scheme for AM572x evm, applicable for single port boards)
|
||||||
|
|
||||||
|
- tc - traffic class
|
||||||
|
- txq - transmit queue
|
||||||
|
- p - priority
|
||||||
|
- f - fifo (cpsw fifo)
|
||||||
|
- S - shaper configured
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
+------------------------------------------------------------------+ u
|
||||||
|
| +---------------+ +---------------+ +------+ +------+ | s
|
||||||
|
| | | | | | | | | | e
|
||||||
|
| | App 1 | | App 2 | | Apps | | Apps | | r
|
||||||
|
| | Class A | | Class B | | Rest | | Rest | |
|
||||||
|
| | Eth0 | | Eth0 | | Eth0 | | Eth1 | | s
|
||||||
|
| | VLAN100 | | VLAN100 | | | | | | | | p
|
||||||
|
| | 40 Mb/s | | 20 Mb/s | | | | | | | | a
|
||||||
|
| | SO_PRIORITY=3 | | SO_PRIORITY=2 | | | | | | | | c
|
||||||
|
| | | | | | | | | | | | | | e
|
||||||
|
| +---|-----------+ +---|-----------+ +---|--+ +---|--+ |
|
||||||
|
+-----|------------------|------------------|--------|-------------+
|
||||||
|
+-+ +------------+ | |
|
||||||
|
| | +-----------------+ +--+
|
||||||
|
| | | |
|
||||||
|
+---|-------|-------------|-----------------------|----------------+
|
||||||
|
| +----+ +----+ +----+ +----+ +----+ |
|
||||||
|
| | p3 | | p2 | | p1 | | p0 | | p0 | | k
|
||||||
|
| \ / \ / \ / \ / \ / | e
|
||||||
|
| \ / \ / \ / \ / \ / | r
|
||||||
|
| \/ \/ \/ \/ \/ | n
|
||||||
|
| | | | | | e
|
||||||
|
| | | +-----+ | | l
|
||||||
|
| | | | | |
|
||||||
|
| +----+ +----+ +----+ +----+ | s
|
||||||
|
| |tc0 | |tc1 | |tc2 | |tc0 | | p
|
||||||
|
| \ / \ / \ / \ / | a
|
||||||
|
| \ / \ / \ / \ / | c
|
||||||
|
| \/ \/ \/ \/ | e
|
||||||
|
| | | +-----+ | |
|
||||||
|
| | | | | | |
|
||||||
|
| | | | | | |
|
||||||
|
| | | | | | |
|
||||||
|
| +----+ +----+ +----+ +----+ +----+ |
|
||||||
|
| |txq0| |txq1| |txq2| |txq3| |txq4| |
|
||||||
|
| \ / \ / \ / \ / \ / |
|
||||||
|
| \ / \ / \ / \ / \ / |
|
||||||
|
| \/ \/ \/ \/ \/ |
|
||||||
|
| +-|------|------|------|--+ +--|--------------+ |
|
||||||
|
| | | | | | | Eth0.100 | | Eth1 | |
|
||||||
|
+---|------|------|------|------------------------|----------------+
|
||||||
|
| | | | |
|
||||||
|
p p p p |
|
||||||
|
3 2 0-1, 4-7 <- L2 priority |
|
||||||
|
| | | | |
|
||||||
|
| | | | |
|
||||||
|
+---|------|------|------|------------------------|----------------+
|
||||||
|
| | | | | |----------+ |
|
||||||
|
| +----+ +----+ +----+ +----+ +----+ |
|
||||||
|
| |dma7| |dma6| |dma5| |dma4| |dma3| |
|
||||||
|
| \ / \ / \ / \ / \ / | c
|
||||||
|
| \S / \S / \ / \ / \ / | p
|
||||||
|
| \/ \/ \/ \/ \/ | s
|
||||||
|
| | | | +----- | | w
|
||||||
|
| | | | | | |
|
||||||
|
| | | | | | | d
|
||||||
|
| +----+ +----+ +----+p p+----+ | r
|
||||||
|
| | | | | | |o o| | | i
|
||||||
|
| | f3 | | f2 | | f0 |r r| f0 | | v
|
||||||
|
| |tc0 | |tc1 | |tc2 |t t|tc0 | | e
|
||||||
|
| \CBS / \CBS / \CBS /1 2\CBS / | r
|
||||||
|
| \S / \S / \ / \ / |
|
||||||
|
| \/ \/ \/ \/ |
|
||||||
|
+------------------------------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
1) ::
|
||||||
|
|
||||||
|
|
||||||
|
// Add 4 tx queues, for interface Eth0, and 1 tx queue for Eth1
|
||||||
|
$ ethtool -L eth0 rx 1 tx 5
|
||||||
|
rx unmodified, ignoring
|
||||||
|
|
||||||
|
2) ::
|
||||||
|
|
||||||
|
// Check if num of queues is set correctly:
|
||||||
|
$ ethtool -l eth0
|
||||||
|
Channel parameters for eth0:
|
||||||
|
Pre-set maximums:
|
||||||
|
RX: 8
|
||||||
|
TX: 8
|
||||||
|
Other: 0
|
||||||
|
Combined: 0
|
||||||
|
Current hardware settings:
|
||||||
|
RX: 1
|
||||||
|
TX: 5
|
||||||
|
Other: 0
|
||||||
|
Combined: 0
|
||||||
|
|
||||||
|
3) ::
|
||||||
|
|
||||||
|
// TX queues must be rated starting from 0, so set bws for tx0 and tx1
|
||||||
|
// Set rates 40 and 20 Mb/s appropriately.
|
||||||
|
// Pay attention, real speed can differ a bit due to discreetness.
|
||||||
|
// Leave last 2 tx queues not rated.
|
||||||
|
$ echo 40 > /sys/class/net/eth0/queues/tx-0/tx_maxrate
|
||||||
|
$ echo 20 > /sys/class/net/eth0/queues/tx-1/tx_maxrate
|
||||||
|
|
||||||
|
4) ::
|
||||||
|
|
||||||
|
// Check maximum rate of tx (cpdma) queues:
|
||||||
|
$ cat /sys/class/net/eth0/queues/tx-*/tx_maxrate
|
||||||
|
40
|
||||||
|
20
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
|
||||||
|
5) ::
|
||||||
|
|
||||||
|
// Map skb->priority to traffic class:
|
||||||
|
// 3pri -> tc0, 2pri -> tc1, (0,1,4-7)pri -> tc2
|
||||||
|
// Map traffic class to transmit queue:
|
||||||
|
// tc0 -> txq0, tc1 -> txq1, tc2 -> (txq2, txq3)
|
||||||
|
$ tc qdisc replace dev eth0 handle 100: parent root mqprio num_tc 3 \
|
||||||
|
map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 2@2 hw 1
|
||||||
|
|
||||||
|
5a) ::
|
||||||
|
|
||||||
|
// As two interface sharing same set of tx queues, assign all traffic
|
||||||
|
// coming to interface Eth1 to separate queue in order to not mix it
|
||||||
|
// with traffic from interface Eth0, so use separate txq to send
|
||||||
|
// packets to Eth1, so all prio -> tc0 and tc0 -> txq4
|
||||||
|
// Here hw 0, so here still default configuration for eth1 in hw
|
||||||
|
$ tc qdisc replace dev eth1 handle 100: parent root mqprio num_tc 1 \
|
||||||
|
map 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 queues 1@4 hw 0
|
||||||
|
|
||||||
|
6) ::
|
||||||
|
|
||||||
|
// Check classes settings
|
||||||
|
$ tc -g class show dev eth0
|
||||||
|
+---(100:ffe2) mqprio
|
||||||
|
| +---(100:3) mqprio
|
||||||
|
| +---(100:4) mqprio
|
||||||
|
|
|
||||||
|
+---(100:ffe1) mqprio
|
||||||
|
| +---(100:2) mqprio
|
||||||
|
|
|
||||||
|
+---(100:ffe0) mqprio
|
||||||
|
+---(100:1) mqprio
|
||||||
|
|
||||||
|
$ tc -g class show dev eth1
|
||||||
|
+---(100:ffe0) mqprio
|
||||||
|
+---(100:5) mqprio
|
||||||
|
|
||||||
|
7) ::
|
||||||
|
|
||||||
|
// Set rate for class A - 41 Mbit (tc0, txq0) using CBS Qdisc
|
||||||
|
// Set it +1 Mb for reserve (important!)
|
||||||
|
// here only idle slope is important, others arg are ignored
|
||||||
|
// Pay attention, real speed can differ a bit due to discreetness
|
||||||
|
$ tc qdisc add dev eth0 parent 100:1 cbs locredit -1438 \
|
||||||
|
hicredit 62 sendslope -959000 idleslope 41000 offload 1
|
||||||
|
net eth0: set FIFO3 bw = 50
|
||||||
|
|
||||||
|
8) ::
|
||||||
|
|
||||||
|
// Set rate for class B - 21 Mbit (tc1, txq1) using CBS Qdisc:
|
||||||
|
// Set it +1 Mb for reserve (important!)
|
||||||
|
$ tc qdisc add dev eth0 parent 100:2 cbs locredit -1468 \
|
||||||
|
hicredit 65 sendslope -979000 idleslope 21000 offload 1
|
||||||
|
net eth0: set FIFO2 bw = 30
|
||||||
|
|
||||||
|
9) ::
|
||||||
|
|
||||||
|
// Create vlan 100 to map sk->priority to vlan qos
|
||||||
|
$ ip link add link eth0 name eth0.100 type vlan id 100
|
||||||
|
8021q: 802.1Q VLAN Support v1.8
|
||||||
|
8021q: adding VLAN 0 to HW filter on device eth0
|
||||||
|
8021q: adding VLAN 0 to HW filter on device eth1
|
||||||
|
net eth0: Adding vlanid 100 to vlan filter
|
||||||
|
|
||||||
|
10) ::
|
||||||
|
|
||||||
|
// Map skb->priority to L2 prio, 1 to 1
|
||||||
|
$ ip link set eth0.100 type vlan \
|
||||||
|
egress 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
||||||
|
|
||||||
|
11) ::
|
||||||
|
|
||||||
|
// Check egress map for vlan 100
|
||||||
|
$ cat /proc/net/vlan/eth0.100
|
||||||
|
[...]
|
||||||
|
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
|
||||||
|
EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
||||||
|
|
||||||
|
12) ::
|
||||||
|
|
||||||
|
// Run your appropriate tools with socket option "SO_PRIORITY"
|
||||||
|
// to 3 for class A and/or to 2 for class B
|
||||||
|
// (I took at https://www.spinics.net/lists/netdev/msg460869.html)
|
||||||
|
./tsn_talker -d 18:03:73:66:87:42 -i eth0.100 -p3 -s 1500&
|
||||||
|
./tsn_talker -d 18:03:73:66:87:42 -i eth0.100 -p2 -s 1500&
|
||||||
|
|
||||||
|
13) ::
|
||||||
|
|
||||||
|
// run your listener on workstation (should be in same vlan)
|
||||||
|
// (I took at https://www.spinics.net/lists/netdev/msg460869.html)
|
||||||
|
./tsn_listener -d 18:03:73:66:87:42 -i enp5s0 -s 1500
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39000 kbps
|
||||||
|
|
||||||
|
14) ::
|
||||||
|
|
||||||
|
// Restore default configuration if needed
|
||||||
|
$ ip link del eth0.100
|
||||||
|
$ tc qdisc del dev eth1 root
|
||||||
|
$ tc qdisc del dev eth0 root
|
||||||
|
net eth0: Prev FIFO2 is shaped
|
||||||
|
net eth0: set FIFO3 bw = 0
|
||||||
|
net eth0: set FIFO2 bw = 0
|
||||||
|
$ ethtool -L eth0 rx 1 tx 1
|
||||||
|
|
||||||
|
Example 2: Two port tx AVB configuration scheme for target board
|
||||||
|
----------------------------------------------------------------
|
||||||
|
|
||||||
|
(prints and scheme for AM572x evm, for dual emac boards only)
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
+------------------------------------------------------------------+ u
|
||||||
|
| +----------+ +----------+ +------+ +----------+ +----------+ | s
|
||||||
|
| | | | | | | | | | | | e
|
||||||
|
| | App 1 | | App 2 | | Apps | | App 3 | | App 4 | | r
|
||||||
|
| | Class A | | Class B | | Rest | | Class B | | Class A | |
|
||||||
|
| | Eth0 | | Eth0 | | | | | Eth1 | | Eth1 | | s
|
||||||
|
| | VLAN100 | | VLAN100 | | | | | VLAN100 | | VLAN100 | | p
|
||||||
|
| | 40 Mb/s | | 20 Mb/s | | | | | 10 Mb/s | | 30 Mb/s | | a
|
||||||
|
| | SO_PRI=3 | | SO_PRI=2 | | | | | SO_PRI=3 | | SO_PRI=2 | | c
|
||||||
|
| | | | | | | | | | | | | | | | | e
|
||||||
|
| +---|------+ +---|------+ +---|--+ +---|------+ +---|------+ |
|
||||||
|
+-----|-------------|-------------|---------|-------------|--------+
|
||||||
|
+-+ +-------+ | +----------+ +----+
|
||||||
|
| | +-------+------+ | |
|
||||||
|
| | | | | |
|
||||||
|
+---|-------|-------------|--------------|-------------|-------|---+
|
||||||
|
| +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ |
|
||||||
|
| | p3 | | p2 | | p1 | | p0 | | p0 | | p1 | | p2 | | p3 | | k
|
||||||
|
| \ / \ / \ / \ / \ / \ / \ / \ / | e
|
||||||
|
| \ / \ / \ / \ / \ / \ / \ / \ / | r
|
||||||
|
| \/ \/ \/ \/ \/ \/ \/ \/ | n
|
||||||
|
| | | | | | | | e
|
||||||
|
| | | +----+ +----+ | | | l
|
||||||
|
| | | | | | | |
|
||||||
|
| +----+ +----+ +----+ +----+ +----+ +----+ | s
|
||||||
|
| |tc0 | |tc1 | |tc2 | |tc2 | |tc1 | |tc0 | | p
|
||||||
|
| \ / \ / \ / \ / \ / \ / | a
|
||||||
|
| \ / \ / \ / \ / \ / \ / | c
|
||||||
|
| \/ \/ \/ \/ \/ \/ | e
|
||||||
|
| | | +-----+ +-----+ | | |
|
||||||
|
| | | | | | | | | |
|
||||||
|
| | | | | | | | | |
|
||||||
|
| | | | | E E | | | | |
|
||||||
|
| +----+ +----+ +----+ +----+ t t +----+ +----+ +----+ +----+ |
|
||||||
|
| |txq0| |txq1| |txq4| |txq5| h h |txq6| |txq7| |txq3| |txq2| |
|
||||||
|
| \ / \ / \ / \ / 0 1 \ / \ / \ / \ / |
|
||||||
|
| \ / \ / \ / \ / . . \ / \ / \ / \ / |
|
||||||
|
| \/ \/ \/ \/ 1 1 \/ \/ \/ \/ |
|
||||||
|
| +-|------|------|------|--+ 0 0 +-|------|------|------|--+ |
|
||||||
|
| | | | | | | 0 0 | | | | | | |
|
||||||
|
+---|------|------|------|---------------|------|------|------|----+
|
||||||
|
| | | | | | | |
|
||||||
|
p p p p p p p p
|
||||||
|
3 2 0-1, 4-7 <-L2 pri-> 0-1, 4-7 2 3
|
||||||
|
| | | | | | | |
|
||||||
|
| | | | | | | |
|
||||||
|
+---|------|------|------|---------------|------|------|------|----+
|
||||||
|
| | | | | | | | | |
|
||||||
|
| +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ |
|
||||||
|
| |dma7| |dma6| |dma3| |dma2| |dma1| |dma0| |dma4| |dma5| |
|
||||||
|
| \ / \ / \ / \ / \ / \ / \ / \ / | c
|
||||||
|
| \S / \S / \ / \ / \ / \ / \S / \S / | p
|
||||||
|
| \/ \/ \/ \/ \/ \/ \/ \/ | s
|
||||||
|
| | | | +----- | | | | | w
|
||||||
|
| | | | | +----+ | | | |
|
||||||
|
| | | | | | | | | | d
|
||||||
|
| +----+ +----+ +----+p p+----+ +----+ +----+ | r
|
||||||
|
| | | | | | |o o| | | | | | | i
|
||||||
|
| | f3 | | f2 | | f0 |r CPSW r| f3 | | f2 | | f0 | | v
|
||||||
|
| |tc0 | |tc1 | |tc2 |t t|tc0 | |tc1 | |tc2 | | e
|
||||||
|
| \CBS / \CBS / \CBS /1 2\CBS / \CBS / \CBS / | r
|
||||||
|
| \S / \S / \ / \S / \S / \ / |
|
||||||
|
| \/ \/ \/ \/ \/ \/ |
|
||||||
|
+------------------------------------------------------------------+
|
||||||
|
========================================Eth==========================>
|
||||||
|
|
||||||
|
1) ::
|
||||||
|
|
||||||
|
// Add 8 tx queues, for interface Eth0, but they are common, so are accessed
|
||||||
|
// by two interfaces Eth0 and Eth1.
|
||||||
|
$ ethtool -L eth1 rx 1 tx 8
|
||||||
|
rx unmodified, ignoring
|
||||||
|
|
||||||
|
2) ::
|
||||||
|
|
||||||
|
// Check if num of queues is set correctly:
|
||||||
|
$ ethtool -l eth0
|
||||||
|
Channel parameters for eth0:
|
||||||
|
Pre-set maximums:
|
||||||
|
RX: 8
|
||||||
|
TX: 8
|
||||||
|
Other: 0
|
||||||
|
Combined: 0
|
||||||
|
Current hardware settings:
|
||||||
|
RX: 1
|
||||||
|
TX: 8
|
||||||
|
Other: 0
|
||||||
|
Combined: 0
|
||||||
|
|
||||||
|
3) ::
|
||||||
|
|
||||||
|
// TX queues must be rated starting from 0, so set bws for tx0 and tx1 for Eth0
|
||||||
|
// and for tx2 and tx3 for Eth1. That is, rates 40 and 20 Mb/s appropriately
|
||||||
|
// for Eth0 and 30 and 10 Mb/s for Eth1.
|
||||||
|
// Real speed can differ a bit due to discreetness
|
||||||
|
// Leave last 4 tx queues as not rated
|
||||||
|
$ echo 40 > /sys/class/net/eth0/queues/tx-0/tx_maxrate
|
||||||
|
$ echo 20 > /sys/class/net/eth0/queues/tx-1/tx_maxrate
|
||||||
|
$ echo 30 > /sys/class/net/eth1/queues/tx-2/tx_maxrate
|
||||||
|
$ echo 10 > /sys/class/net/eth1/queues/tx-3/tx_maxrate
|
||||||
|
|
||||||
|
4) ::
|
||||||
|
|
||||||
|
// Check maximum rate of tx (cpdma) queues:
|
||||||
|
$ cat /sys/class/net/eth0/queues/tx-*/tx_maxrate
|
||||||
|
40
|
||||||
|
20
|
||||||
|
30
|
||||||
|
10
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
0
|
||||||
|
|
||||||
|
5) ::
|
||||||
|
|
||||||
|
// Map skb->priority to traffic class for Eth0:
|
||||||
|
// 3pri -> tc0, 2pri -> tc1, (0,1,4-7)pri -> tc2
|
||||||
|
// Map traffic class to transmit queue:
|
||||||
|
// tc0 -> txq0, tc1 -> txq1, tc2 -> (txq4, txq5)
|
||||||
|
$ tc qdisc replace dev eth0 handle 100: parent root mqprio num_tc 3 \
|
||||||
|
map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 2@4 hw 1
|
||||||
|
|
||||||
|
6) ::
|
||||||
|
|
||||||
|
// Check classes settings
|
||||||
|
$ tc -g class show dev eth0
|
||||||
|
+---(100:ffe2) mqprio
|
||||||
|
| +---(100:5) mqprio
|
||||||
|
| +---(100:6) mqprio
|
||||||
|
|
|
||||||
|
+---(100:ffe1) mqprio
|
||||||
|
| +---(100:2) mqprio
|
||||||
|
|
|
||||||
|
+---(100:ffe0) mqprio
|
||||||
|
+---(100:1) mqprio
|
||||||
|
|
||||||
|
7) ::
|
||||||
|
|
||||||
|
// Set rate for class A - 41 Mbit (tc0, txq0) using CBS Qdisc for Eth0
|
||||||
|
// here only idle slope is important, others ignored
|
||||||
|
// Real speed can differ a bit due to discreetness
|
||||||
|
$ tc qdisc add dev eth0 parent 100:1 cbs locredit -1470 \
|
||||||
|
hicredit 62 sendslope -959000 idleslope 41000 offload 1
|
||||||
|
net eth0: set FIFO3 bw = 50
|
||||||
|
|
||||||
|
8) ::
|
||||||
|
|
||||||
|
// Set rate for class B - 21 Mbit (tc1, txq1) using CBS Qdisc for Eth0
|
||||||
|
$ tc qdisc add dev eth0 parent 100:2 cbs locredit -1470 \
|
||||||
|
hicredit 65 sendslope -979000 idleslope 21000 offload 1
|
||||||
|
net eth0: set FIFO2 bw = 30
|
||||||
|
|
||||||
|
9) ::
|
||||||
|
|
||||||
|
// Create vlan 100 to map sk->priority to vlan qos for Eth0
|
||||||
|
$ ip link add link eth0 name eth0.100 type vlan id 100
|
||||||
|
net eth0: Adding vlanid 100 to vlan filter
|
||||||
|
|
||||||
|
10) ::
|
||||||
|
|
||||||
|
// Map skb->priority to L2 prio for Eth0.100, one to one
|
||||||
|
$ ip link set eth0.100 type vlan \
|
||||||
|
egress 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
||||||
|
|
||||||
|
11) ::
|
||||||
|
|
||||||
|
// Check egress map for vlan 100
|
||||||
|
$ cat /proc/net/vlan/eth0.100
|
||||||
|
[...]
|
||||||
|
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
|
||||||
|
EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
||||||
|
|
||||||
|
12) ::
|
||||||
|
|
||||||
|
// Map skb->priority to traffic class for Eth1:
|
||||||
|
// 3pri -> tc0, 2pri -> tc1, (0,1,4-7)pri -> tc2
|
||||||
|
// Map traffic class to transmit queue:
|
||||||
|
// tc0 -> txq2, tc1 -> txq3, tc2 -> (txq6, txq7)
|
||||||
|
$ tc qdisc replace dev eth1 handle 100: parent root mqprio num_tc 3 \
|
||||||
|
map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@2 1@3 2@6 hw 1
|
||||||
|
|
||||||
|
13) ::
|
||||||
|
|
||||||
|
// Check classes settings
|
||||||
|
$ tc -g class show dev eth1
|
||||||
|
+---(100:ffe2) mqprio
|
||||||
|
| +---(100:7) mqprio
|
||||||
|
| +---(100:8) mqprio
|
||||||
|
|
|
||||||
|
+---(100:ffe1) mqprio
|
||||||
|
| +---(100:4) mqprio
|
||||||
|
|
|
||||||
|
+---(100:ffe0) mqprio
|
||||||
|
+---(100:3) mqprio
|
||||||
|
|
||||||
|
14) ::
|
||||||
|
|
||||||
|
// Set rate for class A - 31 Mbit (tc0, txq2) using CBS Qdisc for Eth1
|
||||||
|
// here only idle slope is important, others ignored, but calculated
|
||||||
|
// for interface speed - 100Mb for eth1 port.
|
||||||
|
// Set it +1 Mb for reserve (important!)
|
||||||
|
$ tc qdisc add dev eth1 parent 100:3 cbs locredit -1035 \
|
||||||
|
hicredit 465 sendslope -69000 idleslope 31000 offload 1
|
||||||
|
net eth1: set FIFO3 bw = 31
|
||||||
|
|
||||||
|
15) ::
|
||||||
|
|
||||||
|
// Set rate for class B - 11 Mbit (tc1, txq3) using CBS Qdisc for Eth1
|
||||||
|
// Set it +1 Mb for reserve (important!)
|
||||||
|
$ tc qdisc add dev eth1 parent 100:4 cbs locredit -1335 \
|
||||||
|
hicredit 405 sendslope -89000 idleslope 11000 offload 1
|
||||||
|
net eth1: set FIFO2 bw = 11
|
||||||
|
|
||||||
|
16) ::
|
||||||
|
|
||||||
|
// Create vlan 100 to map sk->priority to vlan qos for Eth1
|
||||||
|
$ ip link add link eth1 name eth1.100 type vlan id 100
|
||||||
|
net eth1: Adding vlanid 100 to vlan filter
|
||||||
|
|
||||||
|
17) ::
|
||||||
|
|
||||||
|
// Map skb->priority to L2 prio for Eth1.100, one to one
|
||||||
|
$ ip link set eth1.100 type vlan \
|
||||||
|
egress 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
||||||
|
|
||||||
|
18) ::
|
||||||
|
|
||||||
|
// Check egress map for vlan 100
|
||||||
|
$ cat /proc/net/vlan/eth1.100
|
||||||
|
[...]
|
||||||
|
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
|
||||||
|
EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
||||||
|
|
||||||
|
19) ::
|
||||||
|
|
||||||
|
// Run appropriate tools with socket option "SO_PRIORITY" to 3
|
||||||
|
// for class A and to 2 for class B. For both interfaces
|
||||||
|
./tsn_talker -d 18:03:73:66:87:42 -i eth0.100 -p2 -s 1500&
|
||||||
|
./tsn_talker -d 18:03:73:66:87:42 -i eth0.100 -p3 -s 1500&
|
||||||
|
./tsn_talker -d 20:cf:30:85:7d:fd -i eth1.100 -p2 -s 1500&
|
||||||
|
./tsn_talker -d 20:cf:30:85:7d:fd -i eth1.100 -p3 -s 1500&
|
||||||
|
|
||||||
|
20) ::
|
||||||
|
|
||||||
|
// run your listener on workstation (should be in same vlan)
|
||||||
|
// (I took at https://www.spinics.net/lists/netdev/msg460869.html)
|
||||||
|
./tsn_listener -d 18:03:73:66:87:42 -i enp5s0 -s 1500
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39012 kbps
|
||||||
|
Receiving data rate: 39000 kbps
|
||||||
|
|
||||||
|
21) ::
|
||||||
|
|
||||||
|
// Restore default configuration if needed
|
||||||
|
$ ip link del eth1.100
|
||||||
|
$ ip link del eth0.100
|
||||||
|
$ tc qdisc del dev eth1 root
|
||||||
|
net eth1: Prev FIFO2 is shaped
|
||||||
|
net eth1: set FIFO3 bw = 0
|
||||||
|
net eth1: set FIFO2 bw = 0
|
||||||
|
$ tc qdisc del dev eth0 root
|
||||||
|
net eth0: Prev FIFO2 is shaped
|
||||||
|
net eth0: set FIFO3 bw = 0
|
||||||
|
net eth0: set FIFO2 bw = 0
|
||||||
|
$ ethtool -L eth0 rx 1 tx 1
|
@@ -1,541 +0,0 @@
|
|||||||
* Texas Instruments CPSW ethernet driver
|
|
||||||
|
|
||||||
Multiqueue & CBS & MQPRIO
|
|
||||||
=====================================================================
|
|
||||||
=====================================================================
|
|
||||||
|
|
||||||
The cpsw has 3 CBS shapers for each external ports. This document
|
|
||||||
describes MQPRIO and CBS Qdisc offload configuration for cpsw driver
|
|
||||||
based on examples. It potentially can be used in audio video bridging
|
|
||||||
(AVB) and time sensitive networking (TSN).
|
|
||||||
|
|
||||||
The following examples were tested on AM572x EVM and BBB boards.
|
|
||||||
|
|
||||||
Test setup
|
|
||||||
==========
|
|
||||||
|
|
||||||
Under consideration two examples with AM572x EVM running cpsw driver
|
|
||||||
in dual_emac mode.
|
|
||||||
|
|
||||||
Several prerequisites:
|
|
||||||
- TX queues must be rated starting from txq0 that has highest priority
|
|
||||||
- Traffic classes are used starting from 0, that has highest priority
|
|
||||||
- CBS shapers should be used with rated queues
|
|
||||||
- The bandwidth for CBS shapers has to be set a little bit more then
|
|
||||||
potential incoming rate, thus, rate of all incoming tx queues has
|
|
||||||
to be a little less
|
|
||||||
- Real rates can differ, due to discreetness
|
|
||||||
- Map skb-priority to txq is not enough, also skb-priority to l2 prio
|
|
||||||
map has to be created with ip or vconfig tool
|
|
||||||
- Any l2/socket prio (0 - 7) for classes can be used, but for
|
|
||||||
simplicity default values are used: 3 and 2
|
|
||||||
- only 2 classes tested: A and B, but checked and can work with more,
|
|
||||||
maximum allowed 4, but only for 3 rate can be set.
|
|
||||||
|
|
||||||
Test setup for examples
|
|
||||||
=======================
|
|
||||||
+-------------------------------+
|
|
||||||
|--+ |
|
|
||||||
| | Workstation0 |
|
|
||||||
|E | MAC 18:03:73:66:87:42 |
|
|
||||||
+-----------------------------+ +--|t | |
|
|
||||||
| | 1 | E | | |h |./tsn_listener -d \ |
|
|
||||||
| Target board: | 0 | t |--+ |0 | 18:03:73:66:87:42 -i eth0 \|
|
|
||||||
| AM572x EVM | 0 | h | | | -s 1500 |
|
|
||||||
| | 0 | 0 | |--+ |
|
|
||||||
| Only 2 classes: |Mb +---| +-------------------------------+
|
|
||||||
| class A, class B | |
|
|
||||||
| | +---| +-------------------------------+
|
|
||||||
| | 1 | E | |--+ |
|
|
||||||
| | 0 | t | | | Workstation1 |
|
|
||||||
| | 0 | h |--+ |E | MAC 20:cf:30:85:7d:fd |
|
|
||||||
| |Mb | 1 | +--|t | |
|
|
||||||
+-----------------------------+ |h |./tsn_listener -d \ |
|
|
||||||
|0 | 20:cf:30:85:7d:fd -i eth0 \|
|
|
||||||
| | -s 1500 |
|
|
||||||
|--+ |
|
|
||||||
+-------------------------------+
|
|
||||||
|
|
||||||
*********************************************************************
|
|
||||||
*********************************************************************
|
|
||||||
*********************************************************************
|
|
||||||
Example 1: One port tx AVB configuration scheme for target board
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
(prints and scheme for AM572x evm, applicable for single port boards)
|
|
||||||
|
|
||||||
tc - traffic class
|
|
||||||
txq - transmit queue
|
|
||||||
p - priority
|
|
||||||
f - fifo (cpsw fifo)
|
|
||||||
S - shaper configured
|
|
||||||
|
|
||||||
+------------------------------------------------------------------+ u
|
|
||||||
| +---------------+ +---------------+ +------+ +------+ | s
|
|
||||||
| | | | | | | | | | e
|
|
||||||
| | App 1 | | App 2 | | Apps | | Apps | | r
|
|
||||||
| | Class A | | Class B | | Rest | | Rest | |
|
|
||||||
| | Eth0 | | Eth0 | | Eth0 | | Eth1 | | s
|
|
||||||
| | VLAN100 | | VLAN100 | | | | | | | | p
|
|
||||||
| | 40 Mb/s | | 20 Mb/s | | | | | | | | a
|
|
||||||
| | SO_PRIORITY=3 | | SO_PRIORITY=2 | | | | | | | | c
|
|
||||||
| | | | | | | | | | | | | | e
|
|
||||||
| +---|-----------+ +---|-----------+ +---|--+ +---|--+ |
|
|
||||||
+-----|------------------|------------------|--------|-------------+
|
|
||||||
+-+ +------------+ | |
|
|
||||||
| | +-----------------+ +--+
|
|
||||||
| | | |
|
|
||||||
+---|-------|-------------|-----------------------|----------------+
|
|
||||||
| +----+ +----+ +----+ +----+ +----+ |
|
|
||||||
| | p3 | | p2 | | p1 | | p0 | | p0 | | k
|
|
||||||
| \ / \ / \ / \ / \ / | e
|
|
||||||
| \ / \ / \ / \ / \ / | r
|
|
||||||
| \/ \/ \/ \/ \/ | n
|
|
||||||
| | | | | | e
|
|
||||||
| | | +-----+ | | l
|
|
||||||
| | | | | |
|
|
||||||
| +----+ +----+ +----+ +----+ | s
|
|
||||||
| |tc0 | |tc1 | |tc2 | |tc0 | | p
|
|
||||||
| \ / \ / \ / \ / | a
|
|
||||||
| \ / \ / \ / \ / | c
|
|
||||||
| \/ \/ \/ \/ | e
|
|
||||||
| | | +-----+ | |
|
|
||||||
| | | | | | |
|
|
||||||
| | | | | | |
|
|
||||||
| | | | | | |
|
|
||||||
| +----+ +----+ +----+ +----+ +----+ |
|
|
||||||
| |txq0| |txq1| |txq2| |txq3| |txq4| |
|
|
||||||
| \ / \ / \ / \ / \ / |
|
|
||||||
| \ / \ / \ / \ / \ / |
|
|
||||||
| \/ \/ \/ \/ \/ |
|
|
||||||
| +-|------|------|------|--+ +--|--------------+ |
|
|
||||||
| | | | | | | Eth0.100 | | Eth1 | |
|
|
||||||
+---|------|------|------|------------------------|----------------+
|
|
||||||
| | | | |
|
|
||||||
p p p p |
|
|
||||||
3 2 0-1, 4-7 <- L2 priority |
|
|
||||||
| | | | |
|
|
||||||
| | | | |
|
|
||||||
+---|------|------|------|------------------------|----------------+
|
|
||||||
| | | | | |----------+ |
|
|
||||||
| +----+ +----+ +----+ +----+ +----+ |
|
|
||||||
| |dma7| |dma6| |dma5| |dma4| |dma3| |
|
|
||||||
| \ / \ / \ / \ / \ / | c
|
|
||||||
| \S / \S / \ / \ / \ / | p
|
|
||||||
| \/ \/ \/ \/ \/ | s
|
|
||||||
| | | | +----- | | w
|
|
||||||
| | | | | | |
|
|
||||||
| | | | | | | d
|
|
||||||
| +----+ +----+ +----+p p+----+ | r
|
|
||||||
| | | | | | |o o| | | i
|
|
||||||
| | f3 | | f2 | | f0 |r r| f0 | | v
|
|
||||||
| |tc0 | |tc1 | |tc2 |t t|tc0 | | e
|
|
||||||
| \CBS / \CBS / \CBS /1 2\CBS / | r
|
|
||||||
| \S / \S / \ / \ / |
|
|
||||||
| \/ \/ \/ \/ |
|
|
||||||
+------------------------------------------------------------------+
|
|
||||||
========================================Eth==========================>
|
|
||||||
|
|
||||||
1)
|
|
||||||
// Add 4 tx queues, for interface Eth0, and 1 tx queue for Eth1
|
|
||||||
$ ethtool -L eth0 rx 1 tx 5
|
|
||||||
rx unmodified, ignoring
|
|
||||||
|
|
||||||
2)
|
|
||||||
// Check if num of queues is set correctly:
|
|
||||||
$ ethtool -l eth0
|
|
||||||
Channel parameters for eth0:
|
|
||||||
Pre-set maximums:
|
|
||||||
RX: 8
|
|
||||||
TX: 8
|
|
||||||
Other: 0
|
|
||||||
Combined: 0
|
|
||||||
Current hardware settings:
|
|
||||||
RX: 1
|
|
||||||
TX: 5
|
|
||||||
Other: 0
|
|
||||||
Combined: 0
|
|
||||||
|
|
||||||
3)
|
|
||||||
// TX queues must be rated starting from 0, so set bws for tx0 and tx1
|
|
||||||
// Set rates 40 and 20 Mb/s appropriately.
|
|
||||||
// Pay attention, real speed can differ a bit due to discreetness.
|
|
||||||
// Leave last 2 tx queues not rated.
|
|
||||||
$ echo 40 > /sys/class/net/eth0/queues/tx-0/tx_maxrate
|
|
||||||
$ echo 20 > /sys/class/net/eth0/queues/tx-1/tx_maxrate
|
|
||||||
|
|
||||||
4)
|
|
||||||
// Check maximum rate of tx (cpdma) queues:
|
|
||||||
$ cat /sys/class/net/eth0/queues/tx-*/tx_maxrate
|
|
||||||
40
|
|
||||||
20
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
|
|
||||||
5)
|
|
||||||
// Map skb->priority to traffic class:
|
|
||||||
// 3pri -> tc0, 2pri -> tc1, (0,1,4-7)pri -> tc2
|
|
||||||
// Map traffic class to transmit queue:
|
|
||||||
// tc0 -> txq0, tc1 -> txq1, tc2 -> (txq2, txq3)
|
|
||||||
$ tc qdisc replace dev eth0 handle 100: parent root mqprio num_tc 3 \
|
|
||||||
map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 2@2 hw 1
|
|
||||||
|
|
||||||
5a)
|
|
||||||
// As two interface sharing same set of tx queues, assign all traffic
|
|
||||||
// coming to interface Eth1 to separate queue in order to not mix it
|
|
||||||
// with traffic from interface Eth0, so use separate txq to send
|
|
||||||
// packets to Eth1, so all prio -> tc0 and tc0 -> txq4
|
|
||||||
// Here hw 0, so here still default configuration for eth1 in hw
|
|
||||||
$ tc qdisc replace dev eth1 handle 100: parent root mqprio num_tc 1 \
|
|
||||||
map 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 queues 1@4 hw 0
|
|
||||||
|
|
||||||
6)
|
|
||||||
// Check classes settings
|
|
||||||
$ tc -g class show dev eth0
|
|
||||||
+---(100:ffe2) mqprio
|
|
||||||
| +---(100:3) mqprio
|
|
||||||
| +---(100:4) mqprio
|
|
||||||
|
|
|
||||||
+---(100:ffe1) mqprio
|
|
||||||
| +---(100:2) mqprio
|
|
||||||
|
|
|
||||||
+---(100:ffe0) mqprio
|
|
||||||
+---(100:1) mqprio
|
|
||||||
|
|
||||||
$ tc -g class show dev eth1
|
|
||||||
+---(100:ffe0) mqprio
|
|
||||||
+---(100:5) mqprio
|
|
||||||
|
|
||||||
7)
|
|
||||||
// Set rate for class A - 41 Mbit (tc0, txq0) using CBS Qdisc
|
|
||||||
// Set it +1 Mb for reserve (important!)
|
|
||||||
// here only idle slope is important, others arg are ignored
|
|
||||||
// Pay attention, real speed can differ a bit due to discreetness
|
|
||||||
$ tc qdisc add dev eth0 parent 100:1 cbs locredit -1438 \
|
|
||||||
hicredit 62 sendslope -959000 idleslope 41000 offload 1
|
|
||||||
net eth0: set FIFO3 bw = 50
|
|
||||||
|
|
||||||
8)
|
|
||||||
// Set rate for class B - 21 Mbit (tc1, txq1) using CBS Qdisc:
|
|
||||||
// Set it +1 Mb for reserve (important!)
|
|
||||||
$ tc qdisc add dev eth0 parent 100:2 cbs locredit -1468 \
|
|
||||||
hicredit 65 sendslope -979000 idleslope 21000 offload 1
|
|
||||||
net eth0: set FIFO2 bw = 30
|
|
||||||
|
|
||||||
9)
|
|
||||||
// Create vlan 100 to map sk->priority to vlan qos
|
|
||||||
$ ip link add link eth0 name eth0.100 type vlan id 100
|
|
||||||
8021q: 802.1Q VLAN Support v1.8
|
|
||||||
8021q: adding VLAN 0 to HW filter on device eth0
|
|
||||||
8021q: adding VLAN 0 to HW filter on device eth1
|
|
||||||
net eth0: Adding vlanid 100 to vlan filter
|
|
||||||
|
|
||||||
10)
|
|
||||||
// Map skb->priority to L2 prio, 1 to 1
|
|
||||||
$ ip link set eth0.100 type vlan \
|
|
||||||
egress 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
|
||||||
|
|
||||||
11)
|
|
||||||
// Check egress map for vlan 100
|
|
||||||
$ cat /proc/net/vlan/eth0.100
|
|
||||||
[...]
|
|
||||||
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
|
|
||||||
EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
|
||||||
|
|
||||||
12)
|
|
||||||
// Run your appropriate tools with socket option "SO_PRIORITY"
|
|
||||||
// to 3 for class A and/or to 2 for class B
|
|
||||||
// (I took at https://www.spinics.net/lists/netdev/msg460869.html)
|
|
||||||
./tsn_talker -d 18:03:73:66:87:42 -i eth0.100 -p3 -s 1500&
|
|
||||||
./tsn_talker -d 18:03:73:66:87:42 -i eth0.100 -p2 -s 1500&
|
|
||||||
|
|
||||||
13)
|
|
||||||
// run your listener on workstation (should be in same vlan)
|
|
||||||
// (I took at https://www.spinics.net/lists/netdev/msg460869.html)
|
|
||||||
./tsn_listener -d 18:03:73:66:87:42 -i enp5s0 -s 1500
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39000 kbps
|
|
||||||
|
|
||||||
14)
|
|
||||||
// Restore default configuration if needed
|
|
||||||
$ ip link del eth0.100
|
|
||||||
$ tc qdisc del dev eth1 root
|
|
||||||
$ tc qdisc del dev eth0 root
|
|
||||||
net eth0: Prev FIFO2 is shaped
|
|
||||||
net eth0: set FIFO3 bw = 0
|
|
||||||
net eth0: set FIFO2 bw = 0
|
|
||||||
$ ethtool -L eth0 rx 1 tx 1
|
|
||||||
|
|
||||||
*********************************************************************
|
|
||||||
*********************************************************************
|
|
||||||
*********************************************************************
|
|
||||||
Example 2: Two port tx AVB configuration scheme for target board
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
(prints and scheme for AM572x evm, for dual emac boards only)
|
|
||||||
|
|
||||||
+------------------------------------------------------------------+ u
|
|
||||||
| +----------+ +----------+ +------+ +----------+ +----------+ | s
|
|
||||||
| | | | | | | | | | | | e
|
|
||||||
| | App 1 | | App 2 | | Apps | | App 3 | | App 4 | | r
|
|
||||||
| | Class A | | Class B | | Rest | | Class B | | Class A | |
|
|
||||||
| | Eth0 | | Eth0 | | | | | Eth1 | | Eth1 | | s
|
|
||||||
| | VLAN100 | | VLAN100 | | | | | VLAN100 | | VLAN100 | | p
|
|
||||||
| | 40 Mb/s | | 20 Mb/s | | | | | 10 Mb/s | | 30 Mb/s | | a
|
|
||||||
| | SO_PRI=3 | | SO_PRI=2 | | | | | SO_PRI=3 | | SO_PRI=2 | | c
|
|
||||||
| | | | | | | | | | | | | | | | | e
|
|
||||||
| +---|------+ +---|------+ +---|--+ +---|------+ +---|------+ |
|
|
||||||
+-----|-------------|-------------|---------|-------------|--------+
|
|
||||||
+-+ +-------+ | +----------+ +----+
|
|
||||||
| | +-------+------+ | |
|
|
||||||
| | | | | |
|
|
||||||
+---|-------|-------------|--------------|-------------|-------|---+
|
|
||||||
| +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ |
|
|
||||||
| | p3 | | p2 | | p1 | | p0 | | p0 | | p1 | | p2 | | p3 | | k
|
|
||||||
| \ / \ / \ / \ / \ / \ / \ / \ / | e
|
|
||||||
| \ / \ / \ / \ / \ / \ / \ / \ / | r
|
|
||||||
| \/ \/ \/ \/ \/ \/ \/ \/ | n
|
|
||||||
| | | | | | | | e
|
|
||||||
| | | +----+ +----+ | | | l
|
|
||||||
| | | | | | | |
|
|
||||||
| +----+ +----+ +----+ +----+ +----+ +----+ | s
|
|
||||||
| |tc0 | |tc1 | |tc2 | |tc2 | |tc1 | |tc0 | | p
|
|
||||||
| \ / \ / \ / \ / \ / \ / | a
|
|
||||||
| \ / \ / \ / \ / \ / \ / | c
|
|
||||||
| \/ \/ \/ \/ \/ \/ | e
|
|
||||||
| | | +-----+ +-----+ | | |
|
|
||||||
| | | | | | | | | |
|
|
||||||
| | | | | | | | | |
|
|
||||||
| | | | | E E | | | | |
|
|
||||||
| +----+ +----+ +----+ +----+ t t +----+ +----+ +----+ +----+ |
|
|
||||||
| |txq0| |txq1| |txq4| |txq5| h h |txq6| |txq7| |txq3| |txq2| |
|
|
||||||
| \ / \ / \ / \ / 0 1 \ / \ / \ / \ / |
|
|
||||||
| \ / \ / \ / \ / . . \ / \ / \ / \ / |
|
|
||||||
| \/ \/ \/ \/ 1 1 \/ \/ \/ \/ |
|
|
||||||
| +-|------|------|------|--+ 0 0 +-|------|------|------|--+ |
|
|
||||||
| | | | | | | 0 0 | | | | | | |
|
|
||||||
+---|------|------|------|---------------|------|------|------|----+
|
|
||||||
| | | | | | | |
|
|
||||||
p p p p p p p p
|
|
||||||
3 2 0-1, 4-7 <-L2 pri-> 0-1, 4-7 2 3
|
|
||||||
| | | | | | | |
|
|
||||||
| | | | | | | |
|
|
||||||
+---|------|------|------|---------------|------|------|------|----+
|
|
||||||
| | | | | | | | | |
|
|
||||||
| +----+ +----+ +----+ +----+ +----+ +----+ +----+ +----+ |
|
|
||||||
| |dma7| |dma6| |dma3| |dma2| |dma1| |dma0| |dma4| |dma5| |
|
|
||||||
| \ / \ / \ / \ / \ / \ / \ / \ / | c
|
|
||||||
| \S / \S / \ / \ / \ / \ / \S / \S / | p
|
|
||||||
| \/ \/ \/ \/ \/ \/ \/ \/ | s
|
|
||||||
| | | | +----- | | | | | w
|
|
||||||
| | | | | +----+ | | | |
|
|
||||||
| | | | | | | | | | d
|
|
||||||
| +----+ +----+ +----+p p+----+ +----+ +----+ | r
|
|
||||||
| | | | | | |o o| | | | | | | i
|
|
||||||
| | f3 | | f2 | | f0 |r CPSW r| f3 | | f2 | | f0 | | v
|
|
||||||
| |tc0 | |tc1 | |tc2 |t t|tc0 | |tc1 | |tc2 | | e
|
|
||||||
| \CBS / \CBS / \CBS /1 2\CBS / \CBS / \CBS / | r
|
|
||||||
| \S / \S / \ / \S / \S / \ / |
|
|
||||||
| \/ \/ \/ \/ \/ \/ |
|
|
||||||
+------------------------------------------------------------------+
|
|
||||||
========================================Eth==========================>
|
|
||||||
|
|
||||||
1)
|
|
||||||
// Add 8 tx queues, for interface Eth0, but they are common, so are accessed
|
|
||||||
// by two interfaces Eth0 and Eth1.
|
|
||||||
$ ethtool -L eth1 rx 1 tx 8
|
|
||||||
rx unmodified, ignoring
|
|
||||||
|
|
||||||
2)
|
|
||||||
// Check if num of queues is set correctly:
|
|
||||||
$ ethtool -l eth0
|
|
||||||
Channel parameters for eth0:
|
|
||||||
Pre-set maximums:
|
|
||||||
RX: 8
|
|
||||||
TX: 8
|
|
||||||
Other: 0
|
|
||||||
Combined: 0
|
|
||||||
Current hardware settings:
|
|
||||||
RX: 1
|
|
||||||
TX: 8
|
|
||||||
Other: 0
|
|
||||||
Combined: 0
|
|
||||||
|
|
||||||
3)
|
|
||||||
// TX queues must be rated starting from 0, so set bws for tx0 and tx1 for Eth0
|
|
||||||
// and for tx2 and tx3 for Eth1. That is, rates 40 and 20 Mb/s appropriately
|
|
||||||
// for Eth0 and 30 and 10 Mb/s for Eth1.
|
|
||||||
// Real speed can differ a bit due to discreetness
|
|
||||||
// Leave last 4 tx queues as not rated
|
|
||||||
$ echo 40 > /sys/class/net/eth0/queues/tx-0/tx_maxrate
|
|
||||||
$ echo 20 > /sys/class/net/eth0/queues/tx-1/tx_maxrate
|
|
||||||
$ echo 30 > /sys/class/net/eth1/queues/tx-2/tx_maxrate
|
|
||||||
$ echo 10 > /sys/class/net/eth1/queues/tx-3/tx_maxrate
|
|
||||||
|
|
||||||
4)
|
|
||||||
// Check maximum rate of tx (cpdma) queues:
|
|
||||||
$ cat /sys/class/net/eth0/queues/tx-*/tx_maxrate
|
|
||||||
40
|
|
||||||
20
|
|
||||||
30
|
|
||||||
10
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
0
|
|
||||||
|
|
||||||
5)
|
|
||||||
// Map skb->priority to traffic class for Eth0:
|
|
||||||
// 3pri -> tc0, 2pri -> tc1, (0,1,4-7)pri -> tc2
|
|
||||||
// Map traffic class to transmit queue:
|
|
||||||
// tc0 -> txq0, tc1 -> txq1, tc2 -> (txq4, txq5)
|
|
||||||
$ tc qdisc replace dev eth0 handle 100: parent root mqprio num_tc 3 \
|
|
||||||
map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@0 1@1 2@4 hw 1
|
|
||||||
|
|
||||||
6)
|
|
||||||
// Check classes settings
|
|
||||||
$ tc -g class show dev eth0
|
|
||||||
+---(100:ffe2) mqprio
|
|
||||||
| +---(100:5) mqprio
|
|
||||||
| +---(100:6) mqprio
|
|
||||||
|
|
|
||||||
+---(100:ffe1) mqprio
|
|
||||||
| +---(100:2) mqprio
|
|
||||||
|
|
|
||||||
+---(100:ffe0) mqprio
|
|
||||||
+---(100:1) mqprio
|
|
||||||
|
|
||||||
7)
|
|
||||||
// Set rate for class A - 41 Mbit (tc0, txq0) using CBS Qdisc for Eth0
|
|
||||||
// here only idle slope is important, others ignored
|
|
||||||
// Real speed can differ a bit due to discreetness
|
|
||||||
$ tc qdisc add dev eth0 parent 100:1 cbs locredit -1470 \
|
|
||||||
hicredit 62 sendslope -959000 idleslope 41000 offload 1
|
|
||||||
net eth0: set FIFO3 bw = 50
|
|
||||||
|
|
||||||
8)
|
|
||||||
// Set rate for class B - 21 Mbit (tc1, txq1) using CBS Qdisc for Eth0
|
|
||||||
$ tc qdisc add dev eth0 parent 100:2 cbs locredit -1470 \
|
|
||||||
hicredit 65 sendslope -979000 idleslope 21000 offload 1
|
|
||||||
net eth0: set FIFO2 bw = 30
|
|
||||||
|
|
||||||
9)
|
|
||||||
// Create vlan 100 to map sk->priority to vlan qos for Eth0
|
|
||||||
$ ip link add link eth0 name eth0.100 type vlan id 100
|
|
||||||
net eth0: Adding vlanid 100 to vlan filter
|
|
||||||
|
|
||||||
10)
|
|
||||||
// Map skb->priority to L2 prio for Eth0.100, one to one
|
|
||||||
$ ip link set eth0.100 type vlan \
|
|
||||||
egress 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
|
||||||
|
|
||||||
11)
|
|
||||||
// Check egress map for vlan 100
|
|
||||||
$ cat /proc/net/vlan/eth0.100
|
|
||||||
[...]
|
|
||||||
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
|
|
||||||
EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
|
||||||
|
|
||||||
12)
|
|
||||||
// Map skb->priority to traffic class for Eth1:
|
|
||||||
// 3pri -> tc0, 2pri -> tc1, (0,1,4-7)pri -> tc2
|
|
||||||
// Map traffic class to transmit queue:
|
|
||||||
// tc0 -> txq2, tc1 -> txq3, tc2 -> (txq6, txq7)
|
|
||||||
$ tc qdisc replace dev eth1 handle 100: parent root mqprio num_tc 3 \
|
|
||||||
map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 queues 1@2 1@3 2@6 hw 1
|
|
||||||
|
|
||||||
13)
|
|
||||||
// Check classes settings
|
|
||||||
$ tc -g class show dev eth1
|
|
||||||
+---(100:ffe2) mqprio
|
|
||||||
| +---(100:7) mqprio
|
|
||||||
| +---(100:8) mqprio
|
|
||||||
|
|
|
||||||
+---(100:ffe1) mqprio
|
|
||||||
| +---(100:4) mqprio
|
|
||||||
|
|
|
||||||
+---(100:ffe0) mqprio
|
|
||||||
+---(100:3) mqprio
|
|
||||||
|
|
||||||
14)
|
|
||||||
// Set rate for class A - 31 Mbit (tc0, txq2) using CBS Qdisc for Eth1
|
|
||||||
// here only idle slope is important, others ignored, but calculated
|
|
||||||
// for interface speed - 100Mb for eth1 port.
|
|
||||||
// Set it +1 Mb for reserve (important!)
|
|
||||||
$ tc qdisc add dev eth1 parent 100:3 cbs locredit -1035 \
|
|
||||||
hicredit 465 sendslope -69000 idleslope 31000 offload 1
|
|
||||||
net eth1: set FIFO3 bw = 31
|
|
||||||
|
|
||||||
15)
|
|
||||||
// Set rate for class B - 11 Mbit (tc1, txq3) using CBS Qdisc for Eth1
|
|
||||||
// Set it +1 Mb for reserve (important!)
|
|
||||||
$ tc qdisc add dev eth1 parent 100:4 cbs locredit -1335 \
|
|
||||||
hicredit 405 sendslope -89000 idleslope 11000 offload 1
|
|
||||||
net eth1: set FIFO2 bw = 11
|
|
||||||
|
|
||||||
16)
|
|
||||||
// Create vlan 100 to map sk->priority to vlan qos for Eth1
|
|
||||||
$ ip link add link eth1 name eth1.100 type vlan id 100
|
|
||||||
net eth1: Adding vlanid 100 to vlan filter
|
|
||||||
|
|
||||||
17)
|
|
||||||
// Map skb->priority to L2 prio for Eth1.100, one to one
|
|
||||||
$ ip link set eth1.100 type vlan \
|
|
||||||
egress 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
|
||||||
|
|
||||||
18)
|
|
||||||
// Check egress map for vlan 100
|
|
||||||
$ cat /proc/net/vlan/eth1.100
|
|
||||||
[...]
|
|
||||||
INGRESS priority mappings: 0:0 1:0 2:0 3:0 4:0 5:0 6:0 7:0
|
|
||||||
EGRESS priority mappings: 0:0 1:1 2:2 3:3 4:4 5:5 6:6 7:7
|
|
||||||
|
|
||||||
19)
|
|
||||||
// Run appropriate tools with socket option "SO_PRIORITY" to 3
|
|
||||||
// for class A and to 2 for class B. For both interfaces
|
|
||||||
./tsn_talker -d 18:03:73:66:87:42 -i eth0.100 -p2 -s 1500&
|
|
||||||
./tsn_talker -d 18:03:73:66:87:42 -i eth0.100 -p3 -s 1500&
|
|
||||||
./tsn_talker -d 20:cf:30:85:7d:fd -i eth1.100 -p2 -s 1500&
|
|
||||||
./tsn_talker -d 20:cf:30:85:7d:fd -i eth1.100 -p3 -s 1500&
|
|
||||||
|
|
||||||
20)
|
|
||||||
// run your listener on workstation (should be in same vlan)
|
|
||||||
// (I took at https://www.spinics.net/lists/netdev/msg460869.html)
|
|
||||||
./tsn_listener -d 18:03:73:66:87:42 -i enp5s0 -s 1500
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39012 kbps
|
|
||||||
Receiving data rate: 39000 kbps
|
|
||||||
|
|
||||||
21)
|
|
||||||
// Restore default configuration if needed
|
|
||||||
$ ip link del eth1.100
|
|
||||||
$ ip link del eth0.100
|
|
||||||
$ tc qdisc del dev eth1 root
|
|
||||||
net eth1: Prev FIFO2 is shaped
|
|
||||||
net eth1: set FIFO3 bw = 0
|
|
||||||
net eth1: set FIFO2 bw = 0
|
|
||||||
$ tc qdisc del dev eth0 root
|
|
||||||
net eth0: Prev FIFO2 is shaped
|
|
||||||
net eth0: set FIFO3 bw = 0
|
|
||||||
net eth0: set FIFO2 bw = 0
|
|
||||||
$ ethtool -L eth0 rx 1 tx 1
|
|
@@ -1,30 +1,44 @@
|
|||||||
* Texas Instruments CPSW switchdev based ethernet driver 2.0
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
======================================================
|
||||||
|
Texas Instruments CPSW switchdev based ethernet driver
|
||||||
|
======================================================
|
||||||
|
|
||||||
|
:Version: 2.0
|
||||||
|
|
||||||
|
Port renaming
|
||||||
|
=============
|
||||||
|
|
||||||
- Port renaming
|
|
||||||
On older udev versions renaming of ethX to swXpY will not be automatically
|
On older udev versions renaming of ethX to swXpY will not be automatically
|
||||||
supported
|
supported
|
||||||
In order to rename via udev:
|
|
||||||
ip -d link show dev sw0p1 | grep switchid
|
|
||||||
|
|
||||||
SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}==<switchid>, \
|
In order to rename via udev::
|
||||||
|
|
||||||
|
ip -d link show dev sw0p1 | grep switchid
|
||||||
|
|
||||||
|
SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}==<switchid>, \
|
||||||
ATTR{phys_port_name}!="", NAME="sw0$attr{phys_port_name}"
|
ATTR{phys_port_name}!="", NAME="sw0$attr{phys_port_name}"
|
||||||
|
|
||||||
|
|
||||||
====================
|
Dual mac mode
|
||||||
# Dual mac mode
|
=============
|
||||||
====================
|
|
||||||
- The new (cpsw_new.c) driver is operating in dual-emac mode by default, thus
|
- The new (cpsw_new.c) driver is operating in dual-emac mode by default, thus
|
||||||
working as 2 individual network interfaces. Main differences from legacy CPSW
|
working as 2 individual network interfaces. Main differences from legacy CPSW
|
||||||
driver are:
|
driver are:
|
||||||
|
|
||||||
- optimized promiscuous mode: The P0_UNI_FLOOD (both ports) is enabled in
|
- optimized promiscuous mode: The P0_UNI_FLOOD (both ports) is enabled in
|
||||||
addition to ALLMULTI (current port) instead of ALE_BYPASS.
|
addition to ALLMULTI (current port) instead of ALE_BYPASS.
|
||||||
So, Ports in promiscuous mode will keep possibility of mcast and vlan filtering,
|
So, Ports in promiscuous mode will keep possibility of mcast and vlan
|
||||||
which is provides significant benefits when ports are joined to the same bridge,
|
filtering, which is provides significant benefits when ports are joined
|
||||||
but without enabling "switch" mode, or to different bridges.
|
to the same bridge, but without enabling "switch" mode, or to different
|
||||||
|
bridges.
|
||||||
- learning disabled on ports as it make not too much sense for
|
- learning disabled on ports as it make not too much sense for
|
||||||
segregated ports - no forwarding in HW.
|
segregated ports - no forwarding in HW.
|
||||||
- enabled basic support for devlink.
|
- enabled basic support for devlink.
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
devlink dev show
|
devlink dev show
|
||||||
platform/48484000.switch
|
platform/48484000.switch
|
||||||
|
|
||||||
@@ -38,22 +52,25 @@ but without enabling "switch" mode, or to different bridges.
|
|||||||
cmode runtime value false
|
cmode runtime value false
|
||||||
|
|
||||||
Devlink configuration parameters
|
Devlink configuration parameters
|
||||||
====================
|
================================
|
||||||
|
|
||||||
See Documentation/networking/devlink/ti-cpsw-switch.rst
|
See Documentation/networking/devlink/ti-cpsw-switch.rst
|
||||||
|
|
||||||
====================
|
Bridging in dual mac mode
|
||||||
# Bridging in dual mac mode
|
=========================
|
||||||
====================
|
|
||||||
The dual_mac mode requires two vids to be reserved for internal purposes,
|
The dual_mac mode requires two vids to be reserved for internal purposes,
|
||||||
which, by default, equal CPSW Port numbers. As result, bridge has to be
|
which, by default, equal CPSW Port numbers. As result, bridge has to be
|
||||||
configured in vlan unaware mode or default_pvid has to be adjusted.
|
configured in vlan unaware mode or default_pvid has to be adjusted::
|
||||||
|
|
||||||
ip link add name br0 type bridge
|
ip link add name br0 type bridge
|
||||||
ip link set dev br0 type bridge vlan_filtering 0
|
ip link set dev br0 type bridge vlan_filtering 0
|
||||||
echo 0 > /sys/class/net/br0/bridge/default_pvid
|
echo 0 > /sys/class/net/br0/bridge/default_pvid
|
||||||
ip link set dev sw0p1 master br0
|
ip link set dev sw0p1 master br0
|
||||||
ip link set dev sw0p2 master br0
|
ip link set dev sw0p2 master br0
|
||||||
- or -
|
|
||||||
|
or::
|
||||||
|
|
||||||
ip link add name br0 type bridge
|
ip link add name br0 type bridge
|
||||||
ip link set dev br0 type bridge vlan_filtering 0
|
ip link set dev br0 type bridge vlan_filtering 0
|
||||||
echo 100 > /sys/class/net/br0/bridge/default_pvid
|
echo 100 > /sys/class/net/br0/bridge/default_pvid
|
||||||
@@ -61,11 +78,12 @@ configured in vlan unaware mode or default_pvid has to be adjusted.
|
|||||||
ip link set dev sw0p1 master br0
|
ip link set dev sw0p1 master br0
|
||||||
ip link set dev sw0p2 master br0
|
ip link set dev sw0p2 master br0
|
||||||
|
|
||||||
====================
|
Enabling "switch"
|
||||||
# Enabling "switch"
|
=================
|
||||||
====================
|
|
||||||
The Switch mode can be enabled by configuring devlink driver parameter
|
The Switch mode can be enabled by configuring devlink driver parameter
|
||||||
"switch_mode" to 1/true:
|
"switch_mode" to 1/true::
|
||||||
|
|
||||||
devlink dev param set platform/48484000.switch \
|
devlink dev param set platform/48484000.switch \
|
||||||
name switch_mode value 1 cmode runtime
|
name switch_mode value 1 cmode runtime
|
||||||
|
|
||||||
@@ -79,9 +97,11 @@ marking packets with offload_fwd_mark flag unless "ale_bypass=0"
|
|||||||
|
|
||||||
All configuration is implemented via switchdev API.
|
All configuration is implemented via switchdev API.
|
||||||
|
|
||||||
====================
|
Bridge setup
|
||||||
# Bridge setup
|
============
|
||||||
====================
|
|
||||||
|
::
|
||||||
|
|
||||||
devlink dev param set platform/48484000.switch \
|
devlink dev param set platform/48484000.switch \
|
||||||
name switch_mode value 1 cmode runtime
|
name switch_mode value 1 cmode runtime
|
||||||
|
|
||||||
@@ -91,56 +111,65 @@ All configuration is implemented via switchdev API.
|
|||||||
ip link set dev sw0p2 up
|
ip link set dev sw0p2 up
|
||||||
ip link set dev sw0p1 master br0
|
ip link set dev sw0p1 master br0
|
||||||
ip link set dev sw0p2 master br0
|
ip link set dev sw0p2 master br0
|
||||||
|
|
||||||
[*] bridge vlan add dev br0 vid 1 pvid untagged self
|
[*] bridge vlan add dev br0 vid 1 pvid untagged self
|
||||||
|
|
||||||
[*] if vlan_filtering=1. where default_pvid=1
|
[*] if vlan_filtering=1. where default_pvid=1
|
||||||
|
|
||||||
=================
|
Note. Steps [*] are mandatory.
|
||||||
# On/off STP
|
|
||||||
=================
|
|
||||||
ip link set dev BRDEV type bridge stp_state 1/0
|
|
||||||
|
|
||||||
Note. Steps [*] are mandatory.
|
|
||||||
|
|
||||||
====================
|
On/off STP
|
||||||
# VLAN configuration
|
==========
|
||||||
====================
|
|
||||||
bridge vlan add dev br0 vid 1 pvid untagged self <---- add cpu port to VLAN 1
|
::
|
||||||
|
|
||||||
|
ip link set dev BRDEV type bridge stp_state 1/0
|
||||||
|
|
||||||
|
VLAN configuration
|
||||||
|
==================
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
bridge vlan add dev br0 vid 1 pvid untagged self <---- add cpu port to VLAN 1
|
||||||
|
|
||||||
Note. This step is mandatory for bridge/default_pvid.
|
Note. This step is mandatory for bridge/default_pvid.
|
||||||
|
|
||||||
=================
|
Add extra VLANs
|
||||||
# Add extra VLANs
|
===============
|
||||||
=================
|
|
||||||
1. untagged:
|
1. untagged::
|
||||||
|
|
||||||
bridge vlan add dev sw0p1 vid 100 pvid untagged master
|
bridge vlan add dev sw0p1 vid 100 pvid untagged master
|
||||||
bridge vlan add dev sw0p2 vid 100 pvid untagged master
|
bridge vlan add dev sw0p2 vid 100 pvid untagged master
|
||||||
bridge vlan add dev br0 vid 100 pvid untagged self <---- Add cpu port to VLAN100
|
bridge vlan add dev br0 vid 100 pvid untagged self <---- Add cpu port to VLAN100
|
||||||
|
|
||||||
2. tagged:
|
2. tagged::
|
||||||
|
|
||||||
bridge vlan add dev sw0p1 vid 100 master
|
bridge vlan add dev sw0p1 vid 100 master
|
||||||
bridge vlan add dev sw0p2 vid 100 master
|
bridge vlan add dev sw0p2 vid 100 master
|
||||||
bridge vlan add dev br0 vid 100 pvid tagged self <---- Add cpu port to VLAN100
|
bridge vlan add dev br0 vid 100 pvid tagged self <---- Add cpu port to VLAN100
|
||||||
|
|
||||||
====
|
|
||||||
FDBs
|
FDBs
|
||||||
====
|
----
|
||||||
|
|
||||||
FDBs are automatically added on the appropriate switch port upon detection
|
FDBs are automatically added on the appropriate switch port upon detection
|
||||||
|
|
||||||
Manually adding FDBs:
|
Manually adding FDBs::
|
||||||
bridge fdb add aa:bb:cc:dd:ee:ff dev sw0p1 master vlan 100
|
|
||||||
bridge fdb add aa:bb:cc:dd:ee:fe dev sw0p2 master <---- Add on all VLANs
|
bridge fdb add aa:bb:cc:dd:ee:ff dev sw0p1 master vlan 100
|
||||||
|
bridge fdb add aa:bb:cc:dd:ee:fe dev sw0p2 master <---- Add on all VLANs
|
||||||
|
|
||||||
====
|
|
||||||
MDBs
|
MDBs
|
||||||
====
|
----
|
||||||
|
|
||||||
MDBs are automatically added on the appropriate switch port upon detection
|
MDBs are automatically added on the appropriate switch port upon detection
|
||||||
|
|
||||||
Manually adding MDBs:
|
Manually adding MDBs::
|
||||||
bridge mdb add dev br0 port sw0p1 grp 239.1.1.1 permanent vid 100
|
|
||||||
bridge mdb add dev br0 port sw0p1 grp 239.1.1.1 permanent <---- Add on all VLANs
|
bridge mdb add dev br0 port sw0p1 grp 239.1.1.1 permanent vid 100
|
||||||
|
bridge mdb add dev br0 port sw0p1 grp 239.1.1.1 permanent <---- Add on all VLANs
|
||||||
|
|
||||||
==================
|
|
||||||
Multicast flooding
|
Multicast flooding
|
||||||
==================
|
==================
|
||||||
CPU port mcast_flooding is always on
|
CPU port mcast_flooding is always on
|
||||||
@@ -148,9 +177,11 @@ CPU port mcast_flooding is always on
|
|||||||
Turning flooding on/off on swithch ports:
|
Turning flooding on/off on swithch ports:
|
||||||
bridge link set dev sw0p1 mcast_flood on/off
|
bridge link set dev sw0p1 mcast_flood on/off
|
||||||
|
|
||||||
==================
|
|
||||||
Access and Trunk port
|
Access and Trunk port
|
||||||
==================
|
=====================
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
bridge vlan add dev sw0p1 vid 100 pvid untagged master
|
bridge vlan add dev sw0p1 vid 100 pvid untagged master
|
||||||
bridge vlan add dev sw0p2 vid 100 master
|
bridge vlan add dev sw0p2 vid 100 master
|
||||||
|
|
||||||
@@ -158,23 +189,24 @@ Access and Trunk port
|
|||||||
bridge vlan add dev br0 vid 100 self
|
bridge vlan add dev br0 vid 100 self
|
||||||
ip link add link br0 name br0.100 type vlan id 100
|
ip link add link br0 name br0.100 type vlan id 100
|
||||||
|
|
||||||
Note. Setting PVID on Bridge device itself working only for
|
Note. Setting PVID on Bridge device itself working only for
|
||||||
default VLAN (default_pvid).
|
default VLAN (default_pvid).
|
||||||
|
|
||||||
|
NFS
|
||||||
|
===
|
||||||
|
|
||||||
=====================
|
|
||||||
NFS
|
|
||||||
=====================
|
|
||||||
The only way for NFS to work is by chrooting to a minimal environment when
|
The only way for NFS to work is by chrooting to a minimal environment when
|
||||||
switch configuration that will affect connectivity is needed.
|
switch configuration that will affect connectivity is needed.
|
||||||
Assuming you are booting NFS with eth1 interface(the script is hacky and
|
Assuming you are booting NFS with eth1 interface(the script is hacky and
|
||||||
it's just there to prove NFS is doable).
|
it's just there to prove NFS is doable).
|
||||||
|
|
||||||
setup.sh:
|
setup.sh::
|
||||||
#!/bin/sh
|
|
||||||
mkdir proc
|
#!/bin/sh
|
||||||
mount -t proc none /proc
|
mkdir proc
|
||||||
ifconfig br0 > /dev/null
|
mount -t proc none /proc
|
||||||
if [ $? -ne 0 ]; then
|
ifconfig br0 > /dev/null
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
echo "Setting up bridge"
|
echo "Setting up bridge"
|
||||||
ip link add name br0 type bridge
|
ip link add name br0 type bridge
|
||||||
ip link set dev br0 type bridge ageing_time 1000
|
ip link set dev br0 type bridge ageing_time 1000
|
||||||
@@ -189,21 +221,22 @@ if [ $? -ne 0 ]; then
|
|||||||
bridge vlan add dev br0 vid 1 pvid untagged self
|
bridge vlan add dev br0 vid 1 pvid untagged self
|
||||||
ifconfig sw0p1 0.0.0.0
|
ifconfig sw0p1 0.0.0.0
|
||||||
udhchc -i br0
|
udhchc -i br0
|
||||||
fi
|
fi
|
||||||
umount /proc
|
umount /proc
|
||||||
|
|
||||||
run_nfs.sh:
|
run_nfs.sh:::
|
||||||
#!/bin/sh
|
|
||||||
mkdir /tmp/root/bin -p
|
|
||||||
mkdir /tmp/root/lib -p
|
|
||||||
|
|
||||||
cp -r /lib/ /tmp/root/
|
#!/bin/sh
|
||||||
cp -r /bin/ /tmp/root/
|
mkdir /tmp/root/bin -p
|
||||||
cp /sbin/ip /tmp/root/bin
|
mkdir /tmp/root/lib -p
|
||||||
cp /sbin/bridge /tmp/root/bin
|
|
||||||
cp /sbin/ifconfig /tmp/root/bin
|
|
||||||
cp /sbin/udhcpc /tmp/root/bin
|
|
||||||
cp /path/to/setup.sh /tmp/root/bin
|
|
||||||
chroot /tmp/root/ busybox sh /bin/setup.sh
|
|
||||||
|
|
||||||
run ./run_nfs.sh
|
cp -r /lib/ /tmp/root/
|
||||||
|
cp -r /bin/ /tmp/root/
|
||||||
|
cp /sbin/ip /tmp/root/bin
|
||||||
|
cp /sbin/bridge /tmp/root/bin
|
||||||
|
cp /sbin/ifconfig /tmp/root/bin
|
||||||
|
cp /sbin/udhcpc /tmp/root/bin
|
||||||
|
cp /path/to/setup.sh /tmp/root/bin
|
||||||
|
chroot /tmp/root/ busybox sh /bin/setup.sh
|
||||||
|
|
||||||
|
run ./run_nfs.sh
|
@@ -1,20 +1,33 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=====================
|
||||||
|
TLAN driver for Linux
|
||||||
|
=====================
|
||||||
|
|
||||||
|
:Version: 1.14a
|
||||||
|
|
||||||
(C) 1997-1998 Caldera, Inc.
|
(C) 1997-1998 Caldera, Inc.
|
||||||
|
|
||||||
(C) 1998 James Banks
|
(C) 1998 James Banks
|
||||||
|
|
||||||
(C) 1999-2001 Torben Mathiasen <tmm@image.dk, torben.mathiasen@compaq.com>
|
(C) 1999-2001 Torben Mathiasen <tmm@image.dk, torben.mathiasen@compaq.com>
|
||||||
|
|
||||||
For driver information/updates visit http://www.compaq.com
|
For driver information/updates visit http://www.compaq.com
|
||||||
|
|
||||||
|
|
||||||
TLAN driver for Linux, version 1.14a
|
|
||||||
README
|
|
||||||
|
|
||||||
|
|
||||||
I. Supported Devices.
|
|
||||||
|
I. Supported Devices
|
||||||
|
====================
|
||||||
|
|
||||||
Only PCI devices will work with this driver.
|
Only PCI devices will work with this driver.
|
||||||
|
|
||||||
Supported:
|
Supported:
|
||||||
|
|
||||||
|
========= ========= ===========================================
|
||||||
Vendor ID Device ID Name
|
Vendor ID Device ID Name
|
||||||
|
========= ========= ===========================================
|
||||||
0e11 ae32 Compaq Netelligent 10/100 TX PCI UTP
|
0e11 ae32 Compaq Netelligent 10/100 TX PCI UTP
|
||||||
0e11 ae34 Compaq Netelligent 10 T PCI UTP
|
0e11 ae34 Compaq Netelligent 10 T PCI UTP
|
||||||
0e11 ae35 Compaq Integrated NetFlex 3/P
|
0e11 ae35 Compaq Integrated NetFlex 3/P
|
||||||
@@ -28,6 +41,7 @@ I. Supported Devices.
|
|||||||
108d 0012 Olicom OC-2325
|
108d 0012 Olicom OC-2325
|
||||||
108d 0013 Olicom OC-2183
|
108d 0013 Olicom OC-2183
|
||||||
108d 0014 Olicom OC-2326
|
108d 0014 Olicom OC-2326
|
||||||
|
========= ========= ===========================================
|
||||||
|
|
||||||
|
|
||||||
Caveats:
|
Caveats:
|
||||||
@@ -44,14 +58,18 @@ I. Supported Devices.
|
|||||||
|
|
||||||
|
|
||||||
II. Driver Options
|
II. Driver Options
|
||||||
|
==================
|
||||||
|
|
||||||
1. You can append debug=x to the end of the insmod line to get
|
1. You can append debug=x to the end of the insmod line to get
|
||||||
debug messages, where x is a bit field where the bits mean
|
debug messages, where x is a bit field where the bits mean
|
||||||
the following:
|
the following:
|
||||||
|
|
||||||
|
==== =====================================
|
||||||
0x01 Turn on general debugging messages.
|
0x01 Turn on general debugging messages.
|
||||||
0x02 Turn on receive debugging messages.
|
0x02 Turn on receive debugging messages.
|
||||||
0x04 Turn on transmit debugging messages.
|
0x04 Turn on transmit debugging messages.
|
||||||
0x08 Turn on list debugging messages.
|
0x08 Turn on list debugging messages.
|
||||||
|
==== =====================================
|
||||||
|
|
||||||
2. You can append aui=1 to the end of the insmod line to cause
|
2. You can append aui=1 to the end of the insmod line to cause
|
||||||
the adapter to use the AUI interface instead of the 10 Base T
|
the adapter to use the AUI interface instead of the 10 Base T
|
||||||
@@ -75,7 +93,7 @@ II. Driver Options
|
|||||||
|
|
||||||
6. If the driver is built into the kernel, you can use the 3rd
|
6. If the driver is built into the kernel, you can use the 3rd
|
||||||
and 4th parameters to set aui and debug respectively. For
|
and 4th parameters to set aui and debug respectively. For
|
||||||
example:
|
example::
|
||||||
|
|
||||||
ether=0,0,0x1,0x7,eth0
|
ether=0,0,0x1,0x7,eth0
|
||||||
|
|
||||||
@@ -84,11 +102,13 @@ II. Driver Options
|
|||||||
|
|
||||||
The bits in the third byte are assigned as follows:
|
The bits in the third byte are assigned as follows:
|
||||||
|
|
||||||
0x01 = aui
|
==== ===============
|
||||||
0x02 = use half duplex
|
0x01 aui
|
||||||
0x04 = use full duplex
|
0x02 use half duplex
|
||||||
0x08 = use 10BaseT
|
0x04 use full duplex
|
||||||
0x10 = use 100BaseTx
|
0x08 use 10BaseT
|
||||||
|
0x10 use 100BaseTx
|
||||||
|
==== ===============
|
||||||
|
|
||||||
You also need to set both speed and duplex settings when forcing
|
You also need to set both speed and duplex settings when forcing
|
||||||
speeds with kernel-parameters.
|
speeds with kernel-parameters.
|
||||||
@@ -96,7 +116,7 @@ II. Driver Options
|
|||||||
|
|
||||||
7. If you have more than one tlan adapter in your system, you can
|
7. If you have more than one tlan adapter in your system, you can
|
||||||
use the above options on a per adapter basis. To force a 100Mbit/HD
|
use the above options on a per adapter basis. To force a 100Mbit/HD
|
||||||
link with your eth1 adapter use:
|
link with your eth1 adapter use::
|
||||||
|
|
||||||
insmod tlan speed=0,100 duplex=0,1
|
insmod tlan speed=0,100 duplex=0,1
|
||||||
|
|
||||||
@@ -104,7 +124,9 @@ II. Driver Options
|
|||||||
Note that the tlan driver supports a maximum of 8 adapters.
|
Note that the tlan driver supports a maximum of 8 adapters.
|
||||||
|
|
||||||
|
|
||||||
III. Things to try if you have problems.
|
III. Things to try if you have problems
|
||||||
|
=======================================
|
||||||
|
|
||||||
1. Make sure your card's PCI id is among those listed in
|
1. Make sure your card's PCI id is among those listed in
|
||||||
section I, above.
|
section I, above.
|
||||||
2. Make sure routing is correct.
|
2. Make sure routing is correct.
|
||||||
@@ -113,5 +135,6 @@ III. Things to try if you have problems.
|
|||||||
|
|
||||||
There is also a tlan mailing list which you can join by sending "subscribe tlan"
|
There is also a tlan mailing list which you can join by sending "subscribe tlan"
|
||||||
in the body of an email to majordomo@vuser.vu.union.edu.
|
in the body of an email to majordomo@vuser.vu.union.edu.
|
||||||
|
|
||||||
There is also a tlan website at http://www.compaq.com
|
There is also a tlan website at http://www.compaq.com
|
||||||
|
|
@@ -1,6 +1,8 @@
|
|||||||
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
The Spidernet Device Driver
|
===========================
|
||||||
===========================
|
The Spidernet Device Driver
|
||||||
|
===========================
|
||||||
|
|
||||||
Written by Linas Vepstas <linas@austin.ibm.com>
|
Written by Linas Vepstas <linas@austin.ibm.com>
|
||||||
|
|
||||||
@@ -78,15 +80,15 @@ GDACTDPA, tail and head pointers. It will also summarize the contents
|
|||||||
of the ring, starting at the tail pointer, and listing the status
|
of the ring, starting at the tail pointer, and listing the status
|
||||||
of the descrs that follow.
|
of the descrs that follow.
|
||||||
|
|
||||||
A typical example of the output, for a nearly idle system, might be
|
A typical example of the output, for a nearly idle system, might be::
|
||||||
|
|
||||||
net eth1: Total number of descrs=256
|
net eth1: Total number of descrs=256
|
||||||
net eth1: Chain tail located at descr=20
|
net eth1: Chain tail located at descr=20
|
||||||
net eth1: Chain head is at 20
|
net eth1: Chain head is at 20
|
||||||
net eth1: HW curr desc (GDACTDPA) is at 21
|
net eth1: HW curr desc (GDACTDPA) is at 21
|
||||||
net eth1: Have 1 descrs with stat=x40800101
|
net eth1: Have 1 descrs with stat=x40800101
|
||||||
net eth1: HW next desc (GDACNEXTDA) is at 22
|
net eth1: HW next desc (GDACNEXTDA) is at 22
|
||||||
net eth1: Last 255 descrs with stat=xa0800000
|
net eth1: Last 255 descrs with stat=xa0800000
|
||||||
|
|
||||||
In the above, the hardware has filled in one descr, number 20. Both
|
In the above, the hardware has filled in one descr, number 20. Both
|
||||||
head and tail are pointing at 20, because it has not yet been emptied.
|
head and tail are pointing at 20, because it has not yet been emptied.
|
||||||
@@ -101,11 +103,11 @@ The status x4... corresponds to "full" and status xa... corresponds
|
|||||||
to "empty". The actual value printed is RXCOMST_A.
|
to "empty". The actual value printed is RXCOMST_A.
|
||||||
|
|
||||||
In the device driver source code, a different set of names are
|
In the device driver source code, a different set of names are
|
||||||
used for these same concepts, so that
|
used for these same concepts, so that::
|
||||||
|
|
||||||
"empty" == SPIDER_NET_DESCR_CARDOWNED == 0xa
|
"empty" == SPIDER_NET_DESCR_CARDOWNED == 0xa
|
||||||
"full" == SPIDER_NET_DESCR_FRAME_END == 0x4
|
"full" == SPIDER_NET_DESCR_FRAME_END == 0x4
|
||||||
"not in use" == SPIDER_NET_DESCR_NOT_IN_USE == 0xf
|
"not in use" == SPIDER_NET_DESCR_NOT_IN_USE == 0xf
|
||||||
|
|
||||||
|
|
||||||
The RX RAM full bug/feature
|
The RX RAM full bug/feature
|
||||||
@@ -137,19 +139,19 @@ while the hardware is waiting for a different set of descrs to become
|
|||||||
empty.
|
empty.
|
||||||
|
|
||||||
A call to show_rx_chain() at this point indicates the nature of the
|
A call to show_rx_chain() at this point indicates the nature of the
|
||||||
problem. A typical print when the network is hung shows the following:
|
problem. A typical print when the network is hung shows the following::
|
||||||
|
|
||||||
net eth1: Spider RX RAM full, incoming packets might be discarded!
|
net eth1: Spider RX RAM full, incoming packets might be discarded!
|
||||||
net eth1: Total number of descrs=256
|
net eth1: Total number of descrs=256
|
||||||
net eth1: Chain tail located at descr=255
|
net eth1: Chain tail located at descr=255
|
||||||
net eth1: Chain head is at 255
|
net eth1: Chain head is at 255
|
||||||
net eth1: HW curr desc (GDACTDPA) is at 0
|
net eth1: HW curr desc (GDACTDPA) is at 0
|
||||||
net eth1: Have 1 descrs with stat=xa0800000
|
net eth1: Have 1 descrs with stat=xa0800000
|
||||||
net eth1: HW next desc (GDACNEXTDA) is at 1
|
net eth1: HW next desc (GDACNEXTDA) is at 1
|
||||||
net eth1: Have 127 descrs with stat=x40800101
|
net eth1: Have 127 descrs with stat=x40800101
|
||||||
net eth1: Have 1 descrs with stat=x40800001
|
net eth1: Have 1 descrs with stat=x40800001
|
||||||
net eth1: Have 126 descrs with stat=x40800101
|
net eth1: Have 126 descrs with stat=x40800101
|
||||||
net eth1: Last 1 descrs with stat=xa0800000
|
net eth1: Last 1 descrs with stat=xa0800000
|
||||||
|
|
||||||
Both the tail and head pointers are pointing at descr 255, which is
|
Both the tail and head pointers are pointing at descr 255, which is
|
||||||
marked xa... which is "empty". Thus, from the OS point of view, there
|
marked xa... which is "empty". Thus, from the OS point of view, there
|
||||||
@@ -198,7 +200,3 @@ For large packets, this mechanism generates a relatively small number
|
|||||||
of interrupts, about 1K/sec. For smaller packets, this will drop to zero
|
of interrupts, about 1K/sec. For smaller packets, this will drop to zero
|
||||||
interrupts, as the hardware can empty the queue faster than the kernel
|
interrupts, as the hardware can empty the queue faster than the kernel
|
||||||
can fill it.
|
can fill it.
|
||||||
|
|
||||||
|
|
||||||
======= END OF DOCUMENT ========
|
|
||||||
|
|
27
Documentation/networking/devlink-params-sja1105.txt
Normal file
27
Documentation/networking/devlink-params-sja1105.txt
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
best_effort_vlan_filtering
|
||||||
|
[DEVICE, DRIVER-SPECIFIC]
|
||||||
|
Allow plain ETH_P_8021Q headers to be used as DSA tags.
|
||||||
|
Benefits:
|
||||||
|
- Can terminate untagged traffic over switch net
|
||||||
|
devices even when enslaved to a bridge with
|
||||||
|
vlan_filtering=1.
|
||||||
|
- Can terminate VLAN-tagged traffic over switch net
|
||||||
|
devices even when enslaved to a bridge with
|
||||||
|
vlan_filtering=1, with some constraints (no more than
|
||||||
|
7 non-pvid VLANs per user port).
|
||||||
|
- Can do QoS based on VLAN PCP and VLAN membership
|
||||||
|
admission control for autonomously forwarded frames
|
||||||
|
(regardless of whether they can be terminated on the
|
||||||
|
CPU or not).
|
||||||
|
Drawbacks:
|
||||||
|
- User cannot use VLANs in range 1024-3071. If the
|
||||||
|
switch receives frames with such VIDs, it will
|
||||||
|
misinterpret them as DSA tags.
|
||||||
|
- Switch uses Shared VLAN Learning (FDB lookup uses
|
||||||
|
only DMAC as key).
|
||||||
|
- When VLANs span cross-chip topologies, the total
|
||||||
|
number of permitted VLANs may be less than 7 per
|
||||||
|
port, due to a maximum number of 32 VLAN retagging
|
||||||
|
rules per switch.
|
||||||
|
Configuration mode: runtime
|
||||||
|
Type: bool.
|
@@ -14,6 +14,10 @@ Region snapshots are collected by the driver, and can be accessed via read
|
|||||||
or dump commands. This allows future analysis on the created snapshots.
|
or dump commands. This allows future analysis on the created snapshots.
|
||||||
Regions may optionally support triggering snapshots on demand.
|
Regions may optionally support triggering snapshots on demand.
|
||||||
|
|
||||||
|
Snapshot identifiers are scoped to the devlink instance, not a region.
|
||||||
|
All snapshots with the same snapshot id within a devlink instance
|
||||||
|
correspond to the same event.
|
||||||
|
|
||||||
The major benefit to creating a region is to provide access to internal
|
The major benefit to creating a region is to provide access to internal
|
||||||
address regions that are otherwise inaccessible to the user.
|
address regions that are otherwise inaccessible to the user.
|
||||||
|
|
||||||
@@ -23,7 +27,9 @@ states, but see also :doc:`devlink-health`
|
|||||||
Regions may optionally support capturing a snapshot on demand via the
|
Regions may optionally support capturing a snapshot on demand via the
|
||||||
``DEVLINK_CMD_REGION_NEW`` netlink message. A driver wishing to allow
|
``DEVLINK_CMD_REGION_NEW`` netlink message. A driver wishing to allow
|
||||||
requested snapshots must implement the ``.snapshot`` callback for the region
|
requested snapshots must implement the ``.snapshot`` callback for the region
|
||||||
in its ``devlink_region_ops`` structure.
|
in its ``devlink_region_ops`` structure. If snapshot id is not set in
|
||||||
|
the ``DEVLINK_CMD_REGION_NEW`` request kernel will allocate one and send
|
||||||
|
the snapshot information to user space.
|
||||||
|
|
||||||
example usage
|
example usage
|
||||||
-------------
|
-------------
|
||||||
@@ -45,7 +51,8 @@ example usage
|
|||||||
$ devlink region del pci/0000:00:05.0/cr-space snapshot 1
|
$ devlink region del pci/0000:00:05.0/cr-space snapshot 1
|
||||||
|
|
||||||
# Request an immediate snapshot, if supported by the region
|
# Request an immediate snapshot, if supported by the region
|
||||||
$ devlink region new pci/0000:00:05.0/cr-space snapshot 5
|
$ devlink region new pci/0000:00:05.0/cr-space
|
||||||
|
pci/0000:00:05.0/cr-space: snapshot 5
|
||||||
|
|
||||||
# Dump a snapshot:
|
# Dump a snapshot:
|
||||||
$ devlink region dump pci/0000:00:05.0/fw-health snapshot 1
|
$ devlink region dump pci/0000:00:05.0/fw-health snapshot 1
|
||||||
|
@@ -55,7 +55,7 @@ The following diagram provides a general overview of ``devlink-trap``::
|
|||||||
| |
|
| |
|
||||||
+-------^--------+
|
+-------^--------+
|
||||||
|
|
|
|
||||||
|
|
| Non-control traps
|
||||||
|
|
|
|
||||||
+----+----+
|
+----+----+
|
||||||
| | Kernel's Rx path
|
| | Kernel's Rx path
|
||||||
@@ -97,6 +97,12 @@ The ``devlink-trap`` mechanism supports the following packet trap types:
|
|||||||
processed by ``devlink`` and injected to the kernel's Rx path. Changing the
|
processed by ``devlink`` and injected to the kernel's Rx path. Changing the
|
||||||
action of such traps is not allowed, as it can easily break the control
|
action of such traps is not allowed, as it can easily break the control
|
||||||
plane.
|
plane.
|
||||||
|
* ``control``: Trapped packets were trapped by the device because these are
|
||||||
|
control packets required for the correct functioning of the control plane.
|
||||||
|
For example, ARP request and IGMP query packets. Packets are injected to
|
||||||
|
the kernel's Rx path, but not reported to the kernel's drop monitor.
|
||||||
|
Changing the action of such traps is not allowed, as it can easily break
|
||||||
|
the control plane.
|
||||||
|
|
||||||
.. _Trap-Actions:
|
.. _Trap-Actions:
|
||||||
|
|
||||||
@@ -108,6 +114,8 @@ The ``devlink-trap`` mechanism supports the following packet trap actions:
|
|||||||
* ``trap``: The sole copy of the packet is sent to the CPU.
|
* ``trap``: The sole copy of the packet is sent to the CPU.
|
||||||
* ``drop``: The packet is dropped by the underlying device and a copy is not
|
* ``drop``: The packet is dropped by the underlying device and a copy is not
|
||||||
sent to the CPU.
|
sent to the CPU.
|
||||||
|
* ``mirror``: The packet is forwarded by the underlying device and a copy is
|
||||||
|
sent to the CPU.
|
||||||
|
|
||||||
Generic Packet Traps
|
Generic Packet Traps
|
||||||
====================
|
====================
|
||||||
@@ -244,6 +252,159 @@ be added to the following table:
|
|||||||
* - ``egress_flow_action_drop``
|
* - ``egress_flow_action_drop``
|
||||||
- ``drop``
|
- ``drop``
|
||||||
- Traps packets dropped during processing of egress flow action drop
|
- Traps packets dropped during processing of egress flow action drop
|
||||||
|
* - ``stp``
|
||||||
|
- ``control``
|
||||||
|
- Traps STP packets
|
||||||
|
* - ``lacp``
|
||||||
|
- ``control``
|
||||||
|
- Traps LACP packets
|
||||||
|
* - ``lldp``
|
||||||
|
- ``control``
|
||||||
|
- Traps LLDP packets
|
||||||
|
* - ``igmp_query``
|
||||||
|
- ``control``
|
||||||
|
- Traps IGMP Membership Query packets
|
||||||
|
* - ``igmp_v1_report``
|
||||||
|
- ``control``
|
||||||
|
- Traps IGMP Version 1 Membership Report packets
|
||||||
|
* - ``igmp_v2_report``
|
||||||
|
- ``control``
|
||||||
|
- Traps IGMP Version 2 Membership Report packets
|
||||||
|
* - ``igmp_v3_report``
|
||||||
|
- ``control``
|
||||||
|
- Traps IGMP Version 3 Membership Report packets
|
||||||
|
* - ``igmp_v2_leave``
|
||||||
|
- ``control``
|
||||||
|
- Traps IGMP Version 2 Leave Group packets
|
||||||
|
* - ``mld_query``
|
||||||
|
- ``control``
|
||||||
|
- Traps MLD Multicast Listener Query packets
|
||||||
|
* - ``mld_v1_report``
|
||||||
|
- ``control``
|
||||||
|
- Traps MLD Version 1 Multicast Listener Report packets
|
||||||
|
* - ``mld_v2_report``
|
||||||
|
- ``control``
|
||||||
|
- Traps MLD Version 2 Multicast Listener Report packets
|
||||||
|
* - ``mld_v1_done``
|
||||||
|
- ``control``
|
||||||
|
- Traps MLD Version 1 Multicast Listener Done packets
|
||||||
|
* - ``ipv4_dhcp``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv4 DHCP packets
|
||||||
|
* - ``ipv6_dhcp``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 DHCP packets
|
||||||
|
* - ``arp_request``
|
||||||
|
- ``control``
|
||||||
|
- Traps ARP request packets
|
||||||
|
* - ``arp_response``
|
||||||
|
- ``control``
|
||||||
|
- Traps ARP response packets
|
||||||
|
* - ``arp_overlay``
|
||||||
|
- ``control``
|
||||||
|
- Traps NVE-decapsulated ARP packets that reached the overlay network.
|
||||||
|
This is required, for example, when the address that needs to be
|
||||||
|
resolved is a local address
|
||||||
|
* - ``ipv6_neigh_solicit``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 Neighbour Solicitation packets
|
||||||
|
* - ``ipv6_neigh_advert``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 Neighbour Advertisement packets
|
||||||
|
* - ``ipv4_bfd``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv4 BFD packets
|
||||||
|
* - ``ipv6_bfd``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 BFD packets
|
||||||
|
* - ``ipv4_ospf``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv4 OSPF packets
|
||||||
|
* - ``ipv6_ospf``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 OSPF packets
|
||||||
|
* - ``ipv4_bgp``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv4 BGP packets
|
||||||
|
* - ``ipv6_bgp``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 BGP packets
|
||||||
|
* - ``ipv4_vrrp``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv4 VRRP packets
|
||||||
|
* - ``ipv6_vrrp``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 VRRP packets
|
||||||
|
* - ``ipv4_pim``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv4 PIM packets
|
||||||
|
* - ``ipv6_pim``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 PIM packets
|
||||||
|
* - ``uc_loopback``
|
||||||
|
- ``control``
|
||||||
|
- Traps unicast packets that need to be routed through the same layer 3
|
||||||
|
interface from which they were received. Such packets are routed by the
|
||||||
|
kernel, but also cause it to potentially generate ICMP redirect packets
|
||||||
|
* - ``local_route``
|
||||||
|
- ``control``
|
||||||
|
- Traps unicast packets that hit a local route and need to be locally
|
||||||
|
delivered
|
||||||
|
* - ``external_route``
|
||||||
|
- ``control``
|
||||||
|
- Traps packets that should be routed through an external interface (e.g.,
|
||||||
|
management interface) that does not belong to the same device (e.g.,
|
||||||
|
switch ASIC) as the ingress interface
|
||||||
|
* - ``ipv6_uc_dip_link_local_scope``
|
||||||
|
- ``control``
|
||||||
|
- Traps unicast IPv6 packets that need to be routed and have a destination
|
||||||
|
IP address with a link-local scope (i.e., fe80::/10). The trap allows
|
||||||
|
device drivers to avoid programming link-local routes, but still receive
|
||||||
|
packets for local delivery
|
||||||
|
* - ``ipv6_dip_all_nodes``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 packets that their destination IP address is the "All Nodes
|
||||||
|
Address" (i.e., ff02::1)
|
||||||
|
* - ``ipv6_dip_all_routers``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 packets that their destination IP address is the "All Routers
|
||||||
|
Address" (i.e., ff02::2)
|
||||||
|
* - ``ipv6_router_solicit``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 Router Solicitation packets
|
||||||
|
* - ``ipv6_router_advert``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 Router Advertisement packets
|
||||||
|
* - ``ipv6_redirect``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 Redirect Message packets
|
||||||
|
* - ``ipv4_router_alert``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv4 packets that need to be routed and include the Router Alert
|
||||||
|
option. Such packets need to be locally delivered to raw sockets that
|
||||||
|
have the IP_ROUTER_ALERT socket option set
|
||||||
|
* - ``ipv6_router_alert``
|
||||||
|
- ``control``
|
||||||
|
- Traps IPv6 packets that need to be routed and include the Router Alert
|
||||||
|
option in their Hop-by-Hop extension header. Such packets need to be
|
||||||
|
locally delivered to raw sockets that have the IPV6_ROUTER_ALERT socket
|
||||||
|
option set
|
||||||
|
* - ``ptp_event``
|
||||||
|
- ``control``
|
||||||
|
- Traps PTP time-critical event messages (Sync, Delay_req, Pdelay_Req and
|
||||||
|
Pdelay_Resp)
|
||||||
|
* - ``ptp_general``
|
||||||
|
- ``control``
|
||||||
|
- Traps PTP general messages (Announce, Follow_Up, Delay_Resp,
|
||||||
|
Pdelay_Resp_Follow_Up, management and signaling)
|
||||||
|
* - ``flow_action_sample``
|
||||||
|
- ``control``
|
||||||
|
- Traps packets sampled during processing of flow action sample (e.g., via
|
||||||
|
tc's sample action)
|
||||||
|
* - ``flow_action_trap``
|
||||||
|
- ``control``
|
||||||
|
- Traps packets logged during processing of flow action trap (e.g., via
|
||||||
|
tc's trap action)
|
||||||
|
|
||||||
Driver-specific Packet Traps
|
Driver-specific Packet Traps
|
||||||
============================
|
============================
|
||||||
@@ -277,8 +438,11 @@ narrow. The description of these groups must be added to the following table:
|
|||||||
- Contains packet traps for packets that were dropped by the device during
|
- Contains packet traps for packets that were dropped by the device during
|
||||||
layer 2 forwarding (i.e., bridge)
|
layer 2 forwarding (i.e., bridge)
|
||||||
* - ``l3_drops``
|
* - ``l3_drops``
|
||||||
- Contains packet traps for packets that were dropped by the device or hit
|
- Contains packet traps for packets that were dropped by the device during
|
||||||
an exception (e.g., TTL error) during layer 3 forwarding
|
layer 3 forwarding
|
||||||
|
* - ``l3_exceptions``
|
||||||
|
- Contains packet traps for packets that hit an exception (e.g., TTL
|
||||||
|
error) during layer 3 forwarding
|
||||||
* - ``buffer_drops``
|
* - ``buffer_drops``
|
||||||
- Contains packet traps for packets that were dropped by the device due to
|
- Contains packet traps for packets that were dropped by the device due to
|
||||||
an enqueue decision
|
an enqueue decision
|
||||||
@@ -288,6 +452,55 @@ narrow. The description of these groups must be added to the following table:
|
|||||||
* - ``acl_drops``
|
* - ``acl_drops``
|
||||||
- Contains packet traps for packets that were dropped by the device during
|
- Contains packet traps for packets that were dropped by the device during
|
||||||
ACL processing
|
ACL processing
|
||||||
|
* - ``stp``
|
||||||
|
- Contains packet traps for STP packets
|
||||||
|
* - ``lacp``
|
||||||
|
- Contains packet traps for LACP packets
|
||||||
|
* - ``lldp``
|
||||||
|
- Contains packet traps for LLDP packets
|
||||||
|
* - ``mc_snooping``
|
||||||
|
- Contains packet traps for IGMP and MLD packets required for multicast
|
||||||
|
snooping
|
||||||
|
* - ``dhcp``
|
||||||
|
- Contains packet traps for DHCP packets
|
||||||
|
* - ``neigh_discovery``
|
||||||
|
- Contains packet traps for neighbour discovery packets (e.g., ARP, IPv6
|
||||||
|
ND)
|
||||||
|
* - ``bfd``
|
||||||
|
- Contains packet traps for BFD packets
|
||||||
|
* - ``ospf``
|
||||||
|
- Contains packet traps for OSPF packets
|
||||||
|
* - ``bgp``
|
||||||
|
- Contains packet traps for BGP packets
|
||||||
|
* - ``vrrp``
|
||||||
|
- Contains packet traps for VRRP packets
|
||||||
|
* - ``pim``
|
||||||
|
- Contains packet traps for PIM packets
|
||||||
|
* - ``uc_loopback``
|
||||||
|
- Contains a packet trap for unicast loopback packets (i.e.,
|
||||||
|
``uc_loopback``). This trap is singled-out because in cases such as
|
||||||
|
one-armed router it will be constantly triggered. To limit the impact on
|
||||||
|
the CPU usage, a packet trap policer with a low rate can be bound to the
|
||||||
|
group without affecting other traps
|
||||||
|
* - ``local_delivery``
|
||||||
|
- Contains packet traps for packets that should be locally delivered after
|
||||||
|
routing, but do not match more specific packet traps (e.g.,
|
||||||
|
``ipv4_bgp``)
|
||||||
|
* - ``ipv6``
|
||||||
|
- Contains packet traps for various IPv6 control packets (e.g., Router
|
||||||
|
Advertisements)
|
||||||
|
* - ``ptp_event``
|
||||||
|
- Contains packet traps for PTP time-critical event messages (Sync,
|
||||||
|
Delay_req, Pdelay_Req and Pdelay_Resp)
|
||||||
|
* - ``ptp_general``
|
||||||
|
- Contains packet traps for PTP general messages (Announce, Follow_Up,
|
||||||
|
Delay_Resp, Pdelay_Resp_Follow_Up, management and signaling)
|
||||||
|
* - ``acl_sample``
|
||||||
|
- Contains packet traps for packets that were sampled by the device during
|
||||||
|
ACL processing
|
||||||
|
* - ``acl_trap``
|
||||||
|
- Contains packet traps for packets that were trapped (logged) by the
|
||||||
|
device during ACL processing
|
||||||
|
|
||||||
Packet Trap Policers
|
Packet Trap Policers
|
||||||
====================
|
====================
|
||||||
|
@@ -69,6 +69,17 @@ The ``ice`` driver reports the following versions
|
|||||||
- The version of the DDP package that is active in the device. Note
|
- The version of the DDP package that is active in the device. Note
|
||||||
that both the name (as reported by ``fw.app.name``) and version are
|
that both the name (as reported by ``fw.app.name``) and version are
|
||||||
required to uniquely identify the package.
|
required to uniquely identify the package.
|
||||||
|
* - ``fw.netlist``
|
||||||
|
- running
|
||||||
|
- 1.1.2000-6.7.0
|
||||||
|
- The version of the netlist module. This module defines the device's
|
||||||
|
Ethernet capabilities and default settings, and is used by the
|
||||||
|
management firmware as part of managing link and device
|
||||||
|
connectivity.
|
||||||
|
* - ``fw.netlist.build``
|
||||||
|
- running
|
||||||
|
- 0xee16ced7
|
||||||
|
- The first 4 bytes of the hash of the netlist module contents.
|
||||||
|
|
||||||
Regions
|
Regions
|
||||||
=======
|
=======
|
||||||
|
@@ -1,8 +1,10 @@
|
|||||||
===================
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
DNS Resolver Module
|
|
||||||
===================
|
|
||||||
|
|
||||||
Contents:
|
===================
|
||||||
|
DNS Resolver Module
|
||||||
|
===================
|
||||||
|
|
||||||
|
.. Contents:
|
||||||
|
|
||||||
- Overview.
|
- Overview.
|
||||||
- Compilation.
|
- Compilation.
|
||||||
@@ -12,8 +14,7 @@ Contents:
|
|||||||
- Debugging.
|
- Debugging.
|
||||||
|
|
||||||
|
|
||||||
========
|
Overview
|
||||||
OVERVIEW
|
|
||||||
========
|
========
|
||||||
|
|
||||||
The DNS resolver module provides a way for kernel services to make DNS queries
|
The DNS resolver module provides a way for kernel services to make DNS queries
|
||||||
@@ -33,50 +34,50 @@ It does not yet support the following AFS features:
|
|||||||
This code is extracted from the CIFS filesystem.
|
This code is extracted from the CIFS filesystem.
|
||||||
|
|
||||||
|
|
||||||
===========
|
Compilation
|
||||||
COMPILATION
|
|
||||||
===========
|
===========
|
||||||
|
|
||||||
The module should be enabled by turning on the kernel configuration options:
|
The module should be enabled by turning on the kernel configuration options::
|
||||||
|
|
||||||
CONFIG_DNS_RESOLVER - tristate "DNS Resolver support"
|
CONFIG_DNS_RESOLVER - tristate "DNS Resolver support"
|
||||||
|
|
||||||
|
|
||||||
==========
|
Setting up
|
||||||
SETTING UP
|
|
||||||
==========
|
==========
|
||||||
|
|
||||||
To set up this facility, the /etc/request-key.conf file must be altered so that
|
To set up this facility, the /etc/request-key.conf file must be altered so that
|
||||||
/sbin/request-key can appropriately direct the upcalls. For example, to handle
|
/sbin/request-key can appropriately direct the upcalls. For example, to handle
|
||||||
basic dname to IPv4/IPv6 address resolution, the following line should be
|
basic dname to IPv4/IPv6 address resolution, the following line should be
|
||||||
added:
|
added::
|
||||||
|
|
||||||
|
|
||||||
#OP TYPE DESC CO-INFO PROGRAM ARG1 ARG2 ARG3 ...
|
#OP TYPE DESC CO-INFO PROGRAM ARG1 ARG2 ARG3 ...
|
||||||
#====== ============ ======= ======= ==========================
|
#====== ============ ======= ======= ==========================
|
||||||
create dns_resolver * * /usr/sbin/cifs.upcall %k
|
create dns_resolver * * /usr/sbin/cifs.upcall %k
|
||||||
|
|
||||||
To direct a query for query type 'foo', a line of the following should be added
|
To direct a query for query type 'foo', a line of the following should be added
|
||||||
before the more general line given above as the first match is the one taken.
|
before the more general line given above as the first match is the one taken::
|
||||||
|
|
||||||
create dns_resolver foo:* * /usr/sbin/dns.foo %k
|
create dns_resolver foo:* * /usr/sbin/dns.foo %k
|
||||||
|
|
||||||
|
|
||||||
=====
|
Usage
|
||||||
USAGE
|
|
||||||
=====
|
=====
|
||||||
|
|
||||||
To make use of this facility, one of the following functions that are
|
To make use of this facility, one of the following functions that are
|
||||||
implemented in the module can be called after doing:
|
implemented in the module can be called after doing::
|
||||||
|
|
||||||
#include <linux/dns_resolver.h>
|
#include <linux/dns_resolver.h>
|
||||||
|
|
||||||
(1) int dns_query(const char *type, const char *name, size_t namelen,
|
::
|
||||||
|
|
||||||
|
int dns_query(const char *type, const char *name, size_t namelen,
|
||||||
const char *options, char **_result, time_t *_expiry);
|
const char *options, char **_result, time_t *_expiry);
|
||||||
|
|
||||||
This is the basic access function. It looks for a cached DNS query and if
|
This is the basic access function. It looks for a cached DNS query and if
|
||||||
it doesn't find it, it upcalls to userspace to make a new DNS query, which
|
it doesn't find it, it upcalls to userspace to make a new DNS query, which
|
||||||
may then be cached. The key description is constructed as a string of the
|
may then be cached. The key description is constructed as a string of the
|
||||||
form:
|
form::
|
||||||
|
|
||||||
[<type>:]<name>
|
[<type>:]<name>
|
||||||
|
|
||||||
@@ -107,16 +108,14 @@ This can be cleared by any process that has the CAP_SYS_ADMIN capability by
|
|||||||
the use of KEYCTL_KEYRING_CLEAR on the keyring ID.
|
the use of KEYCTL_KEYRING_CLEAR on the keyring ID.
|
||||||
|
|
||||||
|
|
||||||
===============================
|
Reading DNS Keys from Userspace
|
||||||
READING DNS KEYS FROM USERSPACE
|
|
||||||
===============================
|
===============================
|
||||||
|
|
||||||
Keys of dns_resolver type can be read from userspace using keyctl_read() or
|
Keys of dns_resolver type can be read from userspace using keyctl_read() or
|
||||||
"keyctl read/print/pipe".
|
"keyctl read/print/pipe".
|
||||||
|
|
||||||
|
|
||||||
=========
|
Mechanism
|
||||||
MECHANISM
|
|
||||||
=========
|
=========
|
||||||
|
|
||||||
The dnsresolver module registers a key type called "dns_resolver". Keys of
|
The dnsresolver module registers a key type called "dns_resolver". Keys of
|
||||||
@@ -147,11 +146,10 @@ See <file:Documentation/security/keys/request-key.rst> for further
|
|||||||
information about request-key function.
|
information about request-key function.
|
||||||
|
|
||||||
|
|
||||||
=========
|
Debugging
|
||||||
DEBUGGING
|
|
||||||
=========
|
=========
|
||||||
|
|
||||||
Debugging messages can be turned on dynamically by writing a 1 into the
|
Debugging messages can be turned on dynamically by writing a 1 into the
|
||||||
following file:
|
following file::
|
||||||
|
|
||||||
/sys/module/dnsresolver/parameters/debug
|
/sys/module/dnsresolver/parameters/debug
|
@@ -1,4 +1,8 @@
|
|||||||
Document about softnet driver issues
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
=====================
|
||||||
|
Softnet Driver Issues
|
||||||
|
=====================
|
||||||
|
|
||||||
Transmit path guidelines:
|
Transmit path guidelines:
|
||||||
|
|
||||||
@@ -8,7 +12,7 @@ Transmit path guidelines:
|
|||||||
transmit function will become busy.
|
transmit function will become busy.
|
||||||
|
|
||||||
Instead it must maintain the queue properly. For example,
|
Instead it must maintain the queue properly. For example,
|
||||||
for a driver implementing scatter-gather this means:
|
for a driver implementing scatter-gather this means::
|
||||||
|
|
||||||
static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb,
|
static netdev_tx_t drv_hard_start_xmit(struct sk_buff *skb,
|
||||||
struct net_device *dev)
|
struct net_device *dev)
|
||||||
@@ -38,22 +42,22 @@ Transmit path guidelines:
|
|||||||
return NETDEV_TX_OK;
|
return NETDEV_TX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
And then at the end of your TX reclamation event handling:
|
And then at the end of your TX reclamation event handling::
|
||||||
|
|
||||||
if (netif_queue_stopped(dp->dev) &&
|
if (netif_queue_stopped(dp->dev) &&
|
||||||
TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1))
|
TX_BUFFS_AVAIL(dp) > (MAX_SKB_FRAGS + 1))
|
||||||
netif_wake_queue(dp->dev);
|
netif_wake_queue(dp->dev);
|
||||||
|
|
||||||
For a non-scatter-gather supporting card, the three tests simply become:
|
For a non-scatter-gather supporting card, the three tests simply become::
|
||||||
|
|
||||||
/* This is a hard error log it. */
|
/* This is a hard error log it. */
|
||||||
if (TX_BUFFS_AVAIL(dp) <= 0)
|
if (TX_BUFFS_AVAIL(dp) <= 0)
|
||||||
|
|
||||||
and:
|
and::
|
||||||
|
|
||||||
if (TX_BUFFS_AVAIL(dp) == 0)
|
if (TX_BUFFS_AVAIL(dp) == 0)
|
||||||
|
|
||||||
and:
|
and::
|
||||||
|
|
||||||
if (netif_queue_stopped(dp->dev) &&
|
if (netif_queue_stopped(dp->dev) &&
|
||||||
TX_BUFFS_AVAIL(dp) > 0)
|
TX_BUFFS_AVAIL(dp) > 0)
|
@@ -66,34 +66,193 @@ reprogrammed with the updated static configuration.
|
|||||||
Traffic support
|
Traffic support
|
||||||
===============
|
===============
|
||||||
|
|
||||||
The switches do not support switch tagging in hardware. But they do support
|
The switches do not have hardware support for DSA tags, except for "slow
|
||||||
customizing the TPID by which VLAN traffic is identified as such. The switch
|
protocols" for switch control as STP and PTP. For these, the switches have two
|
||||||
driver is leveraging ``CONFIG_NET_DSA_TAG_8021Q`` by requesting that special
|
programmable filters for link-local destination MACs.
|
||||||
VLANs (with a custom TPID of ``ETH_P_EDSA`` instead of ``ETH_P_8021Q``) are
|
|
||||||
installed on its ports when not in ``vlan_filtering`` mode. This does not
|
|
||||||
interfere with the reception and transmission of real 802.1Q-tagged traffic,
|
|
||||||
because the switch does no longer parse those packets as VLAN after the TPID
|
|
||||||
change.
|
|
||||||
The TPID is restored when ``vlan_filtering`` is requested by the user through
|
|
||||||
the bridge layer, and general IP termination becomes no longer possible through
|
|
||||||
the switch netdevices in this mode.
|
|
||||||
|
|
||||||
The switches have two programmable filters for link-local destination MACs.
|
|
||||||
These are used to trap BPDUs and PTP traffic to the master netdevice, and are
|
These are used to trap BPDUs and PTP traffic to the master netdevice, and are
|
||||||
further used to support STP and 1588 ordinary clock/boundary clock
|
further used to support STP and 1588 ordinary clock/boundary clock
|
||||||
functionality.
|
functionality. For frames trapped to the CPU, source port and switch ID
|
||||||
|
information is encoded by the hardware into the frames.
|
||||||
|
|
||||||
The following traffic modes are supported over the switch netdevices:
|
But by leveraging ``CONFIG_NET_DSA_TAG_8021Q`` (a software-defined DSA tagging
|
||||||
|
format based on VLANs), general-purpose traffic termination through the network
|
||||||
|
stack can be supported under certain circumstances.
|
||||||
|
|
||||||
+--------------------+------------+------------------+------------------+
|
Depending on VLAN awareness state, the following operating modes are possible
|
||||||
| | Standalone | Bridged with | Bridged with |
|
with the switch:
|
||||||
| | ports | vlan_filtering 0 | vlan_filtering 1 |
|
|
||||||
+====================+============+==================+==================+
|
- Mode 1 (VLAN-unaware): a port is in this mode when it is used as a standalone
|
||||||
| Regular traffic | Yes | Yes | No (use master) |
|
net device, or when it is enslaved to a bridge with ``vlan_filtering=0``.
|
||||||
+--------------------+------------+------------------+------------------+
|
- Mode 2 (fully VLAN-aware): a port is in this mode when it is enslaved to a
|
||||||
| Management traffic | Yes | Yes | Yes |
|
bridge with ``vlan_filtering=1``. Access to the entire VLAN range is given to
|
||||||
|
the user through ``bridge vlan`` commands, but general-purpose (anything
|
||||||
|
other than STP, PTP etc) traffic termination is not possible through the
|
||||||
|
switch net devices. The other packets can be still by user space processed
|
||||||
|
through the DSA master interface (similar to ``DSA_TAG_PROTO_NONE``).
|
||||||
|
- Mode 3 (best-effort VLAN-aware): a port is in this mode when enslaved to a
|
||||||
|
bridge with ``vlan_filtering=1``, and the devlink property of its parent
|
||||||
|
switch named ``best_effort_vlan_filtering`` is set to ``true``. When
|
||||||
|
configured like this, the range of usable VIDs is reduced (0 to 1023 and 3072
|
||||||
|
to 4094), so is the number of usable VIDs (maximum of 7 non-pvid VLANs per
|
||||||
|
port*), and shared VLAN learning is performed (FDB lookup is done only by
|
||||||
|
DMAC, not also by VID).
|
||||||
|
|
||||||
|
To summarize, in each mode, the following types of traffic are supported over
|
||||||
|
the switch net devices:
|
||||||
|
|
||||||
|
+-------------+-----------+--------------+------------+
|
||||||
|
| | Mode 1 | Mode 2 | Mode 3 |
|
||||||
|
+=============+===========+==============+============+
|
||||||
|
| Regular | Yes | No | Yes |
|
||||||
|
| traffic | | (use master) | |
|
||||||
|
+-------------+-----------+--------------+------------+
|
||||||
|
| Management | Yes | Yes | Yes |
|
||||||
|
| traffic | | | |
|
||||||
| (BPDU, PTP) | | | |
|
| (BPDU, PTP) | | | |
|
||||||
+--------------------+------------+------------------+------------------+
|
+-------------+-----------+--------------+------------+
|
||||||
|
|
||||||
|
To configure the switch to operate in Mode 3, the following steps can be
|
||||||
|
followed::
|
||||||
|
|
||||||
|
ip link add dev br0 type bridge
|
||||||
|
# swp2 operates in Mode 1 now
|
||||||
|
ip link set dev swp2 master br0
|
||||||
|
# swp2 temporarily moves to Mode 2
|
||||||
|
ip link set dev br0 type bridge vlan_filtering 1
|
||||||
|
[ 61.204770] sja1105 spi0.1: Reset switch and programmed static config. Reason: VLAN filtering
|
||||||
|
[ 61.239944] sja1105 spi0.1: Disabled switch tagging
|
||||||
|
# swp3 now operates in Mode 3
|
||||||
|
devlink dev param set spi/spi0.1 name best_effort_vlan_filtering value true cmode runtime
|
||||||
|
[ 64.682927] sja1105 spi0.1: Reset switch and programmed static config. Reason: VLAN filtering
|
||||||
|
[ 64.711925] sja1105 spi0.1: Enabled switch tagging
|
||||||
|
# Cannot use VLANs in range 1024-3071 while in Mode 3.
|
||||||
|
bridge vlan add dev swp2 vid 1025 untagged pvid
|
||||||
|
RTNETLINK answers: Operation not permitted
|
||||||
|
bridge vlan add dev swp2 vid 100
|
||||||
|
bridge vlan add dev swp2 vid 101 untagged
|
||||||
|
bridge vlan
|
||||||
|
port vlan ids
|
||||||
|
swp5 1 PVID Egress Untagged
|
||||||
|
|
||||||
|
swp2 1 PVID Egress Untagged
|
||||||
|
100
|
||||||
|
101 Egress Untagged
|
||||||
|
|
||||||
|
swp3 1 PVID Egress Untagged
|
||||||
|
|
||||||
|
swp4 1 PVID Egress Untagged
|
||||||
|
|
||||||
|
br0 1 PVID Egress Untagged
|
||||||
|
bridge vlan add dev swp2 vid 102
|
||||||
|
bridge vlan add dev swp2 vid 103
|
||||||
|
bridge vlan add dev swp2 vid 104
|
||||||
|
bridge vlan add dev swp2 vid 105
|
||||||
|
bridge vlan add dev swp2 vid 106
|
||||||
|
bridge vlan add dev swp2 vid 107
|
||||||
|
# Cannot use mode than 7 VLANs per port while in Mode 3.
|
||||||
|
[ 3885.216832] sja1105 spi0.1: No more free subvlans
|
||||||
|
|
||||||
|
\* "maximum of 7 non-pvid VLANs per port": Decoding VLAN-tagged packets on the
|
||||||
|
CPU in mode 3 is possible through VLAN retagging of packets that go from the
|
||||||
|
switch to the CPU. In cross-chip topologies, the port that goes to the CPU
|
||||||
|
might also go to other switches. In that case, those other switches will see
|
||||||
|
only a retagged packet (which only has meaning for the CPU). So if they are
|
||||||
|
interested in this VLAN, they need to apply retagging in the reverse direction,
|
||||||
|
to recover the original value from it. This consumes extra hardware resources
|
||||||
|
for this switch. There is a maximum of 32 entries in the Retagging Table of
|
||||||
|
each switch device.
|
||||||
|
|
||||||
|
As an example, consider this cross-chip topology::
|
||||||
|
|
||||||
|
+-------------------------------------------------+
|
||||||
|
| Host SoC |
|
||||||
|
| +-------------------------+ |
|
||||||
|
| | DSA master for embedded | |
|
||||||
|
| | switch (non-sja1105) | |
|
||||||
|
| +--------+-------------------------+--------+ |
|
||||||
|
| | embedded L2 switch | |
|
||||||
|
| | | |
|
||||||
|
| | +--------------+ +--------------+ | |
|
||||||
|
| | |DSA master for| |DSA master for| | |
|
||||||
|
| | | SJA1105 1 | | SJA1105 2 | | |
|
||||||
|
+--+---+--------------+-----+--------------+---+--+
|
||||||
|
|
||||||
|
+-----------------------+ +-----------------------+
|
||||||
|
| SJA1105 switch 1 | | SJA1105 switch 2 |
|
||||||
|
+-----+-----+-----+-----+ +-----+-----+-----+-----+
|
||||||
|
|sw1p0|sw1p1|sw1p2|sw1p3| |sw2p0|sw2p1|sw2p2|sw2p3|
|
||||||
|
+-----+-----+-----+-----+ +-----+-----+-----+-----+
|
||||||
|
|
||||||
|
To reach the CPU, SJA1105 switch 1 (spi/spi2.1) uses the same port as is uses
|
||||||
|
to reach SJA1105 switch 2 (spi/spi2.2), which would be port 4 (not drawn).
|
||||||
|
Similarly for SJA1105 switch 2.
|
||||||
|
|
||||||
|
Also consider the following commands, that add VLAN 100 to every sja1105 user
|
||||||
|
port::
|
||||||
|
|
||||||
|
devlink dev param set spi/spi2.1 name best_effort_vlan_filtering value true cmode runtime
|
||||||
|
devlink dev param set spi/spi2.2 name best_effort_vlan_filtering value true cmode runtime
|
||||||
|
ip link add dev br0 type bridge
|
||||||
|
for port in sw1p0 sw1p1 sw1p2 sw1p3 \
|
||||||
|
sw2p0 sw2p1 sw2p2 sw2p3; do
|
||||||
|
ip link set dev $port master br0
|
||||||
|
done
|
||||||
|
ip link set dev br0 type bridge vlan_filtering 1
|
||||||
|
for port in sw1p0 sw1p1 sw1p2 sw1p3 \
|
||||||
|
sw2p0 sw2p1 sw2p2; do
|
||||||
|
bridge vlan add dev $port vid 100
|
||||||
|
done
|
||||||
|
ip link add link br0 name br0.100 type vlan id 100 && ip link set dev br0.100 up
|
||||||
|
ip addr add 192.168.100.3/24 dev br0.100
|
||||||
|
bridge vlan add dev br0 vid 100 self
|
||||||
|
|
||||||
|
bridge vlan
|
||||||
|
port vlan ids
|
||||||
|
sw1p0 1 PVID Egress Untagged
|
||||||
|
100
|
||||||
|
|
||||||
|
sw1p1 1 PVID Egress Untagged
|
||||||
|
100
|
||||||
|
|
||||||
|
sw1p2 1 PVID Egress Untagged
|
||||||
|
100
|
||||||
|
|
||||||
|
sw1p3 1 PVID Egress Untagged
|
||||||
|
100
|
||||||
|
|
||||||
|
sw2p0 1 PVID Egress Untagged
|
||||||
|
100
|
||||||
|
|
||||||
|
sw2p1 1 PVID Egress Untagged
|
||||||
|
100
|
||||||
|
|
||||||
|
sw2p2 1 PVID Egress Untagged
|
||||||
|
100
|
||||||
|
|
||||||
|
sw2p3 1 PVID Egress Untagged
|
||||||
|
|
||||||
|
br0 1 PVID Egress Untagged
|
||||||
|
100
|
||||||
|
|
||||||
|
SJA1105 switch 1 consumes 1 retagging entry for each VLAN on each user port
|
||||||
|
towards the CPU. It also consumes 1 retagging entry for each non-pvid VLAN that
|
||||||
|
it is also interested in, which is configured on any port of any neighbor
|
||||||
|
switch.
|
||||||
|
|
||||||
|
In this case, SJA1105 switch 1 consumes a total of 11 retagging entries, as
|
||||||
|
follows:
|
||||||
|
- 8 retagging entries for VLANs 1 and 100 installed on its user ports
|
||||||
|
(``sw1p0`` - ``sw1p3``)
|
||||||
|
- 3 retagging entries for VLAN 100 installed on the user ports of SJA1105
|
||||||
|
switch 2 (``sw2p0`` - ``sw2p2``), because it also has ports that are
|
||||||
|
interested in it. The VLAN 1 is a pvid on SJA1105 switch 2 and does not need
|
||||||
|
reverse retagging.
|
||||||
|
|
||||||
|
SJA1105 switch 2 also consumes 11 retagging entries, but organized as follows:
|
||||||
|
- 7 retagging entries for the bridge VLANs on its user ports (``sw2p0`` -
|
||||||
|
``sw2p3``).
|
||||||
|
- 4 retagging entries for VLAN 100 installed on the user ports of SJA1105
|
||||||
|
switch 1 (``sw1p0`` - ``sw1p3``).
|
||||||
|
|
||||||
Switching features
|
Switching features
|
||||||
==================
|
==================
|
||||||
@@ -230,6 +389,122 @@ simultaneously on two ports. The driver checks the consistency of the schedules
|
|||||||
against this restriction and errors out when appropriate. Schedule analysis is
|
against this restriction and errors out when appropriate. Schedule analysis is
|
||||||
needed to avoid this, which is outside the scope of the document.
|
needed to avoid this, which is outside the scope of the document.
|
||||||
|
|
||||||
|
Routing actions (redirect, trap, drop)
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
The switch is able to offload flow-based redirection of packets to a set of
|
||||||
|
destination ports specified by the user. Internally, this is implemented by
|
||||||
|
making use of Virtual Links, a TTEthernet concept.
|
||||||
|
|
||||||
|
The driver supports 2 types of keys for Virtual Links:
|
||||||
|
|
||||||
|
- VLAN-aware virtual links: these match on destination MAC address, VLAN ID and
|
||||||
|
VLAN PCP.
|
||||||
|
- VLAN-unaware virtual links: these match on destination MAC address only.
|
||||||
|
|
||||||
|
The VLAN awareness state of the bridge (vlan_filtering) cannot be changed while
|
||||||
|
there are virtual link rules installed.
|
||||||
|
|
||||||
|
Composing multiple actions inside the same rule is supported. When only routing
|
||||||
|
actions are requested, the driver creates a "non-critical" virtual link. When
|
||||||
|
the action list also contains tc-gate (more details below), the virtual link
|
||||||
|
becomes "time-critical" (draws frame buffers from a reserved memory partition,
|
||||||
|
etc).
|
||||||
|
|
||||||
|
The 3 routing actions that are supported are "trap", "drop" and "redirect".
|
||||||
|
|
||||||
|
Example 1: send frames received on swp2 with a DA of 42:be:24:9b:76:20 to the
|
||||||
|
CPU and to swp3. This type of key (DA only) when the port's VLAN awareness
|
||||||
|
state is off::
|
||||||
|
|
||||||
|
tc qdisc add dev swp2 clsact
|
||||||
|
tc filter add dev swp2 ingress flower skip_sw dst_mac 42:be:24:9b:76:20 \
|
||||||
|
action mirred egress redirect dev swp3 \
|
||||||
|
action trap
|
||||||
|
|
||||||
|
Example 2: drop frames received on swp2 with a DA of 42:be:24:9b:76:20, a VID
|
||||||
|
of 100 and a PCP of 0::
|
||||||
|
|
||||||
|
tc filter add dev swp2 ingress protocol 802.1Q flower skip_sw \
|
||||||
|
dst_mac 42:be:24:9b:76:20 vlan_id 100 vlan_prio 0 action drop
|
||||||
|
|
||||||
|
Time-based ingress policing
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
The TTEthernet hardware abilities of the switch can be constrained to act
|
||||||
|
similarly to the Per-Stream Filtering and Policing (PSFP) clause specified in
|
||||||
|
IEEE 802.1Q-2018 (formerly 802.1Qci). This means it can be used to perform
|
||||||
|
tight timing-based admission control for up to 1024 flows (identified by a
|
||||||
|
tuple composed of destination MAC address, VLAN ID and VLAN PCP). Packets which
|
||||||
|
are received outside their expected reception window are dropped.
|
||||||
|
|
||||||
|
This capability can be managed through the offload of the tc-gate action. As
|
||||||
|
routing actions are intrinsic to virtual links in TTEthernet (which performs
|
||||||
|
explicit routing of time-critical traffic and does not leave that in the hands
|
||||||
|
of the FDB, flooding etc), the tc-gate action may never appear alone when
|
||||||
|
asking sja1105 to offload it. One (or more) redirect or trap actions must also
|
||||||
|
follow along.
|
||||||
|
|
||||||
|
Example: create a tc-taprio schedule that is phase-aligned with a tc-gate
|
||||||
|
schedule (the clocks must be synchronized by a 1588 application stack, which is
|
||||||
|
outside the scope of this document). No packet delivered by the sender will be
|
||||||
|
dropped. Note that the reception window is larger than the transmission window
|
||||||
|
(and much more so, in this example) to compensate for the packet propagation
|
||||||
|
delay of the link (which can be determined by the 1588 application stack).
|
||||||
|
|
||||||
|
Receiver (sja1105)::
|
||||||
|
|
||||||
|
tc qdisc add dev swp2 clsact
|
||||||
|
now=$(phc_ctl /dev/ptp1 get | awk '/clock time is/ {print $5}') && \
|
||||||
|
sec=$(echo $now | awk -F. '{print $1}') && \
|
||||||
|
base_time="$(((sec + 2) * 1000000000))" && \
|
||||||
|
echo "base time ${base_time}"
|
||||||
|
tc filter add dev swp2 ingress flower skip_sw \
|
||||||
|
dst_mac 42:be:24:9b:76:20 \
|
||||||
|
action gate base-time ${base_time} \
|
||||||
|
sched-entry OPEN 60000 -1 -1 \
|
||||||
|
sched-entry CLOSE 40000 -1 -1 \
|
||||||
|
action trap
|
||||||
|
|
||||||
|
Sender::
|
||||||
|
|
||||||
|
now=$(phc_ctl /dev/ptp0 get | awk '/clock time is/ {print $5}') && \
|
||||||
|
sec=$(echo $now | awk -F. '{print $1}') && \
|
||||||
|
base_time="$(((sec + 2) * 1000000000))" && \
|
||||||
|
echo "base time ${base_time}"
|
||||||
|
tc qdisc add dev eno0 parent root taprio \
|
||||||
|
num_tc 8 \
|
||||||
|
map 0 1 2 3 4 5 6 7 \
|
||||||
|
queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \
|
||||||
|
base-time ${base_time} \
|
||||||
|
sched-entry S 01 50000 \
|
||||||
|
sched-entry S 00 50000 \
|
||||||
|
flags 2
|
||||||
|
|
||||||
|
The engine used to schedule the ingress gate operations is the same that the
|
||||||
|
one used for the tc-taprio offload. Therefore, the restrictions regarding the
|
||||||
|
fact that no two gate actions (either tc-gate or tc-taprio gates) may fire at
|
||||||
|
the same time (during the same 200 ns slot) still apply.
|
||||||
|
|
||||||
|
To come in handy, it is possible to share time-triggered virtual links across
|
||||||
|
more than 1 ingress port, via flow blocks. In this case, the restriction of
|
||||||
|
firing at the same time does not apply because there is a single schedule in
|
||||||
|
the system, that of the shared virtual link::
|
||||||
|
|
||||||
|
tc qdisc add dev swp2 ingress_block 1 clsact
|
||||||
|
tc qdisc add dev swp3 ingress_block 1 clsact
|
||||||
|
tc filter add block 1 flower skip_sw dst_mac 42:be:24:9b:76:20 \
|
||||||
|
action gate index 2 \
|
||||||
|
base-time 0 \
|
||||||
|
sched-entry OPEN 50000000 -1 -1 \
|
||||||
|
sched-entry CLOSE 50000000 -1 -1 \
|
||||||
|
action trap
|
||||||
|
|
||||||
|
Hardware statistics for each flow are also available ("pkts" counts the number
|
||||||
|
of dropped frames, which is a sum of frames dropped due to timing violations,
|
||||||
|
lack of destination ports and MTU enforcement checks). Byte-level counters are
|
||||||
|
not available.
|
||||||
|
|
||||||
Device Tree bindings and board design
|
Device Tree bindings and board design
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
@@ -1,5 +1,11 @@
|
|||||||
EQL Driver: Serial IP Load Balancing HOWTO
|
.. SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
==========================================
|
||||||
|
EQL Driver: Serial IP Load Balancing HOWTO
|
||||||
|
==========================================
|
||||||
|
|
||||||
Simon "Guru Aleph-Null" Janes, simon@ncm.com
|
Simon "Guru Aleph-Null" Janes, simon@ncm.com
|
||||||
|
|
||||||
v1.1, February 27, 1995
|
v1.1, February 27, 1995
|
||||||
|
|
||||||
This is the manual for the EQL device driver. EQL is a software device
|
This is the manual for the EQL device driver. EQL is a software device
|
||||||
@@ -12,7 +18,8 @@
|
|||||||
which was only created to patch cleanly in the very latest kernel
|
which was only created to patch cleanly in the very latest kernel
|
||||||
source trees. (Yes, it worked fine.)
|
source trees. (Yes, it worked fine.)
|
||||||
|
|
||||||
1. Introduction
|
1. Introduction
|
||||||
|
===============
|
||||||
|
|
||||||
Which is worse? A huge fee for a 56K leased line or two phone lines?
|
Which is worse? A huge fee for a 56K leased line or two phone lines?
|
||||||
It's probably the former. If you find yourself craving more bandwidth,
|
It's probably the former. If you find yourself craving more bandwidth,
|
||||||
@@ -41,47 +48,40 @@
|
|||||||
Hey, we can all dream you know...
|
Hey, we can all dream you know...
|
||||||
|
|
||||||
|
|
||||||
2. Kernel Configuration
|
2. Kernel Configuration
|
||||||
|
=======================
|
||||||
|
|
||||||
Here I describe the general steps of getting a kernel up and working
|
Here I describe the general steps of getting a kernel up and working
|
||||||
with the eql driver. From patching, building, to installing.
|
with the eql driver. From patching, building, to installing.
|
||||||
|
|
||||||
|
|
||||||
2.1. Patching The Kernel
|
2.1. Patching The Kernel
|
||||||
|
------------------------
|
||||||
|
|
||||||
If you do not have or cannot get a copy of the kernel with the eql
|
If you do not have or cannot get a copy of the kernel with the eql
|
||||||
driver folded into it, get your copy of the driver from
|
driver folded into it, get your copy of the driver from
|
||||||
ftp://slaughter.ncm.com/pub/Linux/LOAD_BALANCING/eql-1.1.tar.gz.
|
ftp://slaughter.ncm.com/pub/Linux/LOAD_BALANCING/eql-1.1.tar.gz.
|
||||||
Unpack this archive someplace obvious like /usr/local/src/. It will
|
Unpack this archive someplace obvious like /usr/local/src/. It will
|
||||||
create the following files:
|
create the following files::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
______________________________________________________________________
|
|
||||||
-rw-r--r-- guru/ncm 198 Jan 19 18:53 1995 eql-1.1/NO-WARRANTY
|
-rw-r--r-- guru/ncm 198 Jan 19 18:53 1995 eql-1.1/NO-WARRANTY
|
||||||
-rw-r--r-- guru/ncm 30620 Feb 27 21:40 1995 eql-1.1/eql-1.1.patch
|
-rw-r--r-- guru/ncm 30620 Feb 27 21:40 1995 eql-1.1/eql-1.1.patch
|
||||||
-rwxr-xr-x guru/ncm 16111 Jan 12 22:29 1995 eql-1.1/eql_enslave
|
-rwxr-xr-x guru/ncm 16111 Jan 12 22:29 1995 eql-1.1/eql_enslave
|
||||||
-rw-r--r-- guru/ncm 2195 Jan 10 21:48 1995 eql-1.1/eql_enslave.c
|
-rw-r--r-- guru/ncm 2195 Jan 10 21:48 1995 eql-1.1/eql_enslave.c
|
||||||
______________________________________________________________________
|
|
||||||
|
|
||||||
Unpack a recent kernel (something after 1.1.92) someplace convenient
|
Unpack a recent kernel (something after 1.1.92) someplace convenient
|
||||||
like say /usr/src/linux-1.1.92.eql. Use symbolic links to point
|
like say /usr/src/linux-1.1.92.eql. Use symbolic links to point
|
||||||
/usr/src/linux to this development directory.
|
/usr/src/linux to this development directory.
|
||||||
|
|
||||||
|
|
||||||
Apply the patch by running the commands:
|
Apply the patch by running the commands::
|
||||||
|
|
||||||
|
|
||||||
______________________________________________________________________
|
|
||||||
cd /usr/src
|
cd /usr/src
|
||||||
patch </usr/local/src/eql-1.1/eql-1.1.patch
|
patch </usr/local/src/eql-1.1/eql-1.1.patch
|
||||||
______________________________________________________________________
|
|
||||||
|
|
||||||
|
|
||||||
|
2.2. Building The Kernel
|
||||||
|
------------------------
|
||||||
|
|
||||||
2.2. Building The Kernel
|
|
||||||
|
|
||||||
After patching the kernel, run make config and configure the kernel
|
After patching the kernel, run make config and configure the kernel
|
||||||
for your hardware.
|
for your hardware.
|
||||||
@@ -90,7 +90,8 @@
|
|||||||
After configuration, make and install according to your habit.
|
After configuration, make and install according to your habit.
|
||||||
|
|
||||||
|
|
||||||
3. Network Configuration
|
3. Network Configuration
|
||||||
|
========================
|
||||||
|
|
||||||
So far, I have only used the eql device with the DSLIP SLIP connection
|
So far, I have only used the eql device with the DSLIP SLIP connection
|
||||||
manager by Matt Dillon (-- "The man who sold his soul to code so much
|
manager by Matt Dillon (-- "The man who sold his soul to code so much
|
||||||
@@ -100,37 +101,27 @@
|
|||||||
connection.
|
connection.
|
||||||
|
|
||||||
|
|
||||||
3.1. /etc/rc.d/rc.inet1
|
3.1. /etc/rc.d/rc.inet1
|
||||||
|
-----------------------
|
||||||
|
|
||||||
In rc.inet1, ifconfig the eql device to the IP address you usually use
|
In rc.inet1, ifconfig the eql device to the IP address you usually use
|
||||||
for your machine, and the MTU you prefer for your SLIP lines. One
|
for your machine, and the MTU you prefer for your SLIP lines. One
|
||||||
could argue that MTU should be roughly half the usual size for two
|
could argue that MTU should be roughly half the usual size for two
|
||||||
modems, one-third for three, one-fourth for four, etc... But going
|
modems, one-third for three, one-fourth for four, etc... But going
|
||||||
too far below 296 is probably overkill. Here is an example ifconfig
|
too far below 296 is probably overkill. Here is an example ifconfig
|
||||||
command that sets up the eql device:
|
command that sets up the eql device::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
______________________________________________________________________
|
|
||||||
ifconfig eql 198.67.33.239 mtu 1006
|
ifconfig eql 198.67.33.239 mtu 1006
|
||||||
______________________________________________________________________
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Once the eql device is up and running, add a static default route to
|
Once the eql device is up and running, add a static default route to
|
||||||
it in the routing table using the cool new route syntax that makes
|
it in the routing table using the cool new route syntax that makes
|
||||||
life so much easier:
|
life so much easier::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
______________________________________________________________________
|
|
||||||
route add default eql
|
route add default eql
|
||||||
______________________________________________________________________
|
|
||||||
|
|
||||||
|
|
||||||
3.2. Enslaving Devices By Hand
|
3.2. Enslaving Devices By Hand
|
||||||
|
------------------------------
|
||||||
|
|
||||||
Enslaving devices by hand requires two utility programs: eql_enslave
|
Enslaving devices by hand requires two utility programs: eql_enslave
|
||||||
and eql_emancipate (-- eql_emancipate hasn't been written because when
|
and eql_emancipate (-- eql_emancipate hasn't been written because when
|
||||||
@@ -140,63 +131,35 @@
|
|||||||
|
|
||||||
|
|
||||||
The syntax for enslaving a device is "eql_enslave <master-name>
|
The syntax for enslaving a device is "eql_enslave <master-name>
|
||||||
<slave-name> <estimated-bps>". Here are some example enslavings:
|
<slave-name> <estimated-bps>". Here are some example enslavings::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
______________________________________________________________________
|
|
||||||
eql_enslave eql sl0 28800
|
eql_enslave eql sl0 28800
|
||||||
eql_enslave eql ppp0 14400
|
eql_enslave eql ppp0 14400
|
||||||
eql_enslave eql sl1 57600
|
eql_enslave eql sl1 57600
|
||||||
______________________________________________________________________
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
When you want to free a device from its life of slavery, you can
|
When you want to free a device from its life of slavery, you can
|
||||||
either down the device with ifconfig (eql will automatically bury the
|
either down the device with ifconfig (eql will automatically bury the
|
||||||
dead slave and remove it from its queue) or use eql_emancipate to free
|
dead slave and remove it from its queue) or use eql_emancipate to free
|
||||||
it. (-- Or just ifconfig it down, and the eql driver will take it out
|
it. (-- Or just ifconfig it down, and the eql driver will take it out
|
||||||
for you.--)
|
for you.--)::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
______________________________________________________________________
|
|
||||||
eql_emancipate eql sl0
|
eql_emancipate eql sl0
|
||||||
eql_emancipate eql ppp0
|
eql_emancipate eql ppp0
|
||||||
eql_emancipate eql sl1
|
eql_emancipate eql sl1
|
||||||
______________________________________________________________________
|
|
||||||
|
|
||||||
|
|
||||||
|
3.3. DSLIP Configuration for the eql Device
|
||||||
|
-------------------------------------------
|
||||||
|
|
||||||
3.3. DSLIP Configuration for the eql Device
|
|
||||||
|
|
||||||
The general idea is to bring up and keep up as many SLIP connections
|
The general idea is to bring up and keep up as many SLIP connections
|
||||||
as you need, automatically.
|
as you need, automatically.
|
||||||
|
|
||||||
|
|
||||||
3.3.1. /etc/slip/runslip.conf
|
3.3.1. /etc/slip/runslip.conf
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Here is an example runslip.conf:
|
Here is an example runslip.conf::
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
______________________________________________________________________
|
|
||||||
name sl-line-1
|
name sl-line-1
|
||||||
enabled
|
enabled
|
||||||
baud 38400
|
baud 38400
|
||||||
@@ -214,13 +177,10 @@
|
|||||||
command eql_enslave eql $interface 28800
|
command eql_enslave eql $interface 28800
|
||||||
address 198.67.33.239
|
address 198.67.33.239
|
||||||
line /dev/cua3
|
line /dev/cua3
|
||||||
______________________________________________________________________
|
|
||||||
|
|
||||||
|
|
||||||
|
3.4. Using PPP and the eql Device
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
3.4. Using PPP and the eql Device
|
|
||||||
|
|
||||||
I have not yet done any load-balancing testing for PPP devices, mainly
|
I have not yet done any load-balancing testing for PPP devices, mainly
|
||||||
because I don't have a PPP-connection manager like SLIP has with
|
because I don't have a PPP-connection manager like SLIP has with
|
||||||
@@ -235,7 +195,8 @@
|
|||||||
year.
|
year.
|
||||||
|
|
||||||
|
|
||||||
4. About the Slave Scheduler Algorithm
|
4. About the Slave Scheduler Algorithm
|
||||||
|
======================================
|
||||||
|
|
||||||
The slave scheduler probably could be replaced with a dozen other
|
The slave scheduler probably could be replaced with a dozen other
|
||||||
things and push traffic much faster. The formula in the current set
|
things and push traffic much faster. The formula in the current set
|
||||||
@@ -254,7 +215,8 @@
|
|||||||
traffic and the "slower" modem starved.
|
traffic and the "slower" modem starved.
|
||||||
|
|
||||||
|
|
||||||
5. Testers' Reports
|
5. Testers' Reports
|
||||||
|
===================
|
||||||
|
|
||||||
Some people have experimented with the eql device with newer
|
Some people have experimented with the eql device with newer
|
||||||
kernels (than 1.1.75). I have since updated the driver to patch
|
kernels (than 1.1.75). I have since updated the driver to patch
|
||||||
@@ -262,71 +224,13 @@
|
|||||||
balancing" driver config option.
|
balancing" driver config option.
|
||||||
|
|
||||||
|
|
||||||
o icee from LinuxNET patched 1.1.86 without any rejects and was able
|
- icee from LinuxNET patched 1.1.86 without any rejects and was able
|
||||||
to boot the kernel and enslave a couple of ISDN PPP links.
|
to boot the kernel and enslave a couple of ISDN PPP links.
|
||||||
|
|
||||||
5.1. Randolph Bentson's Test Report
|
5.1. Randolph Bentson's Test Report
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
From bentson@grieg.seaslug.org Wed Feb 8 19:08:09 1995
|
From bentson@grieg.seaslug.org Wed Feb 8 19:08:09 1995
|
||||||
Date: Tue, 7 Feb 95 22:57 PST
|
Date: Tue, 7 Feb 95 22:57 PST
|
||||||
@@ -342,7 +246,7 @@
|
|||||||
Randolph Bentson
|
Randolph Bentson
|
||||||
bentson@grieg.seaslug.org
|
bentson@grieg.seaslug.org
|
||||||
|
|
||||||
---------------------------------------------------------
|
------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
A pseudo-device driver, EQL, written by Simon Janes, can be used
|
A pseudo-device driver, EQL, written by Simon Janes, can be used
|
||||||
@@ -363,7 +267,7 @@
|
|||||||
Once a link was established, I timed a binary ftp transfer of
|
Once a link was established, I timed a binary ftp transfer of
|
||||||
289284 bytes of data. If there were no overhead (packet headers,
|
289284 bytes of data. If there were no overhead (packet headers,
|
||||||
inter-character and inter-packet delays, etc.) the transfers
|
inter-character and inter-packet delays, etc.) the transfers
|
||||||
would take the following times:
|
would take the following times::
|
||||||
|
|
||||||
bits/sec seconds
|
bits/sec seconds
|
||||||
345600 8.3
|
345600 8.3
|
||||||
@@ -388,8 +292,10 @@
|
|||||||
that the connection establishment seemed fragile for the higher
|
that the connection establishment seemed fragile for the higher
|
||||||
speeds. Once established, the connection seemed robust enough.)
|
speeds. Once established, the connection seemed robust enough.)
|
||||||
|
|
||||||
|
====== ======== === ======== ======= ======= ===
|
||||||
#lines speed mtu seconds theory actual %of
|
#lines speed mtu seconds theory actual %of
|
||||||
kbit/sec duration speed speed max
|
kbit/sec duration speed speed max
|
||||||
|
====== ======== === ======== ======= ======= ===
|
||||||
3 115200 900 _ 345600
|
3 115200 900 _ 345600
|
||||||
3 115200 400 18.1 345600 159825 46
|
3 115200 400 18.1 345600 159825 46
|
||||||
2 115200 900 _ 230400
|
2 115200 900 _ 230400
|
||||||
@@ -447,18 +353,12 @@
|
|||||||
1 9600 900 305 9600 9484.72 98
|
1 9600 900 305 9600 9484.72 98
|
||||||
1 9600 600 314 9600 9212.87 95
|
1 9600 600 314 9600 9212.87 95
|
||||||
1 9600 400 332 9600 8713.37 90
|
1 9600 400 332 9600 8713.37 90
|
||||||
|
====== ======== === ======== ======= ======= ===
|
||||||
|
|
||||||
|
5.2. Anthony Healy's Report
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
|
||||||
5.2. Anthony Healy's Report
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Date: Mon, 13 Feb 1995 16:17:29 +1100 (EST)
|
Date: Mon, 13 Feb 1995 16:17:29 +1100 (EST)
|
||||||
From: Antony Healey <ahealey@st.nepean.uws.edu.au>
|
From: Antony Healey <ahealey@st.nepean.uws.edu.au>
|
||||||
@@ -471,58 +371,3 @@
|
|||||||
able to data at over 48Kb/s [ISDN link -Simon]. I managed a
|
able to data at over 48Kb/s [ISDN link -Simon]. I managed a
|
||||||
transfer of up to 7.5 Kbyte/s on one go, but averaged around
|
transfer of up to 7.5 Kbyte/s on one go, but averaged around
|
||||||
6.4 Kbyte/s, which I think is pretty cool. :)
|
6.4 Kbyte/s, which I think is pretty cool. :)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@@ -204,6 +204,8 @@ Userspace to kernel:
|
|||||||
``ETHTOOL_MSG_EEE_GET`` get EEE settings
|
``ETHTOOL_MSG_EEE_GET`` get EEE settings
|
||||||
``ETHTOOL_MSG_EEE_SET`` set EEE settings
|
``ETHTOOL_MSG_EEE_SET`` set EEE settings
|
||||||
``ETHTOOL_MSG_TSINFO_GET`` get timestamping info
|
``ETHTOOL_MSG_TSINFO_GET`` get timestamping info
|
||||||
|
``ETHTOOL_MSG_CABLE_TEST_ACT`` action start cable test
|
||||||
|
``ETHTOOL_MSG_CABLE_TEST_TDR_ACT`` action start raw TDR cable test
|
||||||
===================================== ================================
|
===================================== ================================
|
||||||
|
|
||||||
Kernel to userspace:
|
Kernel to userspace:
|
||||||
@@ -235,6 +237,8 @@ Kernel to userspace:
|
|||||||
``ETHTOOL_MSG_EEE_GET_REPLY`` EEE settings
|
``ETHTOOL_MSG_EEE_GET_REPLY`` EEE settings
|
||||||
``ETHTOOL_MSG_EEE_NTF`` EEE settings
|
``ETHTOOL_MSG_EEE_NTF`` EEE settings
|
||||||
``ETHTOOL_MSG_TSINFO_GET_REPLY`` timestamping info
|
``ETHTOOL_MSG_TSINFO_GET_REPLY`` timestamping info
|
||||||
|
``ETHTOOL_MSG_CABLE_TEST_NTF`` Cable test results
|
||||||
|
``ETHTOOL_MSG_CABLE_TEST_TDR_NTF`` Cable test TDR results
|
||||||
===================================== =================================
|
===================================== =================================
|
||||||
|
|
||||||
``GET`` requests are sent by userspace applications to retrieve device
|
``GET`` requests are sent by userspace applications to retrieve device
|
||||||
@@ -392,14 +396,16 @@ Request contents:
|
|||||||
|
|
||||||
Kernel response contents:
|
Kernel response contents:
|
||||||
|
|
||||||
==================================== ====== ==========================
|
========================================== ====== ==========================
|
||||||
``ETHTOOL_A_LINKMODES_HEADER`` nested reply header
|
``ETHTOOL_A_LINKMODES_HEADER`` nested reply header
|
||||||
``ETHTOOL_A_LINKMODES_AUTONEG`` u8 autonegotiation status
|
``ETHTOOL_A_LINKMODES_AUTONEG`` u8 autonegotiation status
|
||||||
``ETHTOOL_A_LINKMODES_OURS`` bitset advertised link modes
|
``ETHTOOL_A_LINKMODES_OURS`` bitset advertised link modes
|
||||||
``ETHTOOL_A_LINKMODES_PEER`` bitset partner link modes
|
``ETHTOOL_A_LINKMODES_PEER`` bitset partner link modes
|
||||||
``ETHTOOL_A_LINKMODES_SPEED`` u32 link speed (Mb/s)
|
``ETHTOOL_A_LINKMODES_SPEED`` u32 link speed (Mb/s)
|
||||||
``ETHTOOL_A_LINKMODES_DUPLEX`` u8 duplex mode
|
``ETHTOOL_A_LINKMODES_DUPLEX`` u8 duplex mode
|
||||||
==================================== ====== ==========================
|
``ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG`` u8 Master/slave port mode
|
||||||
|
``ETHTOOL_A_LINKMODES_MASTER_SLAVE_STATE`` u8 Master/slave port state
|
||||||
|
========================================== ====== ==========================
|
||||||
|
|
||||||
For ``ETHTOOL_A_LINKMODES_OURS``, value represents advertised modes and mask
|
For ``ETHTOOL_A_LINKMODES_OURS``, value represents advertised modes and mask
|
||||||
represents supported modes. ``ETHTOOL_A_LINKMODES_PEER`` in the reply is a bit
|
represents supported modes. ``ETHTOOL_A_LINKMODES_PEER`` in the reply is a bit
|
||||||
@@ -414,14 +420,15 @@ LINKMODES_SET
|
|||||||
|
|
||||||
Request contents:
|
Request contents:
|
||||||
|
|
||||||
==================================== ====== ==========================
|
========================================== ====== ==========================
|
||||||
``ETHTOOL_A_LINKMODES_HEADER`` nested request header
|
``ETHTOOL_A_LINKMODES_HEADER`` nested request header
|
||||||
``ETHTOOL_A_LINKMODES_AUTONEG`` u8 autonegotiation status
|
``ETHTOOL_A_LINKMODES_AUTONEG`` u8 autonegotiation status
|
||||||
``ETHTOOL_A_LINKMODES_OURS`` bitset advertised link modes
|
``ETHTOOL_A_LINKMODES_OURS`` bitset advertised link modes
|
||||||
``ETHTOOL_A_LINKMODES_PEER`` bitset partner link modes
|
``ETHTOOL_A_LINKMODES_PEER`` bitset partner link modes
|
||||||
``ETHTOOL_A_LINKMODES_SPEED`` u32 link speed (Mb/s)
|
``ETHTOOL_A_LINKMODES_SPEED`` u32 link speed (Mb/s)
|
||||||
``ETHTOOL_A_LINKMODES_DUPLEX`` u8 duplex mode
|
``ETHTOOL_A_LINKMODES_DUPLEX`` u8 duplex mode
|
||||||
==================================== ====== ==========================
|
``ETHTOOL_A_LINKMODES_MASTER_SLAVE_CFG`` u8 Master/slave port mode
|
||||||
|
========================================== ====== ==========================
|
||||||
|
|
||||||
``ETHTOOL_A_LINKMODES_OURS`` bit set allows setting advertised link modes. If
|
``ETHTOOL_A_LINKMODES_OURS`` bit set allows setting advertised link modes. If
|
||||||
autonegotiation is on (either set now or kept from before), advertised modes
|
autonegotiation is on (either set now or kept from before), advertised modes
|
||||||
@@ -449,10 +456,12 @@ Request contents:
|
|||||||
|
|
||||||
Kernel response contents:
|
Kernel response contents:
|
||||||
|
|
||||||
==================================== ====== ==========================
|
==================================== ====== ============================
|
||||||
``ETHTOOL_A_LINKSTATE_HEADER`` nested reply header
|
``ETHTOOL_A_LINKSTATE_HEADER`` nested reply header
|
||||||
``ETHTOOL_A_LINKSTATE_LINK`` bool link state (up/down)
|
``ETHTOOL_A_LINKSTATE_LINK`` bool link state (up/down)
|
||||||
==================================== ====== ==========================
|
``ETHTOOL_A_LINKSTATE_SQI`` u32 Current Signal Quality Index
|
||||||
|
``ETHTOOL_A_LINKSTATE_SQI_MAX`` u32 Max support SQI value
|
||||||
|
==================================== ====== ============================
|
||||||
|
|
||||||
For most NIC drivers, the value of ``ETHTOOL_A_LINKSTATE_LINK`` returns
|
For most NIC drivers, the value of ``ETHTOOL_A_LINKSTATE_LINK`` returns
|
||||||
carrier flag provided by ``netif_carrier_ok()`` but there are drivers which
|
carrier flag provided by ``netif_carrier_ok()`` but there are drivers which
|
||||||
@@ -955,13 +964,159 @@ Kernel response contents:
|
|||||||
is no special value for this case). The bitset attributes are omitted if they
|
is no special value for this case). The bitset attributes are omitted if they
|
||||||
would be empty (no bit set).
|
would be empty (no bit set).
|
||||||
|
|
||||||
|
CABLE_TEST
|
||||||
|
==========
|
||||||
|
|
||||||
|
Start a cable test.
|
||||||
|
|
||||||
|
Request contents:
|
||||||
|
|
||||||
|
==================================== ====== ==========================
|
||||||
|
``ETHTOOL_A_CABLE_TEST_HEADER`` nested request header
|
||||||
|
==================================== ====== ==========================
|
||||||
|
|
||||||
|
Notification contents:
|
||||||
|
|
||||||
|
An Ethernet cable typically contains 1, 2 or 4 pairs. The length of
|
||||||
|
the pair can only be measured when there is a fault in the pair and
|
||||||
|
hence a reflection. Information about the fault may not be available,
|
||||||
|
depending on the specific hardware. Hence the contents of the notify
|
||||||
|
message are mostly optional. The attributes can be repeated an
|
||||||
|
arbitrary number of times, in an arbitrary order, for an arbitrary
|
||||||
|
number of pairs.
|
||||||
|
|
||||||
|
The example shows the notification sent when the test is completed for
|
||||||
|
a T2 cable, i.e. two pairs. One pair is OK and hence has no length
|
||||||
|
information. The second pair has a fault and does have length
|
||||||
|
information.
|
||||||
|
|
||||||
|
+---------------------------------------------+--------+---------------------+
|
||||||
|
| ``ETHTOOL_A_CABLE_TEST_HEADER`` | nested | reply header |
|
||||||
|
+---------------------------------------------+--------+---------------------+
|
||||||
|
| ``ETHTOOL_A_CABLE_TEST_STATUS`` | u8 | completed |
|
||||||
|
+---------------------------------------------+--------+---------------------+
|
||||||
|
| ``ETHTOOL_A_CABLE_TEST_NTF_NEST`` | nested | all the results |
|
||||||
|
+-+-------------------------------------------+--------+---------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_NEST_RESULT`` | nested | cable test result |
|
||||||
|
+-+-+-----------------------------------------+--------+---------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number |
|
||||||
|
+-+-+-----------------------------------------+--------+---------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_RESULTS_CODE`` | u8 | result code |
|
||||||
|
+-+-+-----------------------------------------+--------+---------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_NEST_RESULT`` | nested | cable test results |
|
||||||
|
+-+-+-----------------------------------------+--------+---------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number |
|
||||||
|
+-+-+-----------------------------------------+--------+---------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_RESULTS_CODE`` | u8 | result code |
|
||||||
|
+-+-+-----------------------------------------+--------+---------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_NEST_FAULT_LENGTH`` | nested | cable length |
|
||||||
|
+-+-+-----------------------------------------+--------+---------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_FAULT_LENGTH_PAIR`` | u8 | pair number |
|
||||||
|
+-+-+-----------------------------------------+--------+---------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_FAULT_LENGTH_CM`` | u32 | length in cm |
|
||||||
|
+-+-+-----------------------------------------+--------+---------------------+
|
||||||
|
|
||||||
|
CABLE_TEST TDR
|
||||||
|
==============
|
||||||
|
|
||||||
|
Start a cable test and report raw TDR data
|
||||||
|
|
||||||
|
Request contents:
|
||||||
|
|
||||||
|
+--------------------------------------------+--------+-----------------------+
|
||||||
|
| ``ETHTOOL_A_CABLE_TEST_TDR_HEADER`` | nested | reply header |
|
||||||
|
+--------------------------------------------+--------+-----------------------+
|
||||||
|
| ``ETHTOOL_A_CABLE_TEST_TDR_CFG`` | nested | test configuration |
|
||||||
|
+-+------------------------------------------+--------+-----------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE `` | u32 | first data distance |
|
||||||
|
+-+-+----------------------------------------+--------+-----------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE `` | u32 | last data distance |
|
||||||
|
+-+-+----------------------------------------+--------+-----------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE `` | u32 | distance of each step |
|
||||||
|
+-+-+----------------------------------------+--------+-----------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_TEST_TDR_CFG_PAIR`` | u8 | pair to test |
|
||||||
|
+-+-+----------------------------------------+--------+-----------------------+
|
||||||
|
|
||||||
|
The ETHTOOL_A_CABLE_TEST_TDR_CFG is optional, as well as all members
|
||||||
|
of the nest. All distances are expressed in centimeters. The PHY takes
|
||||||
|
the distances as a guide, and rounds to the nearest distance it
|
||||||
|
actually supports. If a pair is passed, only that one pair will be
|
||||||
|
tested. Otherwise all pairs are tested.
|
||||||
|
|
||||||
|
Notification contents:
|
||||||
|
|
||||||
|
Raw TDR data is gathered by sending a pulse down the cable and
|
||||||
|
recording the amplitude of the reflected pulse for a given distance.
|
||||||
|
|
||||||
|
It can take a number of seconds to collect TDR data, especial if the
|
||||||
|
full 100 meters is probed at 1 meter intervals. When the test is
|
||||||
|
started a notification will be sent containing just
|
||||||
|
ETHTOOL_A_CABLE_TEST_TDR_STATUS with the value
|
||||||
|
ETHTOOL_A_CABLE_TEST_NTF_STATUS_STARTED.
|
||||||
|
|
||||||
|
When the test has completed a second notification will be sent
|
||||||
|
containing ETHTOOL_A_CABLE_TEST_TDR_STATUS with the value
|
||||||
|
ETHTOOL_A_CABLE_TEST_NTF_STATUS_COMPLETED and the TDR data.
|
||||||
|
|
||||||
|
The message may optionally contain the amplitude of the pulse send
|
||||||
|
down the cable. This is measured in mV. A reflection should not be
|
||||||
|
bigger than transmitted pulse.
|
||||||
|
|
||||||
|
Before the raw TDR data should be an ETHTOOL_A_CABLE_TDR_NEST_STEP
|
||||||
|
nest containing information about the distance along the cable for the
|
||||||
|
first reading, the last reading, and the step between each
|
||||||
|
reading. Distances are measured in centimeters. These should be the
|
||||||
|
exact values the PHY used. These may be different to what the user
|
||||||
|
requested, if the native measurement resolution is greater than 1 cm.
|
||||||
|
|
||||||
|
For each step along the cable, a ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE is
|
||||||
|
used to report the amplitude of the reflection for a given pair.
|
||||||
|
|
||||||
|
+---------------------------------------------+--------+----------------------+
|
||||||
|
| ``ETHTOOL_A_CABLE_TEST_TDR_HEADER`` | nested | reply header |
|
||||||
|
+---------------------------------------------+--------+----------------------+
|
||||||
|
| ``ETHTOOL_A_CABLE_TEST_TDR_STATUS`` | u8 | completed |
|
||||||
|
+---------------------------------------------+--------+----------------------+
|
||||||
|
| ``ETHTOOL_A_CABLE_TEST_TDR_NTF_NEST`` | nested | all the results |
|
||||||
|
+-+-------------------------------------------+--------+----------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_TDR_NEST_PULSE`` | nested | TX Pulse amplitude |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_PULSE_mV`` | s16 | Pulse amplitude |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_NEST_STEP`` | nested | TDR step info |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_STEP_FIRST_DISTANCE ``| u32 | First data distance |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_STEP_LAST_DISTANCE `` | u32 | Last data distance |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_STEP_STEP_DISTANCE `` | u32 | distance of each step|
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE`` | nested | Reflection amplitude |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV`` | s16 | Reflection amplitude |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE`` | nested | Reflection amplitude |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV`` | s16 | Reflection amplitude |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | ``ETHTOOL_A_CABLE_TDR_NEST_AMPLITUDE`` | nested | Reflection amplitude |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_RESULTS_PAIR`` | u8 | pair number |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
| | | ``ETHTOOL_A_CABLE_AMPLITUDE_mV`` | s16 | Reflection amplitude |
|
||||||
|
+-+-+-----------------------------------------+--------+----------------------+
|
||||||
|
|
||||||
Request translation
|
Request translation
|
||||||
===================
|
===================
|
||||||
|
|
||||||
The following table maps ioctl commands to netlink commands providing their
|
The following table maps ioctl commands to netlink commands providing their
|
||||||
functionality. Entries with "n/a" in right column are commands which do not
|
functionality. Entries with "n/a" in right column are commands which do not
|
||||||
have their netlink replacement yet.
|
have their netlink replacement yet. Entries which "n/a" in the left column
|
||||||
|
are netlink only.
|
||||||
|
|
||||||
=================================== =====================================
|
=================================== =====================================
|
||||||
ioctl command netlink command
|
ioctl command netlink command
|
||||||
@@ -1050,4 +1205,6 @@ have their netlink replacement yet.
|
|||||||
``ETHTOOL_PHY_STUNABLE`` n/a
|
``ETHTOOL_PHY_STUNABLE`` n/a
|
||||||
``ETHTOOL_GFECPARAM`` n/a
|
``ETHTOOL_GFECPARAM`` n/a
|
||||||
``ETHTOOL_SFECPARAM`` n/a
|
``ETHTOOL_SFECPARAM`` n/a
|
||||||
|
n/a ''ETHTOOL_MSG_CABLE_TEST_ACT''
|
||||||
|
n/a ''ETHTOOL_MSG_CABLE_TEST_TDR_ACT''
|
||||||
=================================== =====================================
|
=================================== =====================================
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user