From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0078.outbound.protection.outlook.com [104.47.34.78]) by dpdk.org (Postfix) with ESMTP id BB8CC5699 for ; Tue, 13 Sep 2016 10:46:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=KB9ONgMQvYW75nRKxWVgYO9QbAqKqZZrlvub9tTQHzQ=; b=mTjxeyTraS+Ew0DgnOOOlJ0UrHhATOP1Av5Rvv7wldI3QKIYiia6zV0kUBUhzXxhlTLFPnM2PQePqoyaOiO3AFk0og5jYPYanWD+BLh7sVn4flpiZFo6k8Zdcjg0BKR9LoEMdeTCbPxZTPOCZx1asnEJz5F4GmlSJ/Y+dn29PLc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain (171.48.9.47) by BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.609.9; Tue, 13 Sep 2016 08:46:01 +0000 Date: Tue, 13 Sep 2016 14:15:36 +0530 From: Jerin Jacob To: "ZELEZNIAK, ALEX" CC: Bernard Iremonger , "rahul.r.shah@intel.com" , "wenzhuo.lu@intel.com" , "dev@dpdk.org" Message-ID: <20160913084535.GA6750@localhost.localdomain> References: <1471528125-26357-1-git-send-email-bernard.iremonger@intel.com> <1472202620-20487-1-git-send-email-bernard.iremonger@intel.com> <1472202620-20487-2-git-send-email-bernard.iremonger@intel.com> <20160909141031.GA4100@localhost.localdomain> <3C0218D8B3DD114D8DBFE6B68141FBE3185F9FE7@MISOUT7MSGUSRDI.ITServices.sbc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <3C0218D8B3DD114D8DBFE6B68141FBE3185F9FE7@MISOUT7MSGUSRDI.ITServices.sbc.com> User-Agent: Mutt/1.6.2 (2016-07-01) X-Originating-IP: [171.48.9.47] X-ClientProxiedBy: MA1PR01CA0033.INDPRD01.PROD.OUTLOOK.COM (10.164.117.40) To BLUPR0701MB1715.namprd07.prod.outlook.com (10.163.85.141) X-MS-Office365-Filtering-Correlation-Id: 0aa4d2ba-973a-4a3e-4d66-08d3dbb264e2 X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 2:GDwZU9RjGggvVT1meEmJQnkJubymW4xX6yjIh2XpdBtB44v7kbbijjHcksPL1j2QEJdUpJ3TpUZiDP5SMuknNd0UUJDZ3sg0YcZclcm6QPPQcBQhKsy+aOorLuAokwVaNeQhzwbfeB9PGlgDIVRAFRUoZVbWbA5TMsuVF4kEZUbMowbmTudAeK4k1MbflPL7; 3:mVNjCJAuk3FmNuzMGeTZCE7p6g1CfsIgkNj8DVlJJ5pAXyiWBhbUSVjlFiUL48arpZMH7qqidynLLhEfCPKmlxGufR7mnyMfxCtzl3e43zQmKNS5GcCHWpayM/brl4Lu; 25:mI1uXPa6NlxYoCfNnqERo9gDGrc3cW64I1zH2dRa/5+uDXQoVoRK/59hisTntSWiMx0oK1dunsC2vIHoXlDSvuKd1qsezFw1bHwQym6CIeS32TostrzmR3voeY0ZQcBOYklT2Y0/SID5JxbFmoRkifUTdArTUkP0CjgzOiq++u5NmY8rhKGe6Y5VB/OqRQb9HrpXRDb/MnGnU3Wu2Q0TbNLT5MAHeQClD/0KXSvsp/V015DxC4eYtcIWxi6Onv3QyyfqvPt1nhEKuYitPGAPbWSkX3Et92wdDVgkCB8YDHibCXpqOaHtYiuinSfwAKPBeIiWlHeLWOVPmlC1tfjuMXRcbJIQQqrpZjx+gzLzaPt1Irx/CcC30YeKwKiAMuBhYZjspzFy2WkXlFw1l5ym8sjFMJMflQtWAXg27HqUATY= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 31:2r4qdAICFM1ywqvBgr0KbBXxfEmxkGxWZqZVa/nF0fmcZ8vMn1fZHDtscBM15Th/8MEG48yhFnh8kRyF4qshHFTNi+7kSIY+ibzhUKYDy0LamYiZSYGRjWNqJRJCxx5Vhp/yftkW0JQpv0gbSCA2Z9O/XQCDcCIBOIW1KteW027lLg9U+2SZwAQDnhMhe7DVtWooVv4wDTDyDZhOqSeo12jeQha/ukwQcYP2/ucLVpg=; 20:bauueE6ldNw+m3GLN0oYimf4UNzz7kva/+nej6o3ifpm29BW5kZFdVJyRW2GrVaUcUIungWqK5FdlJpKv5A4HyR+mlQUsEdR2dEMR9CmoTknN0CYs08ovMdQ2ZxH+9J9lt0WtopdfXCdQ8NvcdOLUBWsAygq1mfEgeqZ+TfKahbFBbGfuZuYrzfyPrDPqS+C3XF71sc09rl96IMCdV49aV9J3mmgZm6WVSHE3Jv04B/v8NIPp9Yfbw+DJH1IJZ4YCLTV0iY4oxkdvCNyDMoOykUvs+XY/Yfp71zt83r1MgTtEZzlDA1ylJPiZxRj2VJvn+gpMxmPWudV6m2i3kn9gin1VbvtUeolyfmXpIrD3T3lv6ye4o3A8v3GF1UB3mOd4j4oJ5IyvZlkaskkdwCZwv0kQdSac9+b8zABhT/lC7mJ1TbewVRhHMYvFvIuLcM6kOu8BQvEjPglwD0v5iul59YqwSTKjcmkxoSC4+XA/ACDm4UsAeYsuuaHrbvVwutJq1G5zzT01DNnqafDTbbJB0GrBVwg4h+Z7tTF7S3gB43K21bive9veEHNcikOrDhlwxfnLuA5C+hJLP8oETFQgMwpav0i3oWekBo98RZNDrU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(97927398514766)(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001); SRVR:BLUPR0701MB1715; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1715; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0701MB1715; 4:ohRlpexpMOUj1UUs8M+WTifF8UJntsluZQdfkonUIfXCMRKfpxh6nOjDM1xPfE42THjoU7Zheexp345dgLSDh6KkoRE+ZPooEsBQ/aJCle5OezzISz6EcyBo4SJqYjXLIyioxSkK3j7GvlEfhYqW47DrJ3VrNpNXHFYGpazq90yMQ8c35hofGPGf2J1tsHWdJKnvxOju2l2on7fe05nRdyF/AcIW1nPhvUc6UfXPqks/Z4Hu1FLSpp23pHbQ2moACvnACHdrFTq1z0DdWKX8HV2YoxqYzxK6IvmcfvhrNPuCpsoVXDQlPU8tmgXOeC+fbKLcGErpwiaglJ41GcLYyNoX6X0LlAADP55hfQw4aldfU78TJo1uK4lqUovqxYEevTFrfOn9WjUg9FUoQ9AoeceVzMVGP3G0xx6FL267lnCGaDqlF+Q5ayLanPl5ej1BGsLBLHOeiekUWAUNn3/34g== X-Forefront-PRVS: 0064B3273C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(7916002)(189002)(24454002)(377454003)(13464003)(76094002)(199003)(101416001)(4001350100001)(93886004)(2906002)(61506002)(97736004)(189998001)(110136003)(8676002)(5660300001)(23726003)(6116002)(66066001)(3846002)(92566002)(81166006)(81156014)(1076002)(46406003)(97756001)(50466002)(7846002)(50986999)(7736002)(47776003)(77096005)(33656002)(54356999)(586003)(2950100001)(76176999)(19580405001)(4326007)(105586002)(575784001)(106356001)(68736007)(305945005)(9686002)(83506001)(19580395003)(42186005)(18370500001)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1715; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BLUPR0701MB1715; 23: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QkVsZBllRNj2Y/MJO1AKi7Y+abKhkGScdQNj6YpvLrX583+NT3RV+NKIVsx+R6OatzE8aOQtTPlI7aCBpbhzpZynZ83c=; 7:ZGUVJMUPfBGv/FKGlXQtuJA+wODQkxufzwOWzKLiQgYsVeVRprLI/YhSLv1MsWkdtYk7/Poy2FRQPgsuj8eLMY+52pBl/yvhWbI4GfQTQ2wE4EwRWTi+0+OOdKsUeHhW5w8+4o7za5uCFr90qdg91aTdabEDnPWs5/oGFOPb9JcdczOMNoEn87s/mh7z4GgBpdjY1MZITs3N6v2RvMdjJfaCYMPGE7C3RPkQkGrnJqQj2I6OqH7CQTQUCy+yreYg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Sep 2016 08:46:01.0786 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1715 Subject: Re: [dpdk-dev] [RFC PATCH v2 1/5] librte_ether: add internal callback functions 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: Tue, 13 Sep 2016 08:46:05 -0000 On Fri, Sep 09, 2016 at 04:32:07PM +0000, ZELEZNIAK, ALEX wrote: > Use case could be to inform application managing SRIOV about VM's intention > to modify parameters like add VLAN which might not be the one which is > assigned to VF or inform about VF reset and reapply settings like strip/insert > VLAN id based on policy. Is there any other way(more portable way) where we can realize the same use case? Something like, 1) The assigned VM operates/control the VF 2) A centralized entity post messages through UNIX socket or something(like vhost user communicates with VM). On message receive, VM can take necessary action on assigned VF. This will avoid the need of defining specifics of PF to VF mailbox communication in normative ethdev specification. And I guess it will work almost the PMD drivers as their is no PMD specific work here. Just a thought. > > > -----Original Message----- > > From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com] > > Sent: Friday, September 09, 2016 10:11 AM > > To: Bernard Iremonger > > Cc: rahul.r.shah@intel.com; wenzhuo.lu@intel.com; dev@dpdk.org; > > ZELEZNIAK, ALEX > > Subject: Re: [dpdk-dev] [RFC PATCH v2 1/5] librte_ether: add internal > > callback functions > > > > On Fri, Aug 26, 2016 at 10:10:16AM +0100, Bernard Iremonger wrote: > > > add _rte_eth_dev_callback_process_vf function. > > > add _rte_eth_dev_callback_process_generic function > > > > > > Adding a callback to the user application on VF to PF mailbox message, > > > allows passing information to the application controlling the PF > > > when a VF mailbox event message is received, such as VF reset. > > > > > > Signed-off-by: azelezniak > > > Signed-off-by: Bernard Iremonger > > > --- > > > lib/librte_ether/rte_ethdev.c | 17 ++++++++++ > > > lib/librte_ether/rte_ethdev.h | 61 > > ++++++++++++++++++++++++++++++++++ > > > lib/librte_ether/rte_ether_version.map | 7 ++++ > > > 3 files changed, 85 insertions(+) > > > > > > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c > > > index f62a9ec..1388ea3 100644 > > > --- a/lib/librte_ether/rte_ethdev.c > > > +++ b/lib/librte_ether/rte_ethdev.c > > > @@ -2690,6 +2690,20 @@ void > > > _rte_eth_dev_callback_process(struct rte_eth_dev *dev, > > > enum rte_eth_event_type event) > > > { > > > + return _rte_eth_dev_callback_process_generic(dev, event, NULL); > > > +} > > > + > > > +void > > > +_rte_eth_dev_callback_process_vf(struct rte_eth_dev *dev, > > > + enum rte_eth_event_type event, void *param) > > > +{ > > > + return _rte_eth_dev_callback_process_generic(dev, event, param); > > > +} > > > + > > > +void > > > +_rte_eth_dev_callback_process_generic(struct rte_eth_dev *dev, > > > + enum rte_eth_event_type event, void *param) > > > +{ > > > struct rte_eth_dev_callback *cb_lst; > > > struct rte_eth_dev_callback dev_cb; > > > > > > @@ -2699,6 +2713,9 @@ _rte_eth_dev_callback_process(struct > > rte_eth_dev *dev, > > > continue; > > > dev_cb = *cb_lst; > > > cb_lst->active = 1; > > > + if (param != NULL) > > > + dev_cb.cb_arg = (void *) param; > > > + > > > rte_spinlock_unlock(&rte_eth_dev_cb_lock); > > > dev_cb.cb_fn(dev->data->port_id, dev_cb.event, > > > dev_cb.cb_arg); > > > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h > > > index b0fe033..4fb0b9c 100644 > > > --- a/lib/librte_ether/rte_ethdev.h > > > +++ b/lib/librte_ether/rte_ethdev.h > > > @@ -3047,9 +3047,27 @@ enum rte_eth_event_type { > > > /**< queue state event (enabled/disabled) > > */ > > > RTE_ETH_EVENT_INTR_RESET, > > > /**< reset interrupt event, sent to VF on PF reset */ > > > + RTE_ETH_EVENT_VF_MBOX, /**< PF mailbox processing callback */ > > > RTE_ETH_EVENT_MAX /**< max value of this enum */ > > > }; > > > > > > +/** > > > + * Response sent back to ixgbe driver from user app after callback > > > + */ > > > +enum rte_eth_mb_event_rsp { > > > + RTE_ETH_MB_EVENT_NOOP_ACK, /**< skip mbox request and ACK > > */ > > > + RTE_ETH_MB_EVENT_NOOP_NACK, /**< skip mbox request and > > NACK */ > > > + RTE_ETH_MB_EVENT_PROCEED, /**< proceed with mbox request > > */ > > > + RTE_ETH_MB_EVENT_MAX /**< max value of this enum */ > > > +}; > > > > Do we really need to define the specifics of PF to VF MBOX communication > > in normative ethdev specification? > > Each drivers may have different PF to VF MBOX definitions so it may not be > > very portable. > > What is the use-case here? If its for VF configuration, I think we can > > do it as separate 'sync' functions for each functionality so that > > PMDs will have room hiding the specifics on MBOX definitions. >