Logo of The Linux Kernel

The Linux Kernel

7.1.0

快速搜尋

Contents

  • 開發過程
  • 提交補釘
  • 行為守則
  • 維護者手冊
  • 所有開發過程文件
  • 核心 API
  • Driver APIs
  • 子系統
    • Core subsystems
    • Human interfaces
    • Networking interfaces
      • Networking
      • NetLabel
      • InfiniBand
      • MHI
    • Storage interfaces
    • 其他子系統
  • Locking
  • 授權規則
  • 撰寫文件
  • 開發工具
  • 測試指南
  • Hacking guide
  • Tracing
  • Fault injection
  • 即時補釘
  • Rust
  • Administration
  • 建置系統
  • 回報議題
  • 使用者空間工具
  • 使用者空間 API
  • 韌體
  • 韌體與裝置樹
  • CPU 架構
  • 未排序的文件

本頁

  • 顯示原始碼

Family ovs_packet netlink specification¶

目錄

  • Family ovs_packet netlink specification

    • Summary

    • Operations

      • miss

      • action

      • execute

    • Definitions

      • ovs-header

    • Attribute sets

      • packet

Summary¶

OVS packet execution over generic netlink.

Only OVS_PACKET_CMD_EXECUTE is exposed as a genl operation. OVS_PACKET_CMD_MISS and OVS_PACKET_CMD_ACTION are kernel-to-userspace upcalls sent via genlmsg_unicast() to the vport's upcall_pid and have no associated genl_ops or multicast group.

Several attributes in the attribute set (userdata, egress-tun-key, len) exist for the upcall path and are not used by the EXECUTE operation. For EXECUTE, packet, key, and actions are mandatory (kernel returns -EINVAL without them).

Operations¶

miss¶

Notify userspace of a flow table miss for a received packet.

value:

1

attribute-set:

packet

event:
attributes:

[packet, key, userdata, actions, egress-tun-key, mru, len, hash]

action¶

Notify userspace as requested by an OVS_ACTION_ATTR_USERSPACE action.

value:

2

attribute-set:

packet

event:
attributes:

[packet, key, userdata, actions, egress-tun-key, mru, len, hash]

execute¶

Apply actions to a packet.

value:

3

attribute-set:

packet

do:
request
attributes:

[packet, key, actions, probe, mru, hash, upcall-pid]

Definitions¶

ovs-header¶

type:

struct

members:
dp-ifindex (u32):

Attribute sets¶

packet¶

packet (binary)¶

doc:

Packet data, from the start of the Ethernet header.

key (binary)¶

doc:

Nested OVS_KEY_ATTR_* attributes, extracted flow key. Defined as binary because the key attribute-set belongs to the ovs_flow family spec; cross-spec references are not supported.

actions (binary)¶

doc:

Nested OVS_ACTION_ATTR_* attributes. Defined as binary for the same reason as key.

userdata (binary)¶

doc:

Opaque userspace cookie from OVS_USERSPACE_ATTR_USERDATA.

egress-tun-key (binary)¶

doc:

Nested OVS_TUNNEL_KEY_ATTR_* for output tunnel metadata.

unused1 (unused)¶

unused2 (unused)¶

probe (flag)¶

doc:

Packet operation is a feature probe, error logging suppressed.

mru (u16)¶

doc:

Maximum received IP fragment size.

len (u32)¶

doc:

Packet size before truncation.

hash (u64)¶

doc:

Packet hash, low 32 bits are skb hash, upper bits are flags.

upcall-pid (u32)¶

doc:

Netlink PID to use for upcalls during EXECUTE processing.

©The kernel development community. | Powered by Sphinx 8.2.3 & Alabaster 1.0.0 | Page source