From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 33F2A3252 for ; Fri, 19 May 2017 13:03:34 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 19 May 2017 04:03:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,363,1491289200"; d="scan'208";a="89461106" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by orsmga004.jf.intel.com with ESMTP; 19 May 2017 04:03:32 -0700 From: Bernard Iremonger To: dev@dpdk.org, thomas@monjalon.net Cc: "Bernard.Iremonger" Date: Fri, 19 May 2017 12:03:13 +0100 Message-Id: <1495191794-9112-4-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1495191794-9112-1-git-send-email-bernard.iremonger@intel.com> References: <1495191794-9112-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH v1 3/4] examples: callback process API changes X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 May 2017 11:03:34 -0000 From: "Bernard.Iremonger" Modify the link_status_interrupt sample application for the rte_eth_dev_callback_process API changes. Signed-off-by: Bernard.Iremonger --- examples/link_status_interrupt/main.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/link_status_interrupt/main.c b/examples/link_status_interrupt/main.c index 25da28e..d585789 100644 --- a/examples/link_status_interrupt/main.c +++ b/examples/link_status_interrupt/main.c @@ -469,14 +469,16 @@ struct lsi_port_statistics { * Pointer to(address of) the parameters. * * @return - * void. + * int. */ -static void -lsi_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param) +static int +lsi_event_callback(uint8_t port_id, enum rte_eth_event_type type, void *param, + void *ret_param) { struct rte_eth_link link; RTE_SET_USED(param); + RTE_SET_USED(ret_param); printf("\n\nIn registered callback...\n"); printf("Event type: %s\n", type == RTE_ETH_EVENT_INTR_LSC ? "LSC interrupt" : "unknown event"); @@ -488,6 +490,8 @@ struct lsi_port_statistics { ("full-duplex") : ("half-duplex")); } else printf("Port %d Link Down\n\n", port_id); + + return 0; } /* Check the link status of all ports in up to 9s, and print them finally */ -- 1.9.1