2020-07-02 23:27:48 +00:00
|
|
|
/* SPDX-License-Identifier: BSD-3-Clause
|
2021-01-27 16:09:43 +00:00
|
|
|
* Copyright(c) 2014-2021 Broadcom
|
2020-07-02 23:27:48 +00:00
|
|
|
* All rights reserved.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _BNXT_REPS_H_
|
|
|
|
#define _BNXT_REPS_H_
|
|
|
|
|
|
|
|
#include <rte_malloc.h>
|
|
|
|
#include <rte_ethdev.h>
|
|
|
|
|
2020-07-02 23:27:49 +00:00
|
|
|
#define BNXT_MAX_CFA_CODE 65536
|
|
|
|
#define BNXT_VF_IDX_INVALID 0xffff
|
|
|
|
|
2020-09-11 01:55:59 +00:00
|
|
|
/* Switchdev Port ID Mapping (Per switch domain id).
|
|
|
|
* Lower 15 bits map the VFs (VF_ID). Upper bit maps the PF.
|
|
|
|
*/
|
|
|
|
#define BNXT_SWITCH_PORT_ID_PF 0x8000
|
|
|
|
#define BNXT_SWITCH_PORT_ID_TRUSTED_VF 0x0
|
|
|
|
#define BNXT_SWITCH_PORT_ID_VF_MASK 0x7FFF
|
|
|
|
|
2020-07-02 23:27:49 +00:00
|
|
|
uint16_t
|
2020-07-02 23:28:33 +00:00
|
|
|
bnxt_vfr_recv(uint16_t port_id, uint16_t queue_id, struct rte_mbuf *mbuf);
|
net/bnxt: support representors on remote host domain
In the Stingray use case, representors are conventionally run
inside the SoC domain representing functions that are on the
X86 domain. In order to support this mechanism of building
representors for endpoints that are not in the same host domain,
additional dev args have been in the PMD like so:
rep-based-pf=<physical index> rep-is-pf=<VF=0 or PF=1>
where `rep-based-pf` specifies the physical index of the base PF
that the representor is derived off of.
Since representor(s) can be created for endpoint PFs as well,
rename struct bnxt_vf_representor to bnxt_representor and other such
dev_ops and function names.
devargs have also been extended to specify the exact CoS queue along
with flow control enablement to be used for the conduit between the
representor and the endpoint function.
This is how a sample devargs would look with all the extended devargs
-w 0000:06:02.0,host-based-truflow=1,representor=[1],rep-based-pf=8,
rep-is-pf=1,rep-q-r2f=1,rep-fc-r2f=0,rep-q-f2r=1,rep-fc-f2r=1
Call CFA_PAIR_ALLOC only in case of Stingray instead of CFA_VFR_ALLOC.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-09-22 07:06:30 +00:00
|
|
|
int bnxt_representor_init(struct rte_eth_dev *eth_dev, void *params);
|
|
|
|
int bnxt_representor_uninit(struct rte_eth_dev *eth_dev);
|
|
|
|
int bnxt_rep_dev_info_get_op(struct rte_eth_dev *eth_dev,
|
2020-07-02 23:27:48 +00:00
|
|
|
struct rte_eth_dev_info *dev_info);
|
net/bnxt: support representors on remote host domain
In the Stingray use case, representors are conventionally run
inside the SoC domain representing functions that are on the
X86 domain. In order to support this mechanism of building
representors for endpoints that are not in the same host domain,
additional dev args have been in the PMD like so:
rep-based-pf=<physical index> rep-is-pf=<VF=0 or PF=1>
where `rep-based-pf` specifies the physical index of the base PF
that the representor is derived off of.
Since representor(s) can be created for endpoint PFs as well,
rename struct bnxt_vf_representor to bnxt_representor and other such
dev_ops and function names.
devargs have also been extended to specify the exact CoS queue along
with flow control enablement to be used for the conduit between the
representor and the endpoint function.
This is how a sample devargs would look with all the extended devargs
-w 0000:06:02.0,host-based-truflow=1,representor=[1],rep-based-pf=8,
rep-is-pf=1,rep-q-r2f=1,rep-fc-r2f=0,rep-q-f2r=1,rep-fc-f2r=1
Call CFA_PAIR_ALLOC only in case of Stingray instead of CFA_VFR_ALLOC.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-09-22 07:06:30 +00:00
|
|
|
int bnxt_rep_dev_configure_op(struct rte_eth_dev *eth_dev);
|
2020-07-02 23:27:48 +00:00
|
|
|
|
net/bnxt: support representors on remote host domain
In the Stingray use case, representors are conventionally run
inside the SoC domain representing functions that are on the
X86 domain. In order to support this mechanism of building
representors for endpoints that are not in the same host domain,
additional dev args have been in the PMD like so:
rep-based-pf=<physical index> rep-is-pf=<VF=0 or PF=1>
where `rep-based-pf` specifies the physical index of the base PF
that the representor is derived off of.
Since representor(s) can be created for endpoint PFs as well,
rename struct bnxt_vf_representor to bnxt_representor and other such
dev_ops and function names.
devargs have also been extended to specify the exact CoS queue along
with flow control enablement to be used for the conduit between the
representor and the endpoint function.
This is how a sample devargs would look with all the extended devargs
-w 0000:06:02.0,host-based-truflow=1,representor=[1],rep-based-pf=8,
rep-is-pf=1,rep-q-r2f=1,rep-fc-r2f=0,rep-q-f2r=1,rep-fc-f2r=1
Call CFA_PAIR_ALLOC only in case of Stingray instead of CFA_VFR_ALLOC.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-09-22 07:06:30 +00:00
|
|
|
int bnxt_rep_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_compl);
|
|
|
|
int bnxt_rep_dev_start_op(struct rte_eth_dev *eth_dev);
|
|
|
|
int bnxt_rep_rx_queue_setup_op(struct rte_eth_dev *eth_dev,
|
2020-07-02 23:27:48 +00:00
|
|
|
__rte_unused uint16_t queue_idx,
|
|
|
|
__rte_unused uint16_t nb_desc,
|
|
|
|
__rte_unused unsigned int socket_id,
|
|
|
|
__rte_unused const struct rte_eth_rxconf *
|
|
|
|
rx_conf,
|
|
|
|
__rte_unused struct rte_mempool *mp);
|
net/bnxt: support representors on remote host domain
In the Stingray use case, representors are conventionally run
inside the SoC domain representing functions that are on the
X86 domain. In order to support this mechanism of building
representors for endpoints that are not in the same host domain,
additional dev args have been in the PMD like so:
rep-based-pf=<physical index> rep-is-pf=<VF=0 or PF=1>
where `rep-based-pf` specifies the physical index of the base PF
that the representor is derived off of.
Since representor(s) can be created for endpoint PFs as well,
rename struct bnxt_vf_representor to bnxt_representor and other such
dev_ops and function names.
devargs have also been extended to specify the exact CoS queue along
with flow control enablement to be used for the conduit between the
representor and the endpoint function.
This is how a sample devargs would look with all the extended devargs
-w 0000:06:02.0,host-based-truflow=1,representor=[1],rep-based-pf=8,
rep-is-pf=1,rep-q-r2f=1,rep-fc-r2f=0,rep-q-f2r=1,rep-fc-f2r=1
Call CFA_PAIR_ALLOC only in case of Stingray instead of CFA_VFR_ALLOC.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-09-22 07:06:30 +00:00
|
|
|
int bnxt_rep_tx_queue_setup_op(struct rte_eth_dev *eth_dev,
|
2020-07-02 23:27:48 +00:00
|
|
|
__rte_unused uint16_t queue_idx,
|
|
|
|
__rte_unused uint16_t nb_desc,
|
|
|
|
__rte_unused unsigned int socket_id,
|
|
|
|
__rte_unused const struct rte_eth_txconf *
|
|
|
|
tx_conf);
|
net/bnxt: support representors on remote host domain
In the Stingray use case, representors are conventionally run
inside the SoC domain representing functions that are on the
X86 domain. In order to support this mechanism of building
representors for endpoints that are not in the same host domain,
additional dev args have been in the PMD like so:
rep-based-pf=<physical index> rep-is-pf=<VF=0 or PF=1>
where `rep-based-pf` specifies the physical index of the base PF
that the representor is derived off of.
Since representor(s) can be created for endpoint PFs as well,
rename struct bnxt_vf_representor to bnxt_representor and other such
dev_ops and function names.
devargs have also been extended to specify the exact CoS queue along
with flow control enablement to be used for the conduit between the
representor and the endpoint function.
This is how a sample devargs would look with all the extended devargs
-w 0000:06:02.0,host-based-truflow=1,representor=[1],rep-based-pf=8,
rep-is-pf=1,rep-q-r2f=1,rep-fc-r2f=0,rep-q-f2r=1,rep-fc-f2r=1
Call CFA_PAIR_ALLOC only in case of Stingray instead of CFA_VFR_ALLOC.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-09-22 07:06:30 +00:00
|
|
|
void bnxt_rep_rx_queue_release_op(void *rx_queue);
|
|
|
|
void bnxt_rep_tx_queue_release_op(void *tx_queue);
|
2020-10-15 13:30:45 +00:00
|
|
|
int bnxt_rep_dev_stop_op(struct rte_eth_dev *eth_dev);
|
2020-09-28 23:14:10 +00:00
|
|
|
int bnxt_rep_dev_close_op(struct rte_eth_dev *eth_dev);
|
net/bnxt: support representors on remote host domain
In the Stingray use case, representors are conventionally run
inside the SoC domain representing functions that are on the
X86 domain. In order to support this mechanism of building
representors for endpoints that are not in the same host domain,
additional dev args have been in the PMD like so:
rep-based-pf=<physical index> rep-is-pf=<VF=0 or PF=1>
where `rep-based-pf` specifies the physical index of the base PF
that the representor is derived off of.
Since representor(s) can be created for endpoint PFs as well,
rename struct bnxt_vf_representor to bnxt_representor and other such
dev_ops and function names.
devargs have also been extended to specify the exact CoS queue along
with flow control enablement to be used for the conduit between the
representor and the endpoint function.
This is how a sample devargs would look with all the extended devargs
-w 0000:06:02.0,host-based-truflow=1,representor=[1],rep-based-pf=8,
rep-is-pf=1,rep-q-r2f=1,rep-fc-r2f=0,rep-q-f2r=1,rep-fc-f2r=1
Call CFA_PAIR_ALLOC only in case of Stingray instead of CFA_VFR_ALLOC.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-09-22 07:06:30 +00:00
|
|
|
int bnxt_rep_stats_get_op(struct rte_eth_dev *eth_dev,
|
2020-07-02 23:27:49 +00:00
|
|
|
struct rte_eth_stats *stats);
|
net/bnxt: support representors on remote host domain
In the Stingray use case, representors are conventionally run
inside the SoC domain representing functions that are on the
X86 domain. In order to support this mechanism of building
representors for endpoints that are not in the same host domain,
additional dev args have been in the PMD like so:
rep-based-pf=<physical index> rep-is-pf=<VF=0 or PF=1>
where `rep-based-pf` specifies the physical index of the base PF
that the representor is derived off of.
Since representor(s) can be created for endpoint PFs as well,
rename struct bnxt_vf_representor to bnxt_representor and other such
dev_ops and function names.
devargs have also been extended to specify the exact CoS queue along
with flow control enablement to be used for the conduit between the
representor and the endpoint function.
This is how a sample devargs would look with all the extended devargs
-w 0000:06:02.0,host-based-truflow=1,representor=[1],rep-based-pf=8,
rep-is-pf=1,rep-q-r2f=1,rep-fc-r2f=0,rep-q-f2r=1,rep-fc-f2r=1
Call CFA_PAIR_ALLOC only in case of Stingray instead of CFA_VFR_ALLOC.
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2020-09-22 07:06:30 +00:00
|
|
|
int bnxt_rep_stats_reset_op(struct rte_eth_dev *eth_dev);
|
2020-10-15 13:30:45 +00:00
|
|
|
int bnxt_rep_stop_all(struct bnxt *bp);
|
2020-07-02 23:27:48 +00:00
|
|
|
#endif /* _BNXT_REPS_H_ */
|