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

Linux 6.18.37 · Networking

Devlink Line Card

modular switch의 line card slot을 type별로 provisioning하고 port·netdevice resource와 carrier, card state transition을 관리하는 devlink-linecard mechanism을 설명합니다.

Source pathDocumentation/networking/devlink/devlink-linecard.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 Line card
5 =================
6
7 Background
8 ==========
9
10 The ``devlink-linecard`` mechanism is targeted for manipulation of
11 line cards that serve as a detachable PHY modules for modular switch
12 system. Following operations are provided:
13
14 * Get a list of supported line card types.
15 * Provision of a slot with specific line card type.
16 * Get and monitor of line card state and its change.
17
18 Line card according to the type may contain one or more gearboxes
19 to mux the lanes with certain speed to multiple ports with lanes
20 of different speed. Line card ensures N:M mapping between
21 the switch ASIC modules and physical front panel ports.
22
23 Overview
24 ========
25
26 Each line card devlink object is created by device driver,
27 according to the physical line card slots available on the device.
28
29 Similar to splitter cable, where the device might have no way
30 of detection of the splitter cable geometry, the device
31 might not have a way to detect line card type. For that devices,
32 concept of provisioning is introduced. It allows the user to:
33
34 * Provision a line card slot with certain line card type
35
36 - Device driver would instruct the ASIC to prepare all
37 resources accordingly. The device driver would
38 create all instances, namely devlink port and netdevices
39 that reside on the line card, according to the line card type
40 * Manipulate of line card entities even without line card
41 being physically connected or powered-up
42 * Setup splitter cable on line card ports
43
44 - As on the ordinary ports, user may provision a splitter
45 cable of a certain type, without the need to
46 be physically connected to the port
47 * Configure devlink ports and netdevices
48
49 Netdevice carrier is decided as follows:
50
51 * Line card is not inserted or powered-down
52
53 - The carrier is always down
54 * Line card is inserted and powered up
55
56 - The carrier is decided as for ordinary port netdevice
57
58 Line card state
59 ===============
60
61 The ``devlink-linecard`` mechanism supports the following line card states:
62
63 * ``unprovisioned``: Line card is not provisioned on the slot.
64 * ``unprovisioning``: Line card slot is currently being unprovisioned.
65 * ``provisioning``: Line card slot is currently in a process of being provisioned
66 with a line card type.
67 * ``provisioning_failed``: Provisioning was not successful.
68 * ``provisioned``: Line card slot is provisioned with a type.
69 * ``active``: Line card is powered-up and active.
70
71 The following diagram provides a general overview of ``devlink-linecard``
72 state transitions::
73
74 +-------------------------+
75 | |
76 +----------------------------------> unprovisioned |
77 | | |
78 | +--------|-------^--------+
79 | | |
80 | | |
81 | +--------v-------|--------+
82 | | |
83 | | provisioning |
84 | | |
85 | +------------|------------+
86 | |
87 | +-----------------------------+
88 | | |
89 | +------------v------------+ +------------v------------+ +-------------------------+
90 | | | | ----> |
91 +----- provisioning_failed | | provisioned | | active |
92 | | | | <---- |
93 | +------------^------------+ +------------|------------+ +-------------------------+
94 | | |
95 | | |
96 | | +------------v------------+
97 | | | |
98 | | | unprovisioning |
99 | | | |
100 | | +------------|------------+
101 | | |
102 | +-----------------------------+
103 | |
104 +-----------------------------------------------+
105
106
107 Example usage
108 =============
109
110 .. code:: shell
111
112 $ devlink lc show [ DEV [ lc LC_INDEX ] ]
113 $ devlink lc set DEV lc LC_INDEX [ { type LC_TYPE | notype } ]
114
115 # Show current line card configuration and status for all slots:
116 $ devlink lc
117
118 # Set slot 8 to be provisioned with type "16x100G":
119 $ devlink lc set pci/0000:01:00.0 lc 8 type 16x100G
120
121 # Set slot 8 to be unprovisioned:
122 $ devlink lc set pci/0000:01:00.0 lc 8 notype
123

3. 한국어 전문 번역

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