1 /* SPDX-License-Identifier: BSD-3-Clause 2 * Copyright (c) 2023 Corigine, Inc. 3 * All rights reserved. 4 */ 5 6 #ifndef __NFP_NET_FLOW_H__ 7 #define __NFP_NET_FLOW_H__ 8 9 #include "nfp_net_common.h" 10 11 struct nfp_net_flow_payload { 12 uint16_t cmsg_type; 13 uint8_t match_len; 14 uint8_t action_len; 15 char *match_data; 16 char *action_data; 17 }; 18 19 struct rte_flow { 20 struct nfp_net_flow_payload payload; 21 uint32_t hash_key; 22 uint32_t port_id; 23 uint32_t position; /**< Use as priority */ 24 }; 25 26 int nfp_net_flow_priv_init(struct nfp_pf_dev *pf_dev, uint16_t port); 27 void nfp_net_flow_priv_uninit(struct nfp_pf_dev *pf_dev, uint16_t port); 28 int nfp_net_flow_ops_get(struct rte_eth_dev *dev, const struct rte_flow_ops **ops); 29 30 #endif /* __NFP_NET_FLOW_H__ */ 31