net/sfc/base: export the zero-based MCDI port number
Proxy authorization module for SR-IOV requires one instance of proxy data structures per card. In order to achieve this, proxy data structures will be allocated only for primary port (port id 0) and other secondary ports in the card will access those data structures through reference to primary port. Accordingly, the port number obtained from efx_mcdi_get_port_assignment is stored in NIC configuration as enc_mcdi_port. Signed-off-by: Gautam Dawar <gdawar@solarflare.com> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
This commit is contained in:
parent
a53e5d85ee
commit
5895208db6
@ -1840,6 +1840,8 @@ ef10_nic_board_cfg(
|
||||
/* EFX MCDI interface uses one-based port numbers */
|
||||
emip->emi_port = port + 1;
|
||||
|
||||
encp->enc_assigned_port = port;
|
||||
|
||||
if ((rc = ef10_external_port_mapping(enp, port,
|
||||
&encp->enc_external_port)) != 0)
|
||||
goto fail2;
|
||||
|
@ -1407,6 +1407,8 @@ typedef struct efx_nic_cfg_s {
|
||||
boolean_t enc_filter_action_flag_supported;
|
||||
boolean_t enc_filter_action_mark_supported;
|
||||
uint32_t enc_filter_action_mark_max;
|
||||
/* Port assigned to this PCI function */
|
||||
uint32_t enc_assigned_port;
|
||||
} efx_nic_cfg_t;
|
||||
|
||||
#define EFX_PCI_FUNCTION_IS_PF(_encp) ((_encp)->enc_vf == 0xffff)
|
||||
|
Loading…
Reference in New Issue
Block a user