コンテンツにスキップ

config buffer サブコマンド

概要

config buffer は dynamic buffer が有効なシステムで、CONFIG_DBBUFFER_PROFILE を追加・更新する CLI グループ。グループ入口で DEVICE_METADATA|localhostbuffer_model を確認し、dynamic 以外では実行を拒否する1

コマンド一覧

コマンド 用途
config buffer profile add <profile> [options] BUFFER_PROFILE|<profile> を新規作成
config buffer profile set <profile> [options] 既存 profile を更新

各コマンドの詳細

config buffer profile add <profile>

用法:

config buffer profile add <profile>
    [--xon <bytes>]
    [--xoff <bytes>]
    [--size <bytes>]
    [--dynamic_th <value>]
    [--pool <pool>]

BUFFER_PROFILE|<profile> が既に存在する場合はエラー。存在しない場合、update_profile() を通じて pool, xon, xoff, size, dynamic_th を組み立て、ValidatedConfigDBConnectorCONFIG_DB に書き込む2

--pool を省略すると ingress_lossless_pool が使われる。指定 pool は BUFFER_POOL に存在する必要がある。

config buffer profile set <profile>

用法:

config buffer profile set <profile>
    [--xon <bytes>]
    [--xoff <bytes>]
    [--size <bytes>]
    [--dynamic_th <value>]
    [--pool <pool>]

既存 BUFFER_PROFILE|<profile> を更新する。profile が存在しなければエラー。既存 profile が xoff を持たない dynamic headroom 計算型の場合、--xoff を指定して非 dynamic 型へ変える操作は拒否される3

関連する CONFIG_DB

テーブル キー 操作
BUFFER_PROFILE <profile> profile の作成・更新
BUFFER_POOL <pool> 指定 pool の存在確認
DEFAULT_LOSSLESS_BUFFER_PARAMETER 任意 shared headroom pool 判定

注意

  • config interface buffer priority_group ...config interface buffer queue ... は別グループで、port 上の BUFFER_PG / BUFFER_QUEUE バインドを操作する。本ページは root の config buffer profile を対象にする。
  • CLI 抽出上の config buffer priority-group / queue 候補は、実装上は config interface buffer ... 配下にある。

関連リファレンス

引用元

データフロー (自動生成)

flowchart LR
  CLI["config buffer"]
  SC["sonic-cfggen<br/>(config CLI のみ)"]
  CLI --> SC
  CDB0[("CONFIG_DB<br/>BUFFER_PROFILE")]
  SC --> CDB0
  DM0["buffermgrd"]
  CDB0 --> DM0
  CDB1[("CONFIG_DB<br/>BUFFER_POOL")]
  SC --> CDB1
  DM1["buffermgrd"]
  CDB1 --> DM1
  CDB2[("CONFIG_DB<br/>DEFAULT_LOSSLESS_BUFFER_PARAMETER")]
  SC --> CDB2
  DM2["buffermgrdyn"]
  CDB2 --> DM2

凡例

config 系 (CLI → CONFIG_DB → daemon) のミニ図。テーブル → daemon 対応は docs/reference/config-db-orch-map.md から機械生成。

関連 Topics

運用ヒント

典型的な利用シーン

  • dynamic buffer モードと traditional モードの切り替え。
  • lossless プロファイル ($headroom$) の最適化。

よくある落とし穴

  • switchmode 変更は config save + reload 必須。即時切替不可。
  • PG/queue から profile を外す前に profile を削除すると orchagent が拒否する。

関連する show / debug

show buffer profile
show priority-group persistent-watermark headroom
show buffer pool

関連 CLI コマンド