From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 6BCD38DA9 for ; Mon, 25 Jan 2016 03:31:08 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 24 Jan 2016 18:31:07 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,342,1449561600"; d="scan'208";a="867706565" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by orsmga001.jf.intel.com with ESMTP; 24 Jan 2016 18:31:07 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 24 Jan 2016 18:31:06 -0800 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 24 Jan 2016 18:31:06 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.215]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.209]) with mapi id 14.03.0248.002; Mon, 25 Jan 2016 10:31:05 +0800 From: "Wang, Xiao W" To: "Richardson, Bruce" Thread-Topic: [dpdk-dev] [PATCH 15/16] fm10k: use default mailbox message handler for pf Thread-Index: AQHRVDef6TmrVyt2TEi3ls2/mXdI7p8HigEAgAPvM/A= Date: Mon, 25 Jan 2016 02:31:05 +0000 Message-ID: References: <1453372561-11431-1-git-send-email-xiao.w.wang@intel.com> <1453372561-11431-16-git-send-email-xiao.w.wang@intel.com> <20160122213137.GA19964@bricha3-MOBL3> In-Reply-To: <20160122213137.GA19964@bricha3-MOBL3> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH 15/16] fm10k: use default mailbox message handler for pf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Jan 2016 02:31:09 -0000 Hi Bruce, > -----Original Message----- > From: Richardson, Bruce > Sent: Saturday, January 23, 2016 5:32 AM > To: Wang, Xiao W > Cc: Chen, Jing D ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 15/16] fm10k: use default mailbox message > handler for pf >=20 > On Thu, Jan 21, 2016 at 06:36:00PM +0800, Wang Xiao W wrote: > > The new share code makes fm10k_msg_update_pvid_pf function static, so > > we can not refer to it now in fm10k_ethdev.c. The registered pf > > handler is almost the same as the default pf handler, removing it has n= o > impact on mailbox. > > > > Signed-off-by: Wang Xiao W >=20 > What patch makes the function static, as we need to ensure that the build= is > not broken by having this patch in the wrong place in the patchset? >=20 > Also, it seems strange having this patch in the middle of a series of bas= e code > updates - perhaps it should go first, so that all base code update patche= s can > go one after the other. >=20 > /Bruce It's the first patch in the patch set that makes the function static. The 0015.patch and 0016.patch are two extra fix patches made by myself. The= 0015 is for the "static fm10k_msg_update_pvid_pf " issue, the 0016 adds back a few macro de= finitions which are removed in shared code but are needed in dpdk/fm10k, I add these = necessary macros into fm10k/base/fm10k_osdep.h which is controlled by dpdk driver. I put the two extra (15/16, 16/16) fix patches last, (15/16) is a change fo= r fm10k_ethdev.c, so I prefix the subject with "fm10k: ", (16/16) is a change for base/fm10k_= osdep.h, so I prefix the subject with "fm10k/base: ". Best Regards, Wang, Xiao >=20 > > --- > > drivers/net/fm10k/fm10k_ethdev.c | 17 ++--------------- > > 1 file changed, 2 insertions(+), 15 deletions(-) > > > > diff --git a/drivers/net/fm10k/fm10k_ethdev.c > > b/drivers/net/fm10k/fm10k_ethdev.c > > index e967628..a118cf4 100644 > > --- a/drivers/net/fm10k/fm10k_ethdev.c > > +++ b/drivers/net/fm10k/fm10k_ethdev.c > > @@ -2367,29 +2367,16 @@ static const struct fm10k_msg_data > fm10k_msgdata_vf[] =3D { > > FM10K_TLV_MSG_ERROR_HANDLER(fm10k_tlv_msg_error), > > }; > > > > -/* Mailbox message handler in PF */ > > -static const struct fm10k_msg_data fm10k_msgdata_pf[] =3D { > > - FM10K_PF_MSG_ERR_HANDLER(XCAST_MODES, > fm10k_msg_err_pf), > > - FM10K_PF_MSG_ERR_HANDLER(UPDATE_MAC_FWD_RULE, > fm10k_msg_err_pf), > > - > FM10K_PF_MSG_LPORT_MAP_HANDLER(fm10k_msg_lport_map_p > f), > > - FM10K_PF_MSG_ERR_HANDLER(LPORT_CREATE, > fm10k_msg_err_pf), > > - FM10K_PF_MSG_ERR_HANDLER(LPORT_DELETE, > fm10k_msg_err_pf), > > - > FM10K_PF_MSG_UPDATE_PVID_HANDLER(fm10k_msg_update_pvi > d_pf), > > - FM10K_TLV_MSG_ERROR_HANDLER(fm10k_tlv_msg_error), > > -}; > > - > > static int > > fm10k_setup_mbx_service(struct fm10k_hw *hw) { > > - int err; > > + int err =3D 0; > > > > /* Initialize mailbox lock */ > > fm10k_mbx_initlock(hw); > > > > /* Replace default message handler with new ones */ > > - if (hw->mac.type =3D=3D fm10k_mac_pf) > > - err =3D hw->mbx.ops.register_handlers(&hw->mbx, > fm10k_msgdata_pf); > > - else > > + if (hw->mac.type =3D=3D fm10k_mac_vf) > > err =3D hw->mbx.ops.register_handlers(&hw->mbx, > fm10k_msgdata_vf); > > > > if (err) { > > -- > > 1.9.3 > >