net/qede/base: add pretend function for port/PF
[dpdk.git] / drivers / net / qede / base / ecore_hw.h
index f3f513e..a62ba39 100644 (file)
@@ -1,9 +1,7 @@
-/*
+/* SPDX-License-Identifier: BSD-3-Clause
  * Copyright (c) 2016 - 2018 Cavium Inc.
  * All rights reserved.
  * www.cavium.com
- *
- * See LICENSE.qede_pmd for copyright and licensing details.
  */
 
 #ifndef __ECORE_HW_H__
@@ -224,6 +222,18 @@ void ecore_port_pretend(struct ecore_hwfn  *p_hwfn,
 void ecore_port_unpretend(struct ecore_hwfn    *p_hwfn,
                          struct ecore_ptt      *p_ptt);
 
+/**
+ * @brief ecore_port_fid_pretend - pretend to another port and another function
+ *        when accessing the ptt window
+ *
+ * @param p_hwfn
+ * @param p_ptt
+ * @param port_id - the port to pretend to
+ * @param fid - fid field of pxp_pretend structure. Can contain either pf / vf.
+ */
+void ecore_port_fid_pretend(struct ecore_hwfn *p_hwfn, struct ecore_ptt *p_ptt,
+                           u8 port_id, u16 fid);
+
 /**
  * @brief ecore_vfid_to_concrete - build a concrete FID for a
  *        given VF ID