Logo

Linux 核心

6.16.0-rc4

快速搜尋

目錄

  • 開發流程
  • 提交補丁
  • 行為準則
  • 維護者手冊
  • 所有開發流程文件
  • 核心 API
  • 驅動 API
  • 子系統
    • 核心子系統
    • 人機介面
    • 網路介面
      • 網路
      • NetLabel
      • InfiniBand
      • ISDN
      • MHI
    • 儲存介面
    • 其他子系統
  • 鎖
  • 許可規則
  • 編寫文件
  • 開發工具
  • 測試指南
  • Hacking 指南
  • 追蹤
  • 故障注入
  • Livepatching
  • Rust
  • 管理
  • 構建系統
  • 報告問題
  • 使用者空間工具
  • 使用者空間 API
  • 韌體
  • 韌體和裝置樹
  • CPU 架構
  • 未分類文件
  • 翻譯

本頁

  • 顯示原始碼

Family ovs_flow netlink 規範¶

目錄

  • Family ovs_flow netlink 規範

    • 概要

    • 操作

      • get

      • new

    • 多播組

    • 定義

      • ovs-header

      • ovs-flow-stats

      • ovs-key-ethernet

      • ovs-key-mpls

      • ovs-key-ipv4

      • ovs-key-ipv6

      • ovs-key-ipv6-exthdrs

      • ovs-frag-type

      • ovs-key-tcp

      • ovs-key-udp

      • ovs-key-sctp

      • ovs-key-icmp

      • ovs-key-arp

      • ovs-key-nd

      • ovs-key-ct-tuple-ipv4

      • ovs-action-push-vlan

      • ovs-ufid-flags

      • ovs-action-hash

      • ovs-hash-alg

      • ovs-action-push-mpls

      • ovs-action-add-mpls

      • ct-state-flags

    • 屬性集

      • flow-attrs

      • key-attrs

      • action-attrs

      • tunnel-key-attrs

      • check-pkt-len-attrs

      • sample-attrs

      • userspace-attrs

      • ovs-nsh-key-attrs

      • ct-attrs

      • nat-attrs

      • dec-ttl-attrs

      • vxlan-ext-attrs

      • psample-attrs

概要¶

透過通用 netlink 進行 OVS 流配置。

操作¶

get¶

獲取/轉儲 OVS 流配置和狀態

值:

3

屬性集:

flow-attrs

操作:
請求
屬性:

[key, ufid, ufid-flags]

回覆
屬性:

[key, ufid, mask, stats, actions]

轉儲:
請求
屬性:

[key, ufid, ufid-flags]

回覆
屬性:

[key, ufid, mask, stats, actions]

new¶

在資料路徑中建立 OVS 流配置

值:

1

屬性集:

flow-attrs

操作:
請求
屬性:

[key, ufid, mask, actions]

多播組¶

  • ovs_flow

定義¶

ovs-header¶

型別:

結構體

文件:

OVS 通用 Netlink 訊息的頭部。

成員:
dp-ifindex (u32):

資料路徑本地埠的 ifindex(0 表示請求不特定於某個資料路徑)。

ovs-flow-stats¶

型別:

結構體

成員:
n-packets (u64):

匹配的資料包數量。

n-bytes (u64):

匹配的位元組數量。

ovs-key-ethernet¶

型別:

結構體

成員:
eth-src (binary):

eth-dst (binary):

ovs-key-mpls¶

型別:

結構體

成員:
mpls-lse (u32):

ovs-key-ipv4¶

型別:

結構體

成員:
ipv4-src (u32):

ipv4-dst (u32):

ipv4-proto (u8):

ipv4-tos (u8):

ipv4-ttl (u8):

ipv4-frag (u8):

ovs-key-ipv6¶

型別:

結構體

成員:
ipv6-src (binary):

ipv6-dst (binary):

ipv6-label (u32):

ipv6-proto (u8):

ipv6-tclass (u8):

ipv6-hlimit (u8):

ipv6-frag (u8):

ovs-key-ipv6-exthdrs¶

型別:

結構體

成員:
hdrs (u16):

ovs-frag-type¶

name-prefix:

ovs-frag-type-

enum-name:

ovs-frag-type

型別:

列舉

條目:
none:

資料包不是分片。

first:

資料包是偏移量為 0 的分片。

later:

資料包是偏移量非零的分片。

any:

ovs-key-tcp¶

型別:

結構體

成員:
tcp-src (u16):

tcp-dst (u16):

ovs-key-udp¶

型別:

結構體

成員:
udp-src (u16):

udp-dst (u16):

ovs-key-sctp¶

型別:

結構體

成員:
sctp-src (u16):

sctp-dst (u16):

ovs-key-icmp¶

型別:

結構體

成員:
icmp-type (u8):

icmp-code (u8):

ovs-key-arp¶

型別:

結構體

成員:
arp-sip (u32):

arp-tip (u32):

arp-op (u16):

arp-sha (binary):

arp-tha (binary):

ovs-key-nd¶

型別:

結構體

成員:
nd-target (binary):

nd-sll (binary):

nd-tll (binary):

ovs-key-ct-tuple-ipv4¶

型別:

結構體

成員:
ipv4-src (u32):

ipv4-dst (u32):

src-port (u16):

dst-port (u16):

ipv4-proto (u8):

ovs-action-push-vlan¶

型別:

結構體

成員:
vlan-tpid (u16):

要推送的標籤協議識別符號 (TPID)。

vlan-tci (u16):

要推送的標籤控制識別符號 (TCI)。

ovs-ufid-flags¶

name-prefix:

ovs-ufid-f-

enum-name:

無

型別:

標誌

條目:
  • omit-key

  • omit-mask

  • omit-actions

ovs-action-hash¶

型別:

結構體

成員:
hash-alg (u32):

用於在迴圈前計算雜湊的演算法。

hash-basis (u32):

用於計算雜湊的基礎。

ovs-hash-alg¶

enum-name:

ovs-hash-alg

型別:

列舉

文件:

資料路徑雜湊演算法,用於計算資料路徑雜湊。 演算法型別僅指定流中的哪些欄位將用作雜湊的一部分。 每個資料路徑都可以自由使用其自己的雜湊演算法。 雜湊值對於使用者空間守護程式是不透明的。

條目:
  • ovs-hash-alg-l4

ovs-action-push-mpls¶

型別:

結構體

成員:
mpls-lse (u32):

要推送的 MPLS 標籤棧條目

mpls-ethertype (u32):

要在封裝的乙太網幀中設定的 Ethertype。 ethertype 唯一應該給出的值是 ETH_P_MPLS_UC 和 ETH_P_MPLS_MC,表示 MPLS 單播或多播。 其他值將被拒絕。

ovs-action-add-mpls¶

型別:

結構體

成員:
mpls-lse (u32):

要推送的 MPLS 標籤棧條目

mpls-ethertype (u32):

要在封裝的乙太網幀中設定的 Ethertype。 ethertype 唯一應該給出的值是 ETH_P_MPLS_UC 和 ETH_P_MPLS_MC,表示 MPLS 單播或多播。 其他值將被拒絕。

tun-flags (u16):

MPLS 隧道屬性。

ct-state-flags¶

enum-name:

無

型別:

標誌

name-prefix:

ovs-cs-f-

條目:
new:

新連線的開始。

established:

現有連線的一部分

related:

與現有連線相關。

reply-dir:

流在回覆方向。

invalid:

無法跟蹤連線。

tracked:

已發生 Conntrack。

src-nat:

資料包的源地址/埠被 NAT 修改。

dst-nat:

資料包的目的地址/埠被 NAT 修改。

屬性集¶

flow-attrs¶

key (nest)¶

nested-attributes:

key-attrs

文件:

指定流鍵的巢狀屬性。 始終存在於通知中。 所有請求都需要(轉儲除外)。

actions (nest)¶

nested-attributes:

action-attrs

文件:

指定要對匹配鍵的資料包採取的操作的巢狀屬性。 始終存在於通知中。 OVS_FLOW_CMD_NEW 請求需要,OVS_FLOW_CMD_SET 請求可選。 沒有 OVS_FLOW_ATTR_ACTIONS 的 OVS_FLOW_CMD_SET 不會修改操作。 要清除操作,必須提供沒有任何巢狀屬性的 OVS_FLOW_ATTR_ACTIONS。

stats (binary)¶

struct:

ovs-flow-stats

文件:

此流的統計資訊。 如果統計資訊非零,則存在於通知中。 請求中忽略。

tcp-flags (u8)¶

文件:

一個 8 位值,給出在此流中資料包上看到的所有 TCP 標誌的 ORed 值。 僅存在於 TCP 流的通知中,並且僅當它非零時。 請求中忽略。

used (u64)¶

文件:

一個 64 位整數,給出系統單調時鐘上的時間(以毫秒為單位),該時間是上次為此流處理資料包的時間。 僅當已為此流處理資料包時才存在於通知中。 請求中忽略。

clear (flag)¶

文件:

如果在 OVS_FLOW_CMD_SET 請求中存在,則清除此流的上次使用時間、累積的 TCP 標誌和統計資訊。 否則在請求中忽略。 永遠不會出現在通知中。

mask (nest)¶

nested-attributes:

key-attrs

文件:

指定萬用字元流匹配的掩碼位的巢狀屬性。 掩碼位值“1”指定與相應流鍵位完全匹配,而掩碼位值“0”指定萬用字元匹配。 省略屬性被視為通配所有相應欄位。 所有請求都是可選的。 如果不存在,則所有流鍵位都是完全匹配位。

probe (binary)¶

文件:

流操作是功能探測,應禁止錯誤日誌記錄。

ufid (binary)¶

文件:

一個介於 1-16 個八位位元組之間的值,用於指定流的唯一識別符號。 使流透過此值而不是 OVS_FLOW_ATTR_KEY 屬性的值進行索引。 所有請求都是可選的。 如果使用此屬性建立流,則存在於通知中。

display-hint:

uuid

ufid-flags (u32)¶

enum:

ovs-ufid-flags

文件:

一個 32 位值,其中包含為流安裝和檢索提供替代語義的 ORed 標誌。 所有請求都是可選的。

pad (binary)¶

key-attrs¶

encap (nest)¶

nested-attributes:

key-attrs

優先順序 (u32)¶

入埠 (u32)¶

乙太網 (binary)¶

struct:

ovs-key-ethernet

文件:

結構體 ovs_key_ethernet

VLAN (u16)¶

位元組序:

大端

以太型別 (u16)¶

位元組序:

大端

IPv4 (binary)¶

struct:

ovs-key-ipv4

IPv6 (binary)¶

struct:

ovs-key-ipv6

文件:

結構體 ovs_key_ipv6

TCP (binary)¶

struct:

ovs-key-tcp

UDP (binary)¶

struct:

ovs-key-udp

ICMP (binary)¶

struct:

ovs-key-icmp

ICMPv6 (binary)¶

struct:

ovs-key-icmp

ARP (binary)¶

struct:

ovs-key-arp

文件:

結構體 ovs_key_arp

ND (binary)¶

struct:

ovs-key-nd

文件:

結構體 ovs_key_nd

skb-mark (u32)¶

隧道 (nest)¶

nested-attributes:

tunnel-key-attrs

SCTP (binary)¶

struct:

ovs-key-sctp

TCP 標誌 (u16)¶

位元組序:

大端

dp-hash (u32)¶

文件:

值 0 表示雜湊不是由資料路徑計算的。

recirc-id (u32)¶

MPLS (binary)¶

struct:

ovs-key-mpls

ct-state (u32)¶

enum:

ct-state-flags

列舉作為標誌:

真

ct-zone (u16)¶

文件:

連線跟蹤區域

ct-mark (u32)¶

文件:

連線跟蹤標記

ct-labels (binary)¶

display-hint:

十六進位制

文件:

16 位元組連線跟蹤標籤

ct-orig-tuple-ipv4 (binary)¶

struct:

ovs-key-ct-tuple-ipv4

ct-orig-tuple-ipv6 (binary)¶

文件:

結構體 ovs_key_ct_tuple_ipv6

NSH (nest)¶

nested-attributes:

ovs-nsh-key-attrs

packet-type (u32)¶

位元組序:

大端

文件:

不應傳送到核心

nd-extensions (binary)¶

文件:

不應傳送到核心

tunnel-info (binary)¶

文件:

結構體 ip_tunnel_info

ipv6-exthdrs (binary)¶

struct:

ovs-key-ipv6-exthdrs

文件:

結構體 ovs_key_ipv6_exthdr

action-attrs¶

輸出 (u32)¶

文件:

資料路徑中的 OVS 埠號

使用者空間 (nest)¶

nested-attributes:

userspace-attrs

設定 (nest)¶

nested-attributes:

key-attrs

文件:

替換現有報頭的內容。 單個巢狀屬性指定要修改的報頭及其值。

push-vlan (binary)¶

struct:

ovs-action-push-vlan

文件:

將新的最外層 802.1Q 或 802.1ad 報頭推送到資料包上。

pop-vlan (flag)¶

文件:

從資料包中彈出最外層的 802.1Q 或 802.1ad 報頭。

取樣 (nest)¶

nested-attributes:

sample-attrs

文件:

以機率方式執行動作,如巢狀屬性中所指定。

recirc (u32)¶

文件:

recirc ID

雜湊 (binary)¶

struct:

ovs-action-hash

push-mpls (binary)¶

struct:

ovs-action-push-mpls

文件:

將新的 MPLS 標籤棧條目推送到資料包的 MPLS 標籤棧頂部。 將封裝幀的以太型別設定為 ETH_P_MPLS_UC 或 ETH_P_MPLS_MC,以指示新的資料包內容。

pop-mpls (u16)¶

位元組序:

大端

文件:

以太型別

set-masked (nest)¶

nested-attributes:

key-attrs

文件:

替換現有報頭的內容。 巢狀屬性指定要修改的報頭、其值和掩碼。 對於掩碼中設定的每個位,相應的位值將從該值複製到資料包報頭欄位,其餘位保持不變。 非掩碼值位必須作為零傳遞。 OVS_KEY_ATTR_TUNNEL 屬性不支援掩碼。

ct (nest)¶

nested-attributes:

ct-attrs

文件:

跟蹤連線。 在流金鑰中填充與 conntrack 相關的條目。

trunc (u32)¶

文件:

結構體 ovs_action_trunc 是一個 u32 最大長度

push-eth (binary)¶

文件:

結構體 ovs_action_push_eth

pop-eth (flag)¶

ct-clear (flag)¶

push-nsh (nest)¶

nested-attributes:

ovs-nsh-key-attrs

文件:

將 NSH 報頭推送到資料包。

pop-nsh (flag)¶

文件:

從資料包中彈出最外層的 NSH 報頭。

meter (u32)¶

文件:

透過 meter 執行資料包,meter 可能會丟棄資料包,或修改資料包(例如,更改 DSCP 欄位)

clone (nest)¶

nested-attributes:

action-attrs

文件:

建立資料包的副本,並執行一系列動作,而不會影響原始資料包和金鑰。

check-pkt-len (nest)¶

nested-attributes:

check-pkt-len-attrs

文件:

檢查資料包長度,如果大於指定的資料包長度,則執行一組動作,否則執行另一組動作。

add-mpls (binary)¶

struct:

ovs-action-add-mpls

文件:

將新的 MPLS 標籤棧條目推送到資料包的開頭,或根據此 OVS_ACTION_ATTR_ADD_MPLS 引數的 tun_flags 欄位中的 l3 隧道標誌的值,將其推送到 l3 報頭的開頭。

dec-ttl (nest)¶

nested-attributes:

dec-ttl-attrs

psample (nest)¶

nested-attributes:

psample-attrs

文件:

將資料包樣本傳送到 psample 以進行外部觀察。

tunnel-key-attrs¶

ID (u64)¶

位元組序:

大端

值:

0

ipv4-src (u32)¶

位元組序:

大端

ipv4-dst (u32)¶

位元組序:

大端

TOS (u8)¶

TTL (u8)¶

dont-fragment (flag)¶

csum (flag)¶

OAM (flag)¶

geneve-opts (binary)¶

子型別:

u32

tp-src (u16)¶

位元組序:

大端

tp-dst (u16)¶

位元組序:

大端

vxlan-opts (nest)¶

nested-attributes:

vxlan-ext-attrs

ipv6-src (binary)¶

文件:

結構體 in6_addr 源 IPv6 地址

ipv6-dst (binary)¶

文件:

結構體 in6_addr 目標 IPv6 地址

pad (binary)¶

erspan-opts (binary)¶

文件:

結構體 erspan_metadata

ipv4-info-bridge (flag)¶

check-pkt-len-attrs¶

pkt-len (u16)¶

actions-if-greater (nest)¶

nested-attributes:

action-attrs

actions-if-less-equal (nest)¶

nested-attributes:

action-attrs

sample-attrs¶

機率 (u32)¶

動作 (nest)¶

nested-attributes:

action-attrs

userspace-attrs¶

PID (u32)¶

userdata (binary)¶

egress-tun-port (u32)¶

動作 (flag)¶

ovs-nsh-key-attrs¶

base (binary)¶

md1 (binary)¶

md2 (binary)¶

ct-attrs¶

commit (flag)¶

zone (u16)¶

mark (binary)¶

labels (binary)¶

helper (string)¶

nat (nest)¶

nested-attributes:

nat-attrs

force-commit (flag)¶

eventmask (u32)¶

timeout (string)¶

nat-attrs¶

src (flag)¶

dst (flag)¶

ip-min (binary)¶

ip-max (binary)¶

proto-min (u16)¶

proto-max (u16)¶

persistent (flag)¶

proto-hash (flag)¶

proto-random (flag)¶

dec-ttl-attrs¶

動作 (nest)¶

nested-attributes:

action-attrs

vxlan-ext-attrs¶

GBP (u32)¶

psample-attrs¶

組 (u32)¶

cookie (binary)¶

©核心開發社群。 | 由 Sphinx 5.3.0 & Alabaster 0.7.16 驅動 | 頁面源