* Updates the buffer with device-specific defined metadata * * @param instance security instance * @param sess security session * @param mb packet mbuf to set metadata on. * @param params device-specific defined parameters * required for metadata * * @return * - On success, zero. * - On failure, a negative value. */
| 1052 | * - On failure, a negative value. |
| 1053 | */ |
| 1054 | static inline int |
| 1055 | rte_security_set_pkt_metadata(void *instance, |
| 1056 | void *sess, |
| 1057 | struct rte_mbuf *mb, void *params) |
| 1058 | { |
| 1059 | /* Fast Path */ |
| 1060 | if (rte_security_ctx_flags_get(instance) & RTE_SEC_CTX_F_FAST_SET_MDATA) { |
| 1061 | *rte_security_dynfield(mb) = (rte_security_dynfield_t) |
| 1062 | rte_security_session_fast_mdata_get(sess); |
| 1063 | return 0; |
| 1064 | } |
| 1065 | |
| 1066 | /* Jump to PMD specific function pointer */ |
| 1067 | return __rte_security_set_pkt_metadata(instance, sess, mb, params); |
| 1068 | } |
| 1069 | |
| 1070 | /** |
| 1071 | * Attach a session to a symmetric crypto operation |