Re: [PATCH v1 03/14] net/zxdh: add agent channel

2025-02-10 Thread Stephen Hemminger
On Mon, 10 Feb 2025 09:47:02 +0800 Bingbin Chen wrote: > > +#define ZXDH_COMM_CHECK_DEV_RC_UNLOCK(dev_id, rc, becall, mutex)\ > +do {\ > + uint32_t temp_rc = rc;\ > + if ((temp_rc) != ZXDH_OK) {\ > + PMD_DRV_LOG(ERR, "ZXDH %s:%d [ErrorCode:0x%x]!-- %s"\ > +

Re: [PATCH v1 03/14] net/zxdh: add agent channel

2025-02-10 Thread Stephen Hemminger
On Mon, 10 Feb 2025 09:47:02 +0800 Bingbin Chen wrote: > +static uint32_t > +zxdh_np_comm_mutex_create(ZXDH_MUTEX_T *p_mutex) > +{ > + int32_t rc = 0; > + > + rc = pthread_mutex_init(&p_mutex->mutex, NULL); > + if (rc != 0) { > + PMD_DRV_LOG(ERR, "ErrCode[ 0x%x ]: Create m

Re: [PATCH v1 03/14] net/zxdh: add agent channel

2025-02-10 Thread Stephen Hemminger
On Mon, 10 Feb 2025 09:47:02 +0800 Bingbin Chen wrote: > Add agent channel to access (np)network processor registers > that are not mapped by PCIE. > > Signed-off-by: Bingbin Chen > --- > drivers/net/zxdh/zxdh_np.c | 481 - > drivers/net/zxdh/zxdh_np.h | 77

Re: [PATCH v1 03/14] net/zxdh: add agent channel

2025-02-10 Thread Stephen Hemminger
On Mon, 10 Feb 2025 09:47:02 +0800 Bingbin Chen wrote: > + > + switch (type) { > + case ZXDH_DEV_MUTEX_T_DTB: > + { > + *p_mutex_out = &p_dev_info->dtb_mutex; > + } > + break; > + > + default: > + { > + PMD_DRV_LOG(ERR, "mutex type is invalid!")

[PATCH v1 03/14] net/zxdh: add agent channel

2025-02-09 Thread Bingbin Chen
Add agent channel to access (np)network processor registers that are not mapped by PCIE. Signed-off-by: Bingbin Chen --- drivers/net/zxdh/zxdh_np.c | 481 - drivers/net/zxdh/zxdh_np.h | 77 ++ 2 files changed, 557 insertions(+), 1 deletion(-) diff --git