Hi Stephen, For memcpy what ever base code or other code all used memcpy not rte_memcpy ? Even the memory is malloc from rte_malloc/zmalloc ?
Regards Wenbo. > -----Original Message----- > From: Stephen Hemminger <step...@networkplumber.org> > Sent: 2025年2月11日 23:35 > To: Wenbo Cao <caowe...@mucse.com> > Cc: tho...@monjalon.net; dev@dpdk.org; ferruh.yi...@amd.com; > andrew.rybche...@oktetlabs.ru; yao...@mucse.com > Subject: Re: [PATCH v9 12/28] net/rnp: add support link update operations > > On Tue, 11 Feb 2025 16:50:02 +0800 > Wenbo Cao <caowe...@mucse.com> wrote: > > > static int > > +rnp_mbx_fw_reply_handler(struct rnp_eth_adapter *adapter, > > + struct rnp_mbx_fw_cmd_reply *reply) { > > + struct rnp_mbx_req_cookie *cookie; > > + > > + RTE_SET_USED(adapter); > > + /* dbg_here; */ > > + cookie = reply->cookie; > > + if (!cookie || cookie->magic != RNP_COOKIE_MAGIC) { > > + RNP_PMD_ERR("[%s] invalid cookie:%p opcode: " > > + "0x%x v0:0x%x", > > + __func__, > > + cookie, > > + reply->opcode, > > + *((int *)reply)); > > Don't break messages across lines in source. It makes it harder to search. > You don't need __func__, it is already being added by the macro. > > > + return -EIO; > > + } > > + if (cookie->priv_len > 0) > > + rte_memcpy(cookie->priv, reply->data, cookie->priv_len); > > Use memcpy instead of rte_memcpy in all new code. > > > + > > + cookie->done = 1; > > + if (reply->flags & RNP_FLAGS_ERR) > > + cookie->errcode = reply->error_code; > > + else > > + cookie->errcode = 0; > > + > > + return 0; > > +}