Commit eb44201e authored by Junxin Chen's avatar Junxin Chen Committed by Fengyan
Browse files

ubl: add CONFIG_UBL definition and UBL interface

kernel inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I850RQ


CVE: NA

-----------------------------------------------------------

This patch adds UB link interfaces to support it.

UB is a new interconnection protocol that defines its own Layer 2 protocol.
The format of a complete UB packet is as follows. UBL HDR includes UB LINK,
CC and NPI. UB LINK replaces Ether header in packets. The UB Network header
consists of CC, NPI, and traditional Network packet headers.

|<-------- UBL HDR --------->|
+--------------+------+------+---------+-----------+---------+
|    UB LINK   |  CC  |  NPI | Network | TPH / TAH | Payload |
+--------------+------+------+---------+-----------+---------+
               |<----- UB Network ---->|

- UB LINK: Format specified by the data link layer of the UB LINK.
- CC: Congestion Control.
- NPI: Network Partition Identifier.
- Network: Traditinal L3 Header.

At network layer, the UB Network Header is encapsulated. However,
the packet type cannot be known by parsing packet from user, which
leads to restrictions on the use of socket.

This patch adds sw_ctype field to indicate the packet type. As shown
in the following figure, the sw_ctype field will be add at the header
of packet before entering the dirver.

+----------+----+-----+---------+-----------+---------+
| sw_ctype | CC | NPI | Network | TPH / TAH | Payload |
+----------+----+-----+---------+-----------+---------+

-sw_ctype: L3 Header type.

When packets are sent to hardware, the sw_ctype field will be deleted
and the original packet will be restored.

+----+-----+---------+-----------+---------+
| CC | NPI | Network | TPH / TAH | Payload |
+----+-----+---------+-----------+---------+

Signed-off-by: default avatarJunxin Chen <chenjunxin1@huawei.com>
Signed-off-by: default avatarHaiqing Fang <fanghaiqing@huawei.com>
parent 1efb77bf
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment