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>
Showing the changes to include (2 of 4 files). Show all
Unified · Split
| @@ -4243,6 +4243,9 @@ enum skb_ext_id { · 4242 unmodified lines | |||
| 4243 | #endif | 4243 | #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 | #endif | 4249 | #endif |
| 4247 | SKB_EXT_NUM, /* must be last */ | 4250 | SKB_EXT_NUM, /* must be last */ |
| 4248 | }; | 4251 | }; |
| @@ -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 | */ | ||
| 195 | struct 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 for | 201 | * These are held in the pernet->mctp.routes list, with RCU protection for |