From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f177.google.com (mail-wr0-f177.google.com [209.85.128.177]) by dpdk.org (Postfix) with ESMTP id 794B5F94 for ; Tue, 18 Apr 2017 14:17:55 +0200 (CEST) Received: by mail-wr0-f177.google.com with SMTP id z109so101172931wrb.1 for ; Tue, 18 Apr 2017 05:17:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cuMd7OKxUE6v2RmHAxBsT5gL5BhG+nWfSxhgw1/kQqg=; b=Rr00SM9xRcdyPpYVn+e6jH6Z/u4cQglvCtLjQ7dccLNPI0yy80NU2QXhw7si8Vi6lu JCKC4TVRtR14zyit/ZUj9ZXB2jy41OTd6frB1jQyOB5+yh567lyMRp9SGnyRsQnpHMGr FTkCNq3RSp5mOywI5S8Tr0dWzS4H4++dLg7lU7TsXvSpWMHssfIAVyh8j8+ObY+m2Gq7 o0l0PGuyyGSvBVSYFpqsrpriScKPLMg/r7ALpcqzk/g7goQgCBHp74K7fBFDCUl93l7c 2+hctrckI4lTVN6yFdVDjO1wDAtfH/Lo2wLOJH1CJP6UaA+r3WKUVIe/aBZJv6JXhvtP 0IMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cuMd7OKxUE6v2RmHAxBsT5gL5BhG+nWfSxhgw1/kQqg=; b=l28UDOZrwkUCWsIrXo5zsdRkwi/qLdFwN+saMysK3175fCmLk1ahtaPGhLdkScRpDY VjVpZc6OrYqgrlZfae0jLmY0v4Hr1fBnH+jHFLJTEwIfaRI7R+NPey4xup67L9Wsd9sU i8fgZf/rWn6Y7269AeXtduFf8/rjrKUwu5Ml+hnzZpqCjxCtcnACYKfEvU0Ny1gzEJdo wOj6grmpWSsp3dYrtzogglj8jO6rznzh42zBHPdEGCYY5B/hhYm7k5xyWbTIDiQvPTAO aFHrnVYJhUR9yFa2dzC/2DpR2eAIw1Jq6TEMnDvG5jRjByCc8Z2EWCuTOFzdATEYzLIe HfxA== X-Gm-Message-State: AN3rC/6sRjSgJoLhiFjx053NolKF0gLBy8+ZLQyeOusu4nIRG33BxWvK 1LKFq88SF/TJMNL5 X-Received: by 10.223.183.6 with SMTP id l6mr24700409wre.42.1492517874932; Tue, 18 Apr 2017 05:17:54 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id u23sm4266024wmu.16.2017.04.18.05.17.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Apr 2017 05:17:53 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Thomas Monjalon , Jingjing Wu , Adrien Mazarguil , Nelio Laranjeiro Date: Tue, 18 Apr 2017 14:17:37 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 0/5] add device removal event 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: Tue, 18 Apr 2017 12:17:55 -0000 This new event represents the sudden removal of a device from its bus. The underlying resources exposed by the bus are expected not to be available anymore. The application should thus be able to react and possibly clean up related resources that it reserved for the removed device. This event is different from the current hotplug API available in the DPDK for two reasons: 1. It is a reactive design: the application reacts to a device that has been removed instead of removing a device from its pool. 2. The event itself is going further than the current detaching of a device from a DPDK application. If the bus is a hardware one, it is expected of the underlying resources to not be available anymore. This series adds a new event type to ethdev and implements it in mlx4. Testpmd is also updated to report all asynchronous ethdev events including this one for testing purposes and as a practical usage example. This series depends on the series titled [PATCH 1/2] net/mlx4: split the definitions to the header file v1 --> v2: * integrated the series with the new PCI rte_bus implementation. I planned on working out a more generic implementation of the RMV event for the v17.05, however while writing it I found that I had to evolve the support of interrupts in the PCI rte_bus, which did not seem wise at this point of the release cycle. I consider that this event should be generalized along the LSC event, going from pure PCI events to generic rte_bus events, given that they can be relevant to other busses (vdev at least). I would reserve this evolution for future release however, once a real discussion has taken place. Gaetan Rivet (5): ethdev: introduce device removal event net/mlx4: device removal event support app/testpmd: generic event handler app/testpmd: request link status interrupt app/testpmd: request device removal interrupt app/test-pmd/parameters.c | 8 + app/test-pmd/testpmd.c | 103 ++++++++++ app/test-pmd/testpmd.h | 2 + doc/guides/nics/features/default.ini | 1 + doc/guides/nics/features/mlx4.ini | 1 + doc/guides/prog_guide/env_abstraction_layer.rst | 21 +- drivers/net/mlx4/mlx4.c | 258 ++++++++++++++++++++---- drivers/net/mlx4/mlx4.h | 1 + lib/librte_eal/common/include/rte_pci.h | 2 + lib/librte_ether/rte_ethdev.c | 11 +- lib/librte_ether/rte_ethdev.h | 9 +- lib/librte_ether/rte_ethdev_pci.h | 2 + 12 files changed, 375 insertions(+), 44 deletions(-) -- 2.1.4