Commit 2c8e2e9a authored by Jeremy Kerr's avatar Jeremy Kerr Committed by David S. Miller

mctp: Add base packet definitions

Simple packet header format as defined by DMTF DSP0236.
Signed-off-by: default avatarJeremy Kerr <jk@codeconstruct.com.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8f601a1e
...@@ -11037,6 +11037,7 @@ M: Jeremy Kerr <jk@codeconstruct.com.au> ...@@ -11037,6 +11037,7 @@ M: Jeremy Kerr <jk@codeconstruct.com.au>
M: Matt Johnston <matt@codeconstruct.com.au> M: Matt Johnston <matt@codeconstruct.com.au>
L: netdev@vger.kernel.org L: netdev@vger.kernel.org
S: Maintained S: Maintained
F: include/net/mctp.h
F: net/mctp/ F: net/mctp/
MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7 MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
......
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Management Component Transport Protocol (MCTP)
*
* Copyright (c) 2021 Code Construct
* Copyright (c) 2021 Google
*/
#ifndef __NET_MCTP_H
#define __NET_MCTP_H
#include <linux/bits.h>
/* MCTP packet definitions */
struct mctp_hdr {
u8 ver;
u8 dest;
u8 src;
u8 flags_seq_tag;
};
#define MCTP_VER_MIN 1
#define MCTP_VER_MAX 1
/* Definitions for flags_seq_tag field */
#define MCTP_HDR_FLAG_SOM BIT(7)
#define MCTP_HDR_FLAG_EOM BIT(6)
#define MCTP_HDR_FLAG_TO BIT(3)
#define MCTP_HDR_FLAGS GENMASK(5, 3)
#define MCTP_HDR_SEQ_SHIFT 4
#define MCTP_HDR_SEQ_MASK GENMASK(1, 0)
#define MCTP_HDR_TAG_SHIFT 0
#define MCTP_HDR_TAG_MASK GENMASK(2, 0)
#endif /* __NET_MCTP_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment