support two or more aeqs for chip
cover support two or more aeqs for chip
This patch fixes can support two or more aeqs from chip config file and also support four aeqs before, and fix log info for pf command channel when something is error.
--
v1:
- support two or more aeqs for chip
- fix log info for pf command channel when something is error
Guoyang Zhou (2):
net/hinic/base: support two or more aeqs for chip net/hinic/base: fix log info for PF command channel
drivers/net/hinic/base/hinic_pmd_eqs.c | 8 ++--- drivers/net/hinic/base/hinic_pmd_eqs.h | 4 +++ drivers/net/hinic/base/hinic_pmd_mbox.c | 60 ++++++++++++++++++++++++++++----- drivers/net/hinic/base/hinic_pmd_mbox.h | 5 +-- drivers/net/hinic/base/hinic_pmd_mgmt.c | 4 ++- 5 files changed, 63 insertions(+), 18 deletions(-)
Signature · 1 line
1.8.3.1
PATCH 2/2 net/hinic/base: fix log info for PF command channel
When PF command channel is error, the variables in the log has been cleared, which is not printed yet.
--- drivers/net/hinic/base/hinic_pmd_mgmt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/hinic/base/hinic_pmd_mgmt.c +3 -1
@@ -614,16 +614,18 @@ static int recv_mgmt_msg_handler(struct hinic_msg_pf_to_mgmt *pf_to_mgmt,u8 *dest_msg;u8 seq_id, seq_len;u32 msg_buf_max =MAX_PF_MGMT_BUF_SIZE ; +u8 front_id; seq_id =HINIC_MSG_HEADER_GET (msg_header,SEQID ); seq_len =HINIC_MSG_HEADER_GET (msg_header,SEG_LEN ); + front_id = recv_msg->sed_id;if (!check_mgmt_seq_id_and_seg_len (recv_msg, seq_id, seq_len)) {PMD_DRV_LOG (ERR ,"Mgmt msg sequence and segment check failed, " "func id: 0x%x, front id: 0x%x, current id: 0x%x, seg len: 0x%x" ,hinic_global_func_id (pf_to_mgmt->hwdev), - recv_msg->sed_id, seq_id, seq_len); + front_id, seq_id, seq_len);return HINIC_ERROR ; }
Signature · 1 line
1.8.3.1
PATCH 1/2 net/hinic/base: support two or more aeqs for chip
In reply to Guoyang ZhouFor device initialize, driver only supports four aeqs before, and now driver can supports two or more aeqs from chip config file.
--- drivers/net/hinic/base/hinic_pmd_eqs.c | 8 ++--- drivers/net/hinic/base/hinic_pmd_eqs.h | 4 +++ drivers/net/hinic/base/hinic_pmd_mbox.c | 60 ++++++++++++++++++++++++++++----- drivers/net/hinic/base/hinic_pmd_mbox.h | 5 +-- 4 files changed, 60 insertions(+), 17 deletions(-)
drivers/net/hinic/base/hinic_pmd_eqs.c +4 -4
@@ -470,10 +470,10 @@ int hinic_comm_aeqs_init(struct hinic_hwdev *hwdev)struct irq_info aeq_irqs[HINIC_MAX_AEQS ]; num_aeqs =HINIC_HWIF_NUM_AEQS (hwdev->hwif); -if (num_aeqs <HINIC_MAX_AEQS ) { -PMD_DRV_LOG (ERR ,"Warning: PMD need %d AEQs, Chip have %d" , -HINIC_MAX_AEQS , num_aeqs); -return HINIC_ERROR ; +if (num_aeqs <HINIC_MIN_AEQS ) { +PMD_DRV_LOG (ERR ,"PMD need %d AEQs, Chip has %d\n" , +HINIC_MIN_AEQS , num_aeqs); +return -EINVAL ; }memset (aeq_irqs,0 ,sizeof (aeq_irqs));
drivers/net/hinic/base/hinic_pmd_eqs.h +4 -0
@@ -9,6 +9,10 @@#define HINIC_AEQN_START 0#define HINIC_MAX_AEQS 4 +#define HINIC_MIN_AEQS 2 +#define HINIC_AEQN_0 0 +#define HINIC_AEQN_1 1 +#define HINIC_AEQN_2 2#define HINIC_EQ_MAX_PAGES 8
drivers/net/hinic/base/hinic_pmd_mbox.c +51 -9
105 lines not on this page · raw message
drivers/net/hinic/base/hinic_pmd_mbox.h +1 -4
@@ -5,9 +5,6 @@#ifndef _HINIC_PMD_MBOX_H_#define _HINIC_PMD_MBOX_H_ -#define HINIC_MBOX_RECV_AEQN 0 -#define HINIC_MBOX_RSP_AEQN 2 -#define HINIC_MBOX_PF_SEND_ERR 0x1#define HINIC_MBOX_PF_BUSY_ACTIVE_FW 0x2#define HINIC_MBOX_VF_CMD_ERROR 0x3
@@ -69,7 +66,7 @@ struct hinic_mbox_func_to_func {struct hinic_recv_mbox mbox_resp[HINIC_MAX_FUNCTIONS ];struct hinic_recv_mbox mbox_send[HINIC_MAX_FUNCTIONS ]; -struct hinic_eq *rsp_aeq; +struct hinic_eq *ack_aeq;struct hinic_eq *recv_aeq;u8 send_msg_id;
Signature · 1 line
1.8.3.1
Quoted 4 lines · Guoyang Zhou
This patch fixes can support two or more aeqs from chip config file and also support four aeqs before, and fix log info for pf command channel when something is error.
Quoted 9 lines
--
v1:
- support two or more aeqs for chip
- fix log info for pf command channel when something is errorGuoyang Zhou (2):
net/hinic/base: support two or more aeqs for chipnet/hinic/base: fix log info for PF command channel
Series applied to dpdk-next-net/main, thanks.