← Documents Documentation/networking/devlink/devlink-eswitch-attr.rst GitHub 원문 ↗

Linux 6.18.37 · Networking

Devlink E-Switch Attribute

E-Switch의 legacy·switchdev mode 차이와 mode, inline-mode, encap-mode attribute 및 devlink 설정 명령을 설명합니다.

Source pathDocumentation/networking/devlink/devlink-eswitch-attr.rst
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 .. SPDX-License-Identifier: GPL-2.0
2
3 ==========================
4 Devlink E-Switch Attribute
5 ==========================
6
7 Devlink E-Switch supports two modes of operation: legacy and switchdev.
8 Legacy mode operates based on traditional MAC/VLAN steering rules. Switching
9 decisions are made based on MAC addresses, VLANs, etc. There is limited ability
10 to offload switching rules to hardware.
11
12 On the other hand, switchdev mode allows for more advanced offloading
13 capabilities of the E-Switch to hardware. In switchdev mode, more switching
14 rules and logic can be offloaded to the hardware switch ASIC. It enables
15 representor netdevices that represent the slow path of virtual functions (VFs)
16 or scalable-functions (SFs) of the device. See more information about
17 :ref:`Documentation/networking/switchdev.rst <switchdev>` and
18 :ref:`Documentation/networking/representors.rst <representors>`.
19
20 In addition, the devlink E-Switch also comes with other attributes listed
21 in the following section.
22
23 Attributes Description
24 ======================
25
26 The following is a list of E-Switch attributes.
27
28 .. list-table:: E-Switch attributes
29 :widths: 8 5 45
30
31 * - Name
32 - Type
33 - Description
34 * - ``mode``
35 - enum
36 - The mode of the device. The mode can be one of the following:
37
38 * ``legacy`` operates based on traditional MAC/VLAN steering
39 rules.
40 * ``switchdev`` allows for more advanced offloading capabilities of
41 the E-Switch to hardware.
42 * - ``inline-mode``
43 - enum
44 - Some HWs need the VF driver to put part of the packet
45 headers on the TX descriptor so the e-switch can do proper
46 matching and steering. Support for both switchdev mode and legacy mode.
47
48 * ``none`` none.
49 * ``link`` L2 mode.
50 * ``network`` L3 mode.
51 * ``transport`` L4 mode.
52 * - ``encap-mode``
53 - enum
54 - The encapsulation mode of the device. Support for both switchdev mode
55 and legacy mode. The mode can be one of the following:
56
57 * ``none`` Disable encapsulation support.
58 * ``basic`` Enable encapsulation support.
59
60 Example Usage
61 =============
62
63 .. code:: shell
64
65 # enable switchdev mode
66 $ devlink dev eswitch set pci/0000:08:00.0 mode switchdev
67
68 # set inline-mode and encap-mode
69 $ devlink dev eswitch set pci/0000:08:00.0 inline-mode none encap-mode basic
70
71 # display devlink device eswitch attributes
72 $ devlink dev eswitch show pci/0000:08:00.0
73 pci/0000:08:00.0: mode switchdev inline-mode none encap-mode basic
74
75 # enable encap-mode with legacy mode
76 $ devlink dev eswitch set pci/0000:08:00.0 mode legacy inline-mode none encap-mode basic
77

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.