History

mctp: Add flow extension to skb

This change adds a new skb extension for MCTP, to represent a request/response flow. The intention is to use this in a later change to allow i2c controllers to correctly configure a multiplexer over a flow. Since we have a cleanup function in the core path (if an extension is present), we'll need to make CONFIG_MCTP a bool, rather than a tristate. Includes a fix for a build warning with clang: Reported-by: kernel test robot <lkp@intel.com>

Jeremy Kerr committed 5 years ago

Commit 78476d31 parent 212c10c4 files · +35 −1Browse files

Showing the changes to include (2 of 4 files). Show all

Unified · Split

2 files
  1. include/linux/skbuff.h +3 −0
  2. include/net/mctp.h +7 −0
include/linux/skbuff.h+3−0
@@ -4243,6 +4243,9 @@ enum skb_ext_id { · 4242 unmodified lines
42434243 #endif
42444244 #if IS_ENABLED(CONFIG_MPTCP)
42454245 SKB_EXT_MPTCP,
4246+#endif
4247+#if IS_ENABLED(CONFIG_MCTP_FLOWS)
4248+ SKB_EXT_MCTP,
42464249 #endif
42474250 SKB_EXT_NUM, /* must be last */
42484251 };
include/net/mctp.h+7−0
@@ -189,6 +189,13 @@ static inline struct mctp_skb_cb *mctp_cb(struct sk_buff *skb) · 188 unmodified lines
189189 return (void *)(skb->cb);
190190 }
191191
192+/* If CONFIG_MCTP_FLOWS, we may add one of these as a SKB extension,
193+ * indicating the flow to the device driver.
194+ */
195+struct mctp_flow {
196+ struct mctp_sk_key *key;
197+};
198+
192199 /* Route definition.
193200 *
194201 * These are held in the pernet->mctp.routes list, with RCU protection for

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t