Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1288/?format=api
https://patches.dpdk.org/api/patches/1288/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/1416067424-31699-5-git-send-email-helin.zhang@intel.com/", "project": { "id": 1, "url": "https://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1416067424-31699-5-git-send-email-helin.zhang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dev/1416067424-31699-5-git-send-email-helin.zhang@intel.com", "date": "2014-11-15T16:03:40", "name": "[dpdk-dev,v6,4/8] igb: implement ops of 'dev_infos_get' for PF and VF respectively", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "2a1b988977f08b829a3962b1b5e28ecb6cffb4df", "submitter": { "id": 14, "url": "https://patches.dpdk.org/api/people/14/?format=api", "name": "Zhang, Helin", "email": "helin.zhang@intel.com" }, "delegate": null, "mbox": "https://patches.dpdk.org/project/dpdk/patch/1416067424-31699-5-git-send-email-helin.zhang@intel.com/mbox/", "series": [], "comments": "https://patches.dpdk.org/api/patches/1288/comments/", "check": "pending", "checks": "https://patches.dpdk.org/api/patches/1288/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id C8AD77FA5;\n\tSat, 15 Nov 2014 16:54:06 +0100 (CET)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby dpdk.org (Postfix) with ESMTP id 1754A7F80\n\tfor <dev@dpdk.org>; Sat, 15 Nov 2014 16:53:53 +0100 (CET)", "from fmsmga001.fm.intel.com ([10.253.24.23])\n\tby fmsmga102.fm.intel.com with ESMTP; 15 Nov 2014 08:04:02 -0800", "from shvmail01.sh.intel.com ([10.239.29.42])\n\tby fmsmga001.fm.intel.com with ESMTP; 15 Nov 2014 08:04:01 -0800", "from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com\n\t[10.239.29.89])\n\tby shvmail01.sh.intel.com with ESMTP id sAFG3wbA022250;\n\tSun, 16 Nov 2014 00:03:58 +0800", "from shecgisg004.sh.intel.com (localhost [127.0.0.1])\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP\n\tid sAFG3u4S031762; Sun, 16 Nov 2014 00:03:58 +0800", "(from hzhan75@localhost)\n\tby shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id sAFG3uQf031758; \n\tSun, 16 Nov 2014 00:03:56 +0800" ], "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.07,391,1413270000\"; d=\"scan'208\";a=\"622898401\"", "From": "Helin Zhang <helin.zhang@intel.com>", "To": "dev@dpdk.org", "Date": "Sun, 16 Nov 2014 00:03:40 +0800", "Message-Id": "<1416067424-31699-5-git-send-email-helin.zhang@intel.com>", "X-Mailer": "git-send-email 1.7.4.1", "In-Reply-To": "<1416067424-31699-1-git-send-email-helin.zhang@intel.com>", "References": "<1415283932-20724-1-git-send-email-helin.zhang@intel.com>\n\t<1416067424-31699-1-git-send-email-helin.zhang@intel.com>", "Subject": "[dpdk-dev] [PATCH v6 4/8] igb: implement ops of 'dev_infos_get' for\n\tPF and VF respectively", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "patches and discussions about DPDK <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "As more and more information are different between PF and VF,\nops of 'dev_infos_get' has been implemented respectively. In\naddition, new field of 'reta_size' has been added in\n'struct rte_eth_dev_info' for returning redirection table size.\n\nSigned-off-by: Helin Zhang <helin.zhang@intel.com>\n---\n lib/librte_ether/rte_ethdev.h | 2 ++\n lib/librte_pmd_e1000/igb_ethdev.c | 61 ++++++++++++++++++++++++++++++++-------\n 2 files changed, 52 insertions(+), 11 deletions(-)\n\nv2 changes:\n* Added new function for ops of 'dev_infos_get' specifically for igb VF.\n\nv3 changes:\n* Put the adding new element of 'reta_size' in ethdev into this patch,\n as it is needed.\n* Returning default RX/TX configurations has been added in ops of\n 'dev_infos_get', as it was accepted recently in another patches.", "diff": "diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h\nindex 2c8f129..58dd2bf 100644\n--- a/lib/librte_ether/rte_ethdev.h\n+++ b/lib/librte_ether/rte_ethdev.h\n@@ -940,6 +940,8 @@ struct rte_eth_dev_info {\n \tuint16_t max_vmdq_pools; /**< Maximum number of VMDq pools. */\n \tuint32_t rx_offload_capa; /**< Device RX offload capabilities. */\n \tuint32_t tx_offload_capa; /**< Device TX offload capabilities. */\n+\tuint16_t reta_size;\n+\t/**< Device redirection table size, the total number of entries. */\n \tstruct rte_eth_rxconf default_rxconf; /**< Default RX configuration */\n \tstruct rte_eth_txconf default_txconf; /**< Default TX configuration */\n \tuint16_t vmdq_queue_base; /**< First queue ID for VMDQ pools. */\ndiff --git a/lib/librte_pmd_e1000/igb_ethdev.c b/lib/librte_pmd_e1000/igb_ethdev.c\nindex c13ea05..bae4eb2 100644\n--- a/lib/librte_pmd_e1000/igb_ethdev.c\n+++ b/lib/librte_pmd_e1000/igb_ethdev.c\n@@ -83,6 +83,8 @@ static void eth_igb_stats_get(struct rte_eth_dev *dev,\n \t\t\t\tstruct rte_eth_stats *rte_stats);\n static void eth_igb_stats_reset(struct rte_eth_dev *dev);\n static void eth_igb_infos_get(struct rte_eth_dev *dev,\n+\t\t\t struct rte_eth_dev_info *dev_info);\n+static void eth_igbvf_infos_get(struct rte_eth_dev *dev,\n \t\t\t\tstruct rte_eth_dev_info *dev_info);\n static int eth_igb_flow_ctrl_get(struct rte_eth_dev *dev,\n \t\t\t\tstruct rte_eth_fc_conf *fc_conf);\n@@ -282,7 +284,7 @@ static struct eth_dev_ops igbvf_eth_dev_ops = {\n \t.stats_get = eth_igbvf_stats_get,\n \t.stats_reset = eth_igbvf_stats_reset,\n \t.vlan_filter_set = igbvf_vlan_filter_set,\n-\t.dev_infos_get = eth_igb_infos_get,\n+\t.dev_infos_get = eth_igbvf_infos_get,\n \t.rx_queue_setup = eth_igb_rx_queue_setup,\n \t.rx_queue_release = eth_igb_rx_queue_release,\n \t.tx_queue_setup = eth_igb_tx_queue_setup,\n@@ -1268,8 +1270,7 @@ eth_igbvf_stats_reset(struct rte_eth_dev *dev)\n }\n \n static void\n-eth_igb_infos_get(struct rte_eth_dev *dev,\n-\t\t struct rte_eth_dev_info *dev_info)\n+eth_igb_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n {\n \tstruct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \n@@ -1333,23 +1334,61 @@ eth_igb_infos_get(struct rte_eth_dev *dev,\n \t\tdev_info->max_vmdq_pools = 0;\n \t\tbreak;\n \n+\tdefault:\n+\t\t/* Should not happen */\n+\t\tbreak;\n+\t}\n+\tdev_info->reta_size = ETH_RSS_RETA_SIZE_128;\n+\n+\tdev_info->default_rxconf = (struct rte_eth_rxconf) {\n+\t\t.rx_thresh = {\n+\t\t\t.pthresh = IGB_DEFAULT_RX_PTHRESH,\n+\t\t\t.hthresh = IGB_DEFAULT_RX_HTHRESH,\n+\t\t\t.wthresh = IGB_DEFAULT_RX_WTHRESH,\n+\t\t},\n+\t\t.rx_free_thresh = IGB_DEFAULT_RX_FREE_THRESH,\n+\t\t.rx_drop_en = 0,\n+\t};\n+\n+\tdev_info->default_txconf = (struct rte_eth_txconf) {\n+\t\t.tx_thresh = {\n+\t\t\t.pthresh = IGB_DEFAULT_TX_PTHRESH,\n+\t\t\t.hthresh = IGB_DEFAULT_TX_HTHRESH,\n+\t\t\t.wthresh = IGB_DEFAULT_TX_WTHRESH,\n+\t\t},\n+\t\t.txq_flags = 0,\n+\t};\n+}\n+\n+static void\n+eth_igbvf_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)\n+{\n+\tstruct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n+\n+\tdev_info->min_rx_bufsize = 256; /* See BSIZE field of RCTL register. */\n+\tdev_info->max_rx_pktlen = 0x3FFF; /* See RLPML register. */\n+\tdev_info->max_mac_addrs = hw->mac.rar_entry_count;\n+\tdev_info->rx_offload_capa = DEV_RX_OFFLOAD_VLAN_STRIP |\n+\t\t\t\tDEV_RX_OFFLOAD_IPV4_CKSUM |\n+\t\t\t\tDEV_RX_OFFLOAD_UDP_CKSUM |\n+\t\t\t\tDEV_RX_OFFLOAD_TCP_CKSUM;\n+\tdev_info->tx_offload_capa = DEV_TX_OFFLOAD_VLAN_INSERT |\n+\t\t\t\tDEV_TX_OFFLOAD_IPV4_CKSUM |\n+\t\t\t\tDEV_TX_OFFLOAD_UDP_CKSUM |\n+\t\t\t\tDEV_TX_OFFLOAD_TCP_CKSUM |\n+\t\t\t\tDEV_TX_OFFLOAD_SCTP_CKSUM;\n+\tswitch (hw->mac.type) {\n \tcase e1000_vfadapt:\n \t\tdev_info->max_rx_queues = 2;\n \t\tdev_info->max_tx_queues = 2;\n-\t\tdev_info->max_vmdq_pools = 0;\n \t\tbreak;\n-\n \tcase e1000_vfadapt_i350:\n \t\tdev_info->max_rx_queues = 1;\n \t\tdev_info->max_tx_queues = 1;\n-\t\tdev_info->max_vmdq_pools = 0;\n \t\tbreak;\n-\n \tdefault:\n \t\t/* Should not happen */\n-\t\tdev_info->max_rx_queues = 0;\n-\t\tdev_info->max_tx_queues = 0;\n-\t\tdev_info->max_vmdq_pools = 0;\n+\t\tbreak;\n \t}\n \n \tdev_info->default_rxconf = (struct rte_eth_rxconf) {\n@@ -2051,7 +2090,7 @@ igbvf_stop_adapter(struct rte_eth_dev *dev)\n \tstruct e1000_hw *hw = E1000_DEV_PRIVATE_TO_HW(dev->data->dev_private);\n \n \tmemset(&dev_info, 0, sizeof(dev_info));\n-\teth_igb_infos_get(dev, &dev_info);\n+\teth_igbvf_infos_get(dev, &dev_info);\n \n \t/* Clear interrupt mask to stop from interrupts being generated */\n \tigbvf_intr_disable(hw);\n", "prefixes": [ "dpdk-dev", "v6", "4/8" ] }{ "id": 1288, "url": "