切換
舊版
前往
大廳
主題

PSA 筆記

NEKROS | 2023-04-25 11:44:07 | 巴幣 0 | 人氣 115

此文皆根據p4.org所釋出的PSA-v1.2 specfication所節錄而成

3. Packet paths :
     各種packet path如下圖-

各個packet path的縮寫解釋如下圖-
(PRE應是Packet Replication Engine)

    (1)對於egress packets而言,選擇從哪個port(如CPU port, recirculation port等)出去會在先前一個處理時(若是NU、CI2E的path便是ingress;CE2E則是在前一個egress clone packet時決定,也是唯一在egress會決定port的情況)便決定好,此次的egress處理僅可決定是否drop packet,而不能更改已決定好的port。

    (2)在PSA沒有相關的限制去防止packet被無止盡地clone、resubmit等,但是可以透過在user-defined metadata定義的TTL(Time To Live)做相關的測試與限制

4. PSA Data types :

    (1)PSA implementation中data plane的PSA data type在psa.p4這個target specific的include file定義了它們的bit width

    (2)所有width需皆為8的倍數,typedef的spec先不講,之後有想到再補

    (3)psa_ingress_ouput_metadara_t.drop的預設值為true

4.3.1 Range tables(至少有一個range field)

    (4)每個table entry皆須在install時由control plane指定一個priority。若多個entries皆match到同樣priority的key,則取決於implementation

    (5)若table使用lpm field來對比,其priority實際上並不是由prefix length來決定,而是由上一點提到的priority來決定

    (6)若使用const entries(即在data plane便定義table entries),則entries的priority是由定義時的順序決定,越先定義的priority越高

4.3.2 Tenary tables(無range field,至少有一個tenary或optional field)

    (7)因沒有range fields(在spec中寫的是有range field,但這樣就跟tenary table的定義相悖,可能是spec寫錯或是我理解錯誤),所以多個entries可能會match至同一個search key,所以每個entry皆須使用control plane software決定priority。其餘lpm與const規則同上。

4.3.4 LPM tables(無range, tenary, optional filed,有恰好一個lpm field,可以有0至多個exact field)

    (8)lpm中每種prefix length最多就只會有一個table entry match(因為同意時間能install的table entry的search key需不同)。control plane不能指定priority,皆由prefix length決定

    (9)若在lpm table中有定義const entries,則他們的相對priority一樣是由prefix length決定,而非先前的定義順序

4.3.4 Exact match tables

創作回應

更多創作