요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
=========================================================
D-Link DL2000-based Gigabit Ethernet Adapter Installation
=========================================================
May 23, 2002
.. Contents
- Compatibility List
- Quick Install
- Compiling the Driver
- Installing the Driver
- Option parameter
- Configuration Script Sample
- Troubleshooting
Compatibility List
==================
Adapter Support:
- D-Link DGE-550T Gigabit Ethernet Adapter.
- D-Link DGE-550SX Gigabit Ethernet Adapter.
- D-Link DL2000-based Gigabit Ethernet Adapter.
The driver support Linux kernel 2.4.7 later. We had tested it
on the environments below.
. Red Hat v6.2 (update kernel to 2.4.7)
. Red Hat v7.0 (update kernel to 2.4.7)
. Red Hat v7.1 (kernel 2.4.7)
. Red Hat v7.2 (kernel 2.4.7-10)
Quick Install
=============
Install linux driver as following command::
1. make all
2. insmod dl2k.ko
3. ifconfig eth0 up 10.xxx.xxx.xxx netmask 255.0.0.0
^^^^^^^^^^^^^^^\ ^^^^^^^^\
IP NETMASK
Now eth0 should active, you can test it by "ping" or get more information by
"ifconfig". If tested ok, continue the next step.
4. ``cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net``
5. Add the following line to /etc/modprobe.d/dl2k.conf::
alias eth0 dl2k
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.
[see - Configuration Script Sample]
8. Driver will automatically load and configure at next boot time.
Compiling the Driver
====================
In Linux, NIC drivers are most commonly configured as loadable modules.
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.
The remainder of this section assumes the driver is built as a loadable module.
In the Linux environment, it is a good idea to rebuild the driver from the
source instead of relying on a precompiled version. This approach provides
better reliability since a precompiled driver might depend on libraries or
kernel features that are not present in a given Linux installation.
The 3 files necessary to build Linux device driver are dl2k.c, dl2k.h and
Makefile. To compile, the Linux installation must include the gcc compiler,
the kernel source, and the kernel headers. The Linux driver supports Linux
Kernels 2.4.7. Copy the files to a directory and enter the following command
to compile and link the driver:
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 /root] mkdir dl2k
[root@XXX /root] cd dl2k
[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
-----------------
::
[root@XXX /] cd root
[root@XXX /root] mkdir dl2k
[root@XXX /root] cd dl2k
[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
=====================
Manual Installation
-------------------
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
module enter the command::
insmod dl2k.o
or::
insmod dl2k.o <optional parameter> ; add parameter
---------------------------------------------------------
example::
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
the Linux device driver below.
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,
it is necessary to issue the following command::
ifconfig eth0 up
Finally, to bind the driver to the active protocol (e.g., TCP/IP with
Linux), enter the following command::
ifup eth0
Note that this is meaningful only if the system can find a configuration
script that contains the necessary network information. A sample will be
given in the next paragraph.
The commands to unload a driver are as follows::
ifdown eth0
ifconfig eth0 down
rmmod dl2k.o
The following are the commands to list the currently loaded modules and
to see the current network configuration::
lsmod
ifconfig
Automated Installation
----------------------
This section describes how to install the driver such that it is
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
other distributions as well.
Red Hat v6.x/v7.x
-----------------
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.
2. Locate the boot module configuration file, most commonly in the
/etc/modprobe.d/ directory. Add the following lines::
alias ethx dl2k
options dl2k <optional parameters>
where ethx will be eth0 if the NIC is the only ethernet adapter, eth1 if
one other ethernet adapter is installed, etc. Refer to the table in the
previous section for the list of optional parameters.
3. Locate the network configuration scripts, normally the
/etc/sysconfig/network-scripts directory, and create a configuration
script named ifcfg-ethx that contains network information.
4. Note that for most Linux distributions, Red Hat included, a configuration
utility with a graphical user interface is provided to perform steps 2
and 3 above.
Parameter Description
=====================
You can install this driver without any additional parameter. However, if you
are going to have extensive functions then it is necessary to set extra
parameter. Below is a list of the command line parameters supported by the
Linux device
driver.
=============================== ==============================================
mtu=packet_size Specifies the maximum packet size. default
is 1500.
media=media_type Specifies the media type the NIC operates at.
autosense Autosensing active media.
=========== =========================
10mbps_hd 10Mbps half duplex.
10mbps_fd 10Mbps full duplex.
100mbps_hd 100Mbps half duplex.
100mbps_fd 100Mbps full duplex.
1000mbps_fd 1000Mbps full duplex.
1000mbps_hd 1000Mbps half duplex.
0 Autosensing active media.
1 10Mbps half duplex.
2 10Mbps full duplex.
3 100Mbps half duplex.
4 100Mbps full duplex.
5 1000Mbps half duplex.
6 1000Mbps full duplex.
=========== =========================
By default, the NIC operates at autosense.
1000mbps_fd and 1000mbps_hd types are only
available for fiber adapter.
vlan=n Specifies the VLAN ID. If vlan=0, the
Virtual Local Area Network (VLAN) function is
disable.
jumbo=[0|1] Specifies the jumbo frame support. If jumbo=1,
the NIC accept jumbo frames. By default, this
function is disabled.
Jumbo frame usually improve the performance
int gigabit.
This feature need jumbo frame compatible
remote.
rx_coalesce=m Number of rx frame handled each interrupt.
rx_timeout=n Rx DMA wait time for an interrupt.
If set rx_coalesce > 0, hardware only assert
an interrupt for m frames. Hardware won't
assert rx interrupt until m frames received or
reach timeout of n * 640 nano seconds.
Set proper rx_coalesce and rx_timeout can
reduce congestion collapse and overload which
has been a bottleneck for high speed network.
For example, rx_coalesce=10 rx_timeout=800.
that is, hardware assert only 1 interrupt
for 10 frames received or timeout of 512 us.
tx_coalesce=n Number of tx frame handled each interrupt.
Set n > 1 can reduce the interrupts
congestion usually lower performance of
high speed network card. Default is 16.
tx_flow=[1|0] Specifies the Tx flow control. If tx_flow=0,
the Tx flow control disable else driver
autodetect.
rx_flow=[1|0] Specifies the Rx flow control. If rx_flow=0,
the Rx flow control enable else driver
autodetect.
=============================== ==============================================
Configuration Script Sample
===========================
Here is a sample of a simple configuration script::
DEVICE=eth0
USERCTL=no
ONBOOT=yes
POOTPROTO=none
BROADCAST=207.200.5.255
NETWORK=207.200.5.0
NETMASK=255.255.255.0
IPADDR=207.200.5.2
Troubleshooting
===============
Q1. Source files contain ^ M behind every line.
Make sure all files are Unix file format (no LF). Try the following
shell command to convert files::
cat dl2k.c | col -b > dl2k.tmp
mv dl2k.tmp dl2k.c
OR::
cat dl2k.c | tr -d "\r" > dl2k.tmp
mv dl2k.tmp dl2k.c
Q2: Could not find header files (``*.h``)?
To compile the driver, you need kernel header files. After
installing the kernel source, the header files are usually located in
/usr/src/linux/include, which is the default include directory configured
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
INCLUDEDIR in Makefile to /usr/include without installing kernel source.
Note that RH 7.0 didn't provide correct header files in /usr/include,
including those files will make a wrong version driver.
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
문서 개요와 호환성
1-38D-Link DL2000 기반 기가비트 이더넷 어댑터 설치
2002년 5월 23일
목차
- 호환성 목록
- 빠른 설치
- 드라이버 컴파일
- 드라이버 설치
- 옵션 매개변수
- 구성 스크립트 예
- 문제 해결
호환성 목록
지원 어댑터
- D-Link DGE-550T Gigabit Ethernet Adapter
- D-Link DGE-550SX Gigabit Ethernet Adapter
- D-Link DL2000 기반 Gigabit Ethernet Adapter
드라이버는 Linux 커널 2.4.7 이후 버전을 지원합니다. 당시 다음 환경에서 시험했습니다.
- Red Hat 6.2, 커널을 2.4.7로 갱신
- Red Hat 7.0, 커널을 2.4.7로 갱신
- Red Hat 7.1, 커널 2.4.7
- Red Hat 7.2, 커널 2.4.7-10
.. SPDX-License-Identifier: GPL-2.0
=========================================================
D-Link DL2000-based Gigabit Ethernet Adapter Installation
=========================================================
May 23, 2002
.. Contents
- Compatibility List
- Quick Install
- Compiling the Driver
- Installing the Driver
- Option parameter
- Configuration Script Sample
- Troubleshooting
Compatibility List
==================
Adapter Support:
- D-Link DGE-550T Gigabit Ethernet Adapter.
- D-Link DGE-550SX Gigabit Ethernet Adapter.
- D-Link DL2000-based Gigabit Ethernet Adapter.
The driver support Linux kernel 2.4.7 later. We had tested it
on the environments below.
. Red Hat v6.2 (update kernel to 2.4.7)
. Red Hat v7.0 (update kernel to 2.4.7)
. Red Hat v7.1 (kernel 2.4.7)
. Red Hat v7.2 (kernel 2.4.7-10)
빠른 설치와 드라이버 빌드
39-106빠른 설치
다음 명령 순서로 Linux 드라이버를 설치합니다.
1. make all
2. insmod dl2k.ko
3. ifconfig eth0 up 10.xxx.xxx.xxx netmask 255.0.0.0
^^^^^^^^^^^^^^ ^^^^^^^^^
IP NETMASK
이제 `eth0`가 활성 상태여야 합니다. `ping`으로 시험하거나 `ifconfig`로 자세한 정보를 확인합니다. 시험이 성공하면 다음 단계로 진행합니다.
4. 모듈을 현재 커널의 네트워크 드라이버 디렉터리에 복사합니다.
cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net
5. `/etc/modprobe.d/dl2k.conf`에 다음 줄을 추가합니다.
alias eth0 dl2k
6. `depmod`를 실행해 모듈 인덱스를 갱신합니다.
7. `netconfig` 또는 `netconf`를 실행해 `/etc/sysconfig/network-scripts`에 `ifcfg-eth0` 구성 스크립트를 만들거나 직접 작성합니다. 구성 스크립트 예 절을 참조하십시오.
8. 다음 부팅부터 드라이버가 자동으로 적재되고 구성됩니다.
드라이버 컴파일
Linux에서는 NIC 드라이버를 적재 가능한 모듈로 구성하는 것이 일반적입니다. 단일 커널로 빌드하는 방식은 오래되었으며 이 드라이버를 커널 일부로 컴파일할 수도 있지만 강하게 권장하지 않습니다. 이 절의 나머지 내용은 적재 가능한 모듈로 빌드한다고 가정합니다.
Linux 환경에서는 사전 컴파일 버전에 의존하기보다 소스에서 드라이버를 다시 빌드하는 것이 좋습니다. 사전 컴파일 드라이버는 설치된 Linux에 없는 라이브러리나 커널 기능에 의존할 수 있으므로 소스 빌드가 더 안정적입니다.
Linux 장치 드라이버를 빌드하는 데 필요한 파일은 `dl2k.c`, `dl2k.h`, `Makefile`입니다. gcc 컴파일러, 커널 소스와 커널 헤더가 설치되어 있어야 합니다. 이 문서의 드라이버는 Linux 커널 2.4.7을 지원합니다. 파일을 한 디렉터리에 복사하고 다음 명령으로 컴파일하고 링크합니다.
CD-ROM 드라이브에서 빌드
[root@XXX /] mkdir cdrom
[root@XXX /] mount -r -t iso9660 -o conv=auto /dev/cdrom /cdrom
[root@XXX /] cd root
[root@XXX /root] mkdir dl2k
[root@XXX /root] cd dl2k
[root@XXX dl2k] cp /cdrom/linux/dl2k.tgz /root/dl2k
[root@XXX dl2k] tar xfvz dl2k.tgz
[root@XXX dl2k] make all
플로피 디스크 드라이브에서 빌드
[root@XXX /] cd root
[root@XXX /root] mkdir dl2k
[root@XXX /root] cd dl2k
[root@XXX dl2k] mcopy a:/linux/dl2k.tgz /root/dl2k
[root@XXX dl2k] tar xfvz dl2k.tgz
[root@XXX dl2k] make all
Quick Install
=============
Install linux driver as following command::
1. make all
2. insmod dl2k.ko
3. ifconfig eth0 up 10.xxx.xxx.xxx netmask 255.0.0.0
^^^^^^^^^^^^^^^\ ^^^^^^^^\
IP NETMASK
Now eth0 should active, you can test it by "ping" or get more information by
"ifconfig". If tested ok, continue the next step.
4. ``cp dl2k.ko /lib/modules/`uname -r`/kernel/drivers/net``
5. Add the following line to /etc/modprobe.d/dl2k.conf::
alias eth0 dl2k
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.
[see - Configuration Script Sample]
8. Driver will automatically load and configure at next boot time.
Compiling the Driver
====================
In Linux, NIC drivers are most commonly configured as loadable modules.
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.
The remainder of this section assumes the driver is built as a loadable module.
In the Linux environment, it is a good idea to rebuild the driver from the
source instead of relying on a precompiled version. This approach provides
better reliability since a precompiled driver might depend on libraries or
kernel features that are not present in a given Linux installation.
The 3 files necessary to build Linux device driver are dl2k.c, dl2k.h and
Makefile. To compile, the Linux installation must include the gcc compiler,
the kernel source, and the kernel headers. The Linux driver supports Linux
Kernels 2.4.7. Copy the files to a directory and enter the following command
to compile and link the driver:
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 /root] mkdir dl2k
[root@XXX /root] cd dl2k
[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
-----------------
::
[root@XXX /] cd root
[root@XXX /root] mkdir dl2k
[root@XXX /root] cd dl2k
[root@XXX dl2k] mcopy a:/linux/dl2k.tgz /root/dl2k
[root@XXX dl2k] tar xfvz dl2k.tgz
[root@XXX dl2k] make all
수동 설치와 부팅 시 자동 설치
107-197드라이버 설치
수동 설치
드라이버를 컴파일한 뒤 네트워크 연결을 구성하려면 드라이버를 적재하고 활성화한 다음 프로토콜 스택에 연결해야 합니다. 모듈을 적재하려면 다음 명령을 입력합니다.
insmod dl2k.o
선택적 매개변수를 함께 전달할 수도 있습니다.
insmod dl2k.o <optional parameter>
예
insmod dl2k.o media=100mbps_hd
insmod dl2k.o media=3
insmod dl2k.o media=3,2 # 카드 2개
Linux 장치 드라이버가 지원하는 명령줄 매개변수 목록은 뒤의 매개변수 설명 절을 참조하십시오.
`insmod`는 드라이버를 적재하고 `eth0`, `eth1` 같은 이름만 부여합니다. NIC를 동작 상태로 만들려면 다음 명령이 필요합니다.
ifconfig eth0 up
마지막으로 드라이버를 활성 프로토콜, 예를 들어 Linux의 TCP/IP에 연결하려면 다음 명령을 사용합니다.
ifup eth0
이 명령은 시스템이 필요한 네트워크 정보가 들어 있는 구성 스크립트를 찾을 수 있을 때만 의미가 있습니다. 다음 절에 예가 있습니다.
드라이버를 내리는 명령
ifdown eth0
ifconfig eth0 down
rmmod dl2k.o
현재 적재된 모듈과 네트워크 구성을 확인하는 명령
lsmod
ifconfig
자동 설치
이 절은 부팅할 때 드라이버가 자동으로 적재되고 구성되도록 설치하는 방법을 설명합니다. Red Hat 6.0/7.0을 기준으로 하지만 다른 배포판에도 쉽게 옮길 수 있습니다.
Red Hat 6.x/7.x
- 1. `dl2k.o`를 일반적으로 `/lib/modules/2.x.x-xx/net` 또는 `/lib/modules/2.x.x/kernel/drivers/net`인 네트워크 모듈 디렉터리에 복사합니다.
- 2. 보통 `/etc/modprobe.d/`에 있는 부팅 모듈 구성 파일을 찾아 alias와 options 줄을 추가합니다.
alias ethx dl2k
options dl2k <optional parameters>
`ethx`는 이 NIC가 유일한 이더넷 어댑터이면 `eth0`, 다른 이더넷 어댑터가 하나 설치되어 있으면 `eth1`이 되는 식입니다. 선택적 매개변수는 앞 절의 표를 참조하십시오.
- 3. 일반적으로 `/etc/sysconfig/network-scripts`인 네트워크 구성 스크립트 디렉터리를 찾아 네트워크 정보가 들어 있는 `ifcfg-ethx`를 만듭니다.
- 4. Red Hat을 포함한 대부분의 Linux 배포판은 2단계와 3단계를 수행하는 GUI 구성 도구를 제공합니다.
Installing the Driver
=====================
Manual Installation
-------------------
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
module enter the command::
insmod dl2k.o
or::
insmod dl2k.o <optional parameter> ; add parameter
---------------------------------------------------------
example::
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
the Linux device driver below.
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,
it is necessary to issue the following command::
ifconfig eth0 up
Finally, to bind the driver to the active protocol (e.g., TCP/IP with
Linux), enter the following command::
ifup eth0
Note that this is meaningful only if the system can find a configuration
script that contains the necessary network information. A sample will be
given in the next paragraph.
The commands to unload a driver are as follows::
ifdown eth0
ifconfig eth0 down
rmmod dl2k.o
The following are the commands to list the currently loaded modules and
to see the current network configuration::
lsmod
ifconfig
Automated Installation
----------------------
This section describes how to install the driver such that it is
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
other distributions as well.
Red Hat v6.x/v7.x
-----------------
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.
2. Locate the boot module configuration file, most commonly in the
/etc/modprobe.d/ directory. Add the following lines::
alias ethx dl2k
options dl2k <optional parameters>
where ethx will be eth0 if the NIC is the only ethernet adapter, eth1 if
one other ethernet adapter is installed, etc. Refer to the table in the
previous section for the list of optional parameters.
3. Locate the network configuration scripts, normally the
/etc/sysconfig/network-scripts directory, and create a configuration
script named ifcfg-ethx that contains network information.
4. Note that for most Linux distributions, Red Hat included, a configuration
utility with a graphical user interface is provided to perform steps 2
and 3 above.
드라이버 옵션 매개변수
198-273매개변수 설명
추가 매개변수 없이도 드라이버를 설치할 수 있습니다. 확장 기능을 사용하려면 추가 매개변수를 설정해야 합니다. Linux 장치 드라이버가 지원하는 명령줄 매개변수는 다음과 같습니다.
`mtu=packet_size`
최대 패킷 크기를 지정합니다. 기본값은 1500입니다.
`media=media_type`
NIC가 동작할 매체 유형을 지정합니다. `autosense`는 활성 매체를 자동 감지합니다.
| 문자열 또는 값 | 링크 모드 |
|---|---|
| 10mbps_hd / 1 | 10Mbps 반이중 |
| 10mbps_fd / 2 | 10Mbps 전이중 |
| 100mbps_hd / 3 | 100Mbps 반이중 |
| 100mbps_fd / 4 | 100Mbps 전이중 |
| 1000mbps_hd / 5 | 1000Mbps 반이중 |
| 1000mbps_fd / 6 | 1000Mbps 전이중 |
| autosense / 0 | 활성 매체 자동 감지 |
기본적으로 NIC는 자동 감지로 동작합니다. `1000mbps_fd`와 `1000mbps_hd`는 광 어댑터에서만 사용할 수 있습니다.
`vlan=n`
VLAN ID를 지정합니다. `vlan=0`이면 Virtual Local Area Network 기능을 끕니다.
`jumbo=0` 또는 `jumbo=1`
점보 프레임 지원을 지정합니다. `jumbo=1`이면 NIC가 점보 프레임을 받습니다. 기본값은 비활성화입니다. 점보 프레임은 일반적으로 기가비트 환경의 성능을 개선하지만 통신 상대도 점보 프레임과 호환되어야 합니다.
`rx_coalesce=m`
인터럽트 한 번에 처리할 수신 프레임 수입니다.
`rx_timeout=n`
수신 인터럽트를 기다리는 DMA 시간입니다. `rx_coalesce > 0`이면 하드웨어는 프레임 `m`개를 받을 때만 인터럽트를 발생시키며, `m`개를 받거나 `n × 640ns` 제한 시간에 도달할 때까지 수신 인터럽트를 발생시키지 않습니다. 적절한 `rx_coalesce`와 `rx_timeout`은 고속 네트워크 병목인 혼잡 붕괴와 과부하를 줄일 수 있습니다.
예를 들어 `rx_coalesce=10 rx_timeout=800`은 프레임 10개를 받거나 512us 제한 시간에 도달할 때 인터럽트 하나만 발생시킵니다.
`tx_coalesce=n`
인터럽트 한 번에 처리할 송신 프레임 수입니다. `n > 1`로 설정하면 고속 네트워크 카드의 성능을 낮추는 인터럽트 혼잡을 줄일 수 있습니다. 기본값은 16입니다.
`tx_flow=1` 또는 `tx_flow=0`
송신 흐름 제어를 지정합니다. `tx_flow=0`이면 송신 흐름 제어를 끄고, 그렇지 않으면 드라이버가 자동 감지합니다.
`rx_flow=1` 또는 `rx_flow=0`
수신 흐름 제어를 지정합니다. 원문에는 `rx_flow=0`이면 수신 흐름 제어를 활성화하고, 그렇지 않으면 드라이버가 자동 감지한다고 기록되어 있습니다.
Parameter Description
=====================
You can install this driver without any additional parameter. However, if you
are going to have extensive functions then it is necessary to set extra
parameter. Below is a list of the command line parameters supported by the
Linux device
driver.
=============================== ==============================================
mtu=packet_size Specifies the maximum packet size. default
is 1500.
media=media_type Specifies the media type the NIC operates at.
autosense Autosensing active media.
=========== =========================
10mbps_hd 10Mbps half duplex.
10mbps_fd 10Mbps full duplex.
100mbps_hd 100Mbps half duplex.
100mbps_fd 100Mbps full duplex.
1000mbps_fd 1000Mbps full duplex.
1000mbps_hd 1000Mbps half duplex.
0 Autosensing active media.
1 10Mbps half duplex.
2 10Mbps full duplex.
3 100Mbps half duplex.
4 100Mbps full duplex.
5 1000Mbps half duplex.
6 1000Mbps full duplex.
=========== =========================
By default, the NIC operates at autosense.
1000mbps_fd and 1000mbps_hd types are only
available for fiber adapter.
vlan=n Specifies the VLAN ID. If vlan=0, the
Virtual Local Area Network (VLAN) function is
disable.
jumbo=[0|1] Specifies the jumbo frame support. If jumbo=1,
the NIC accept jumbo frames. By default, this
function is disabled.
Jumbo frame usually improve the performance
int gigabit.
This feature need jumbo frame compatible
remote.
rx_coalesce=m Number of rx frame handled each interrupt.
rx_timeout=n Rx DMA wait time for an interrupt.
If set rx_coalesce > 0, hardware only assert
an interrupt for m frames. Hardware won't
assert rx interrupt until m frames received or
reach timeout of n * 640 nano seconds.
Set proper rx_coalesce and rx_timeout can
reduce congestion collapse and overload which
has been a bottleneck for high speed network.
For example, rx_coalesce=10 rx_timeout=800.
that is, hardware assert only 1 interrupt
for 10 frames received or timeout of 512 us.
tx_coalesce=n Number of tx frame handled each interrupt.
Set n > 1 can reduce the interrupts
congestion usually lower performance of
high speed network card. Default is 16.
tx_flow=[1|0] Specifies the Tx flow control. If tx_flow=0,
the Tx flow control disable else driver
autodetect.
rx_flow=[1|0] Specifies the Rx flow control. If rx_flow=0,
the Rx flow control enable else driver
autodetect.
=============================== ==============================================
네트워크 구성 스크립트 예
274-287구성 스크립트 예
다음은 간단한 구성 스크립트 예입니다.
DEVICE=eth0
USERCTL=no
ONBOOT=yes
POOTPROTO=none
BROADCAST=207.200.5.255
NETWORK=207.200.5.0
NETMASK=255.255.255.0
IPADDR=207.200.5.2
원문에는 일반적인 `BOOTPROTO`가 아니라 `POOTPROTO`로 적혀 있습니다. 원문 보존을 위해 그대로 표시했으며 실제 구성에서는 사용 중인 배포판의 변수 이름을 확인해야 합니다.
Configuration Script Sample
===========================
Here is a sample of a simple configuration script::
DEVICE=eth0
USERCTL=no
ONBOOT=yes
POOTPROTO=none
BROADCAST=207.200.5.255
NETWORK=207.200.5.0
NETMASK=255.255.255.0
IPADDR=207.200.5.2
줄 끝 문자와 커널 헤더 문제 해결
288-314문제 해결
Q1. 소스 파일의 모든 줄 뒤에 `^M`이 있습니다.
모든 파일이 Unix 줄 끝 형식인지 확인합니다. 원문은 괄호 안에 `no LF`라고 적었지만, 제시한 명령은 CR 문자 `\r`를 제거합니다. 다음 셸 명령 중 하나로 파일을 변환합니다.
cat dl2k.c | col -b > dl2k.tmp
mv dl2k.tmp dl2k.c
또는
cat dl2k.c | tr -d "\r" > dl2k.tmp
mv dl2k.tmp dl2k.c
Q2. 헤더 파일(`*.h`)을 찾을 수 없습니다.
드라이버를 컴파일하려면 커널 헤더 파일이 필요합니다. 커널 소스를 설치하면 일반적으로 헤더는 `Makefile`의 기본 include 디렉터리인 `/usr/src/linux/include`에 있습니다.
일부 배포판은 `/usr/src/include/linux`와 `/usr/src/include/asm`에도 헤더 사본을 둡니다. 이 경우 커널 소스를 설치하지 않고 `Makefile`의 `INCLUDEDIR`을 `/usr/include`로 바꿀 수 있습니다.
Red Hat 7.0은 `/usr/include`에 올바른 헤더를 제공하지 않았습니다. 그 파일을 포함하면 잘못된 버전의 드라이버가 만들어집니다.
Troubleshooting
===============
Q1. Source files contain ^ M behind every line.
Make sure all files are Unix file format (no LF). Try the following
shell command to convert files::
cat dl2k.c | col -b > dl2k.tmp
mv dl2k.tmp dl2k.c
OR::
cat dl2k.c | tr -d "\r" > dl2k.tmp
mv dl2k.tmp dl2k.c
Q2: Could not find header files (``*.h``)?
To compile the driver, you need kernel header files. After
installing the kernel source, the header files are usually located in
/usr/src/linux/include, which is the default include directory configured
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
INCLUDEDIR in Makefile to /usr/include without installing kernel source.
Note that RH 7.0 didn't provide correct header files in /usr/include,
including those files will make a wrong version driver.
요약·해설
dl2k.rst:1-314이 문서는 Linux 2.4.7과 Red Hat 6·7 시기의 설치 절차를 담고 있습니다. 장치와 옵션 의미는 참고할 수 있지만 `.o` 모듈, `insmod`, `ifconfig`, `ifcfg`와 LKM 디렉터리 경로는 현대 배포판에서 달라졌으므로 현재 커널 문서와 네트워크 관리 도구를 우선해야 합니다.
문서가 명시한 어댑터와 시험 환경입니다.
빌드부터 다음 부팅의 자동 적재까지 이어지는 역사적 절차입니다.
소스 빌드에 필요한 파일과 시스템 구성 요소입니다.
모듈 적재만으로는 네트워크 프로토콜 구성이 끝나지 않습니다.
인터페이스와 프로토콜 구성을 내린 뒤 모듈을 제거합니다.
문자열과 숫자 값이 같은 링크 모드를 가리킵니다.
MTU, VLAN, 점보 프레임의 기본 동작입니다.
프레임 수와 제한 시간 중 먼저 충족되는 조건이 인터럽트를 발생시킵니다.
원문의 `rx_coalesce=10 rx_timeout=800` 계산입니다.
원문에 기록된 Tx/Rx 옵션 동작을 그대로 구분합니다.
원문 예제의 오타와 적용 전 확인 항목입니다.
Windows CR 문자를 제거한 뒤 원본 파일을 교체합니다.
커널과 맞지 않는 헤더를 사용하면 잘못된 모듈이 만들어집니다.