Imported Upstream version 17.05
[deb_dpdk.git] / drivers / event / octeontx / rte_pmd_octeontx_ssovf.h
@@ -1,7 +1,7 @@
 /*
  *   BSD LICENSE
  *
- *   Copyright (C) EZchip Semiconductor Ltd. 2015.
+ *   Copyright (C) Cavium networks Ltd. 2017.
  *
  *   Redistribution and use in source and binary forms, with or without
  *   modification, are permitted provided that the following conditions
@@ -13,7 +13,7 @@
  *       notice, this list of conditions and the following disclaimer in
  *       the documentation and/or other materials provided with the
  *       distribution.
- *     * Neither the name of EZchip Semiconductor nor the names of its
+ *     * Neither the name of Cavium networks nor the names of its
  *       contributors may be used to endorse or promote products derived
  *       from this software without specific prior written permission.
  *
  *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
+ */
 
-#ifndef _RTE_CPUFLAGS_TILE_H_
-#define _RTE_CPUFLAGS_TILE_H_
+#ifndef __RTE_PMD_OCTEONTX_SSOVF_H__
+#define __RTE_PMD_OCTEONTX_SSOVF_H__
 
-#ifdef __cplusplus
-extern "C" {
-#endif
+#include <rte_common.h>
 
-/**
- * Enumeration of all CPU features supported
- */
-enum rte_cpu_flag_t {
-       RTE_CPUFLAG_NUMFLAGS /**< This should always be the last! */
+struct octeontx_ssovf_info {
+       uint16_t domain; /* Domain id */
+       uint8_t total_ssovfs; /* Total sso groups available in domain */
+       uint8_t total_ssowvfs;/* Total sso hws available in domain */
 };
 
-#include "generic/rte_cpuflags.h"
+enum octeontx_ssovf_type {
+       OCTEONTX_SSO_GROUP, /* SSO group vf */
+       OCTEONTX_SSO_HWS,  /* SSO hardware workslot vf */
+};
+
+struct octeontx_mbox_hdr {
+       uint16_t vfid;  /* VF index or pf resource index local to the domain */
+       uint8_t coproc; /* Coprocessor id */
+       uint8_t msg;    /* Message id */
+       uint8_t res_code; /* Functional layer response code */
+};
 
-#ifdef __cplusplus
-}
-#endif
+int octeontx_ssovf_info(struct octeontx_ssovf_info *info);
+void *octeontx_ssovf_bar(enum octeontx_ssovf_type, uint8_t id, uint8_t bar);
+int octeontx_ssovf_mbox_send(struct octeontx_mbox_hdr *hdr,
+               void *txdata, uint16_t txlen, void *rxdata, uint16_t rxlen);
 
-#endif /* _RTE_CPUFLAGS_TILE_H_ */
+#endif /* __RTE_PMD_OCTEONTX_SSOVF_H__ */