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
4243#endif4243#endif
4244#if IS_ENABLED(CONFIG_MPTCP)4244#if IS_ENABLED(CONFIG_MPTCP)
4245 SKB_EXT_MPTCP,4245 SKB_EXT_MPTCP,
4246#endif
4247#if IS_ENABLED(CONFIG_MCTP_FLOWS)
4248 SKB_EXT_MCTP,
4246#endif4249#endif
4247 SKB_EXT_NUM, /* must be last */4250 SKB_EXT_NUM, /* must be last */
4248};4251};
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
189 return (void *)(skb->cb);189 return (void *)(skb->cb);
190}190}
191 191
192/* If CONFIG_MCTP_FLOWS, we may add one of these as a SKB extension,
193 * indicating the flow to the device driver.
194 */
195struct mctp_flow {
196 struct mctp_sk_key *key;
197};
198
192/* Route definition.199/* Route definition.
193 *200 *
194 * These are held in the pernet->mctp.routes list, with RCU protection for201 * 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