From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f49.google.com (mail-it0-f49.google.com [209.85.214.49]) by dpdk.org (Postfix) with ESMTP id CF2F5FAB8 for ; Mon, 19 Dec 2016 22:59:53 +0100 (CET) Received: by mail-it0-f49.google.com with SMTP id y23so95563540itc.0 for ; Mon, 19 Dec 2016 13:59:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=HgYHQVAKLRY4nQaJU+IJVUJpqvdfXc3kNTQp/vbaMmg=; b=xOJ6WYoUYte6WOg11CheTxAALfWgv7u3fzTKmcJY+rWYh8oipoHqmW+RfWGjh94qIJ R7OwdyNsk3TGsYL/jEPiFJ7jJWb3MkIG2Jg2s49tlLkrpaPRJJKgNrGwcTeIzWH3YmGf ga93MsqZ7CzBnTcP0xuqZmxAezEfj0csFWUeLUfcKvRbWcVAcoMnotwGsZUbSjWi3zq4 7/8uUZTVZEGxeSSktwl/JNgq1FN0joD/Z/PLABNlOqLnjLMULKtJgb+qogOAvO1+mRTZ TcVBfP0UvsiW7yZlYPZlRt1xjnotwc+nk4MCIsDXKHnAiAfmvKvIkQlLhJxQ6bo+pADy GZhw== 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; bh=HgYHQVAKLRY4nQaJU+IJVUJpqvdfXc3kNTQp/vbaMmg=; b=cikp15ODT4BTYEY2EQFHVHMvKRaWp46EZqBz8P+8OInZe1IHIXl8HleSb2U7Hmd4KM 5Id9MY9vrc8vb0eNxTC9V5Jvbhz6z9K/FxwHJ6w4SNPsp+iaf9uWMNZIp2Slb6BpDIyi tbhp32pTaPuRhjsDlea8Rcx6dwnfLgWtC6LBHHEZ+ZN4HWY6b/6N+k4P417QCtw/wWkP FVHr8hRKVoH1WSKvq1y+N/DctcvNv7yJmJH+iX7XJVSNcV1UJfWJWYVdDCIQE9xgcd1f doiJIbMhS8QigJj1phGBYRw/6V/YV5i6TCmDS+mWYGhafGOACB+OBkYIeeE6tT6GGaaO GuuA== X-Gm-Message-State: AKaTC000cen4toaopTZTchXcCBNVtr6M0yc/lYFnBDnCVNJ3TTRfzNis5lHiawDN4Kk7pA== X-Received: by 10.36.84.138 with SMTP id t132mr17350437ita.103.1482184792867; Mon, 19 Dec 2016 13:59:52 -0800 (PST) Received: from xeon-e3.wavecable.com (204-195-18-65.wavecable.com. [204.195.18.65]) by smtp.gmail.com with ESMTPSA id p20sm8270581itc.2.2016.12.19.13.59.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 Dec 2016 13:59:52 -0800 (PST) From: Stephen Hemminger X-Google-Original-From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Mon, 19 Dec 2016 13:59:31 -0800 Message-Id: <20161219215944.17226-1-sthemmin@microsoft.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [RFC v2 00/13] Generalize rte_eth_dev model 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: Mon, 19 Dec 2016 21:59:54 -0000 This set of patches generalize the ethernet device model sufficently to support virtual, pci, and vmbus devices. All this is based on the XP principal of only building what is necessary and no more than that. The rationale is NOT to rework the DPDK to have same level of bus and parent information as the Linux device model. This would be unnecessary, fragile and unnecessarily OS dependent. Instead, this set of patches does the simple change of refactoring so that the object relationship between ethernet (rte_eth_dev), PCI (rte_pci_device) and generic (rte_device) is properly broken apart. It does make the simplifying assumption that the device driver knows what type of bus it is on. For a future case where a device has to be able to handle different bus families; then the device driver can have multiple device drivers in one code base (like ixgbe PF/VF). Jan Blunck (1): eal: define container_of macro Stephen Hemminger (12): ethdev: increase length ethernet device internal name rte_device: make driver pointer const eal: introduce driver type pmd: remove useless reset of dev_info->dev_pci ethdev: make dev_info generic (not just PCI) e1000: localize mapping from eth_dev to pci ixgbe: localize mapping from eth_dev to pci_device i40e: localize mapping of eth_dev to pci virtio: localize mapping from rte_eth to pci broadcom: localize mapping from eth_dev to pci ethdev: change pci_dev to generic device hyperv: VMBUS support infrastucture app/test-pmd/config.c | 32 +++++++- app/test-pmd/testpmd.c | 11 ++- app/test-pmd/testpmd.h | 32 ++++---- app/test/test_kni.c | 39 +++++++-- app/test/virtual_pmd.c | 4 +- doc/guides/rel_notes/deprecation.rst | 3 + doc/guides/rel_notes/release_17_02.rst | 10 +-- drivers/net/af_packet/rte_eth_af_packet.c | 1 - drivers/net/bnxt/bnxt_ethdev.c | 24 +++--- drivers/net/bnxt/bnxt_ring.c | 16 ++-- drivers/net/bonding/rte_eth_bond_args.c | 12 ++- drivers/net/bonding/rte_eth_bond_pmd.c | 1 - drivers/net/cxgbe/cxgbe_ethdev.c | 2 +- drivers/net/cxgbe/cxgbe_main.c | 5 +- drivers/net/e1000/e1000_ethdev.h | 2 + drivers/net/e1000/em_ethdev.c | 50 +++++++----- drivers/net/e1000/igb_ethdev.c | 99 ++++++++++++----------- drivers/net/e1000/igb_pf.c | 4 +- drivers/net/ena/ena_ethdev.c | 2 +- drivers/net/enic/enic_ethdev.c | 2 +- drivers/net/enic/enic_rxtx.c | 2 - drivers/net/fm10k/fm10k_ethdev.c | 90 +++++++++++++-------- drivers/net/i40e/i40e_ethdev.c | 77 +++++++++++------- drivers/net/i40e/i40e_ethdev.h | 3 + drivers/net/i40e/i40e_ethdev_vf.c | 59 ++++++++------ drivers/net/ixgbe/ixgbe_ethdev.c | 120 ++++++++++++++++------------ drivers/net/ixgbe/ixgbe_ethdev.h | 3 + drivers/net/ixgbe/ixgbe_pf.c | 4 +- drivers/net/null/rte_eth_null.c | 1 - drivers/net/pcap/rte_eth_pcap.c | 1 - drivers/net/qede/qede_ethdev.c | 24 +++--- drivers/net/qede/qede_ethdev.h | 4 + drivers/net/ring/rte_eth_ring.c | 1 - drivers/net/virtio/virtio_ethdev.c | 95 +++++++++++++++------- drivers/net/virtio/virtio_user_ethdev.c | 2 +- drivers/net/vmxnet3/vmxnet3_ethdev.c | 3 +- drivers/net/xenvirt/rte_eth_xenvirt.c | 1 - lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/eal_common_devargs.c | 7 ++ lib/librte_eal/common/eal_common_options.c | 38 +++++++++ lib/librte_eal/common/eal_internal_cfg.h | 3 +- lib/librte_eal/common/eal_options.h | 6 ++ lib/librte_eal/common/eal_private.h | 5 ++ lib/librte_eal/common/include/rte_common.h | 20 +++++ lib/librte_eal/common/include/rte_dev.h | 17 +++- lib/librte_eal/common/include/rte_devargs.h | 8 ++ lib/librte_eal/common/include/rte_pci.h | 1 + lib/librte_eal/common/include/rte_vdev.h | 1 + lib/librte_eal/linuxapp/eal/Makefile | 6 ++ lib/librte_eal/linuxapp/eal/eal.c | 11 +++ lib/librte_ether/rte_ethdev.c | 114 ++++++++++++++++++++++++-- lib/librte_ether/rte_ethdev.h | 38 +++++++-- mk/rte.app.mk | 1 + 53 files changed, 776 insertions(+), 343 deletions(-) -- 2.11.0