-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsume.4
163 lines (163 loc) · 6.33 KB
/
sume.4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
.\"-
.\" SPDX-License-Identifier: BSD-2-Clause-FreeBSD
.\"
.\" Copyright (c) 2020 Denis Salopek
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
.\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.Dd August 29, 2020
.Dt SUME 4
.Os
.Sh NAME
.Nm sume
.Nd "NetFPGA SUME 4x10Gb Ethernet driver"
.Sh SYNOPSIS
To compile this driver into the kernel, place the following lines
in your kernel configuration file:
.Bd -ragged -offset indent
.Cd "device sume"
.Ed
.Pp
Alternatively, to load the driver as a module at boot time, place
the following line in
.Xr loader.conf 5 :
.Bd -literal -offset indent
if_sume_load="YES"
.Ed
.Sh DESCRIPTION
The
.Nm
driver provides support for NetFPGA SUME Virtex-7 FPGA Development Board
with the reference NIC bitstream loaded onto it.
The HDL design for the reference NIC project uses the RIFFA based DMA
engine to communicate with the host machine over PCIe.
Every packet is transmitted to / from the board via a single DMA
transaction, taking up to two or three interrupts per one transaction
which yields low performance.
.Pp
There is no support for Jumbo frames as the hardware is capable of
dealing only with frames with maximum size of 1514 bytes.
The driver does not support multicast filtering.
.Pp
The hardware provides no checksums and offers no other offloading.
.Sh SYSCTL VARIABLES
The following variables are available as
.Xr sysctl 8
variables:
.Bl -tag -width "xxxxxx"
.It Va dev.sume.%d.debug
Debug information printing.
The default value is 0, set to 1 to enable.
.It Va dev.sume.%d.reset_ctr
A 32-bit counter of the number of hardware resets due to TX getting
stuck.
.It Va dev.sume.%d.tx_data_recovery
A 32-bit counter of the number of TX recovery state transitions for data
DMA channel.
.It Va dev.sume.%d.rx_data_recovery
A 32-bit counter of the number of RX recovery state transitions for data
DMA channel.
.It Va dev.sume.%d.tx_modreg_recovery
A 32-bit counter of the number of TX recovery state transitions for
module register DMA channel.
.It Va dev.sume.%d.rx_modreg_recovery
A 32-bit counter of the number of RX recovery state transitions for
module register DMA channel.
.It Va dev.sume.%d.rx_epkts
A 64-bit counter of the number of erroneous packets (wrong metadata or
too large packet) received on any interface.
.It Va dev.sume.%d.rx_ebytes
A 64-bit counter of the number of erroneous bytes (wrong metadata or too
large packet) received on any interface.
.It Va dev.sume.%d.sume%d.ifc_down_packets
A 64-bit counter of the number of packets received on the interface
sume%d configured as down.
.It Va dev.sume.%d.sume%d.ifc_down_bytes
A 64-bit counter of the number of bytes received on the interface sume%d
configured as down.
.It Va dev.sume.%d.sume%d.hw_tx_packets
A 64-bit counter of the number of packets transmitted by the physical
interface sume%d.
This counter is updated in the timer function by fetching values from
the module register of the hardware interface.
.It Va dev.sume.%d.sume%d.hw_rx_packets
A 64-bit counter of the number of packets received on the physical
interface sume%d.
This counter is updated in the timer function by fetching values from
the module register of the hardware interface.
.It Va dev.sume.%d.sume%d.tx_packets
A 64-bit counter of the number of packets transmitted without error on
the interface sume%d.
.It Va dev.sume.%d.sume%d.tx_bytes
A 64-bit counter of the number of bytes transmitted without error on the
interface sume%d.
.It Va dev.sume.%d.sume%d.tx_dropped
A 64-bit counter of the number of packets dropped on TX to the interface
sume%d.
.It Va dev.sume.%d.sume%d.rx_packets
A 64-bit counter of the number of packets received without error on the
interface sume%d.
.It Va dev.sume.%d.sume%d.rx_bytes
A 64-bit counter of the number of bytes received without error on the
interface sume%d.
.It Va dev.sume.%d.sume%d.rx_dropped
A 64-bit counter of the number of packets dropped on RX from the
interface sume%d.
.El
.Sh SEE ALSO
.Xr arp 4 ,
.Xr netgraph 4 ,
.Xr netintro 4 ,
.Xr ng_ether 4 ,
.Xr vlan 4 ,
.Xr ifconfig 8
.Sh AUTHORS
The Linux
.Nm
driver was originally written by
.An -nosplit
.An Bjoern A. Zeeb .
The
.Fx version and this manual page were written by
.An Denis Salopek
as a GSoC project.
More information about the project can be found here:
.Pa https://wiki.freebsd.org/SummerOfCode2020Projects/NetFPGA_SUME_Driver
.Sh BUGS
The reference NIC hardware design cannot stop physical ports so
interfaces configured as DOWN have no effect on the board.
This means that the hardware forwards all the incoming traffic to the OS
and the driver needs to do the job of dropping the packets intended for
interfaces set as DOWN, thus consuming PCI / memory bandwidth,
interrupts and CPU cycles.
.Pp
Pre-built bitstream from the NetFPGA project may not work correctly - at
higher RX packet rates, the newly incoming packets would overwrite the
ones in some internal FIFO so the packets would come out of the board
scrambled until physical reset of the board.
.Pp
Sometimes, the driver can get stuck in a non-IDLE TX state but a
watchdog-like function is implemented to check whether a non-IDLE state
lasts for more then 2 seconds and it resets the board automatically.
For more details, visit the NetFPGA SUME project site.