From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0057.outbound.protection.outlook.com [207.46.100.57]) by dpdk.org (Postfix) with ESMTP id DAD8A56AB for ; Mon, 13 Jun 2016 15:56:53 +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=6hLlP7V3tEruijYf3PjoAfkPSIP/c1TOq6zFs4Smdaw=; b=Uvr0MLHyLZJG+qLTZoppsvRFZBGr11xDXyIcZKLGl/u1aWYRwjS3x3wMqieO6QbmDduoLxytlbJ1YU1U5H83ZcHzWYUj1xCFwI8/rzRw+6JnkCIorVQ+ZLrJrvJj0oMZS9FKck46F1yIsH6HQvAGxAsxDKLo+AFWO3YMKCXUhmQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.Jacob@cavium.com; Received: from localhost.localdomain.localdomain (171.48.21.3) by BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) with Microsoft SMTP Server (TLS) id 15.1.517.8; Mon, 13 Jun 2016 13:56:48 +0000 From: Jerin Jacob To: CC: , , , Jerin Jacob , Maciej Czekaj , Kamil Rytarowski , Zyta Szpak , Slawomir Rosek , Radoslaw Biernacki Date: Mon, 13 Jun 2016 19:25:28 +0530 Message-ID: <1465826143-22159-5-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1465826143-22159-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1465317632-11471-2-git-send-email-jerin.jacob@caviumnetworks.com> <1465826143-22159-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.48.21.3] X-ClientProxiedBy: BM1PR01CA0031.INDPRD01.PROD.OUTLOOK.COM (10.163.198.166) To BN3PR0701MB1717.namprd07.prod.outlook.com (10.163.39.16) X-MS-Office365-Filtering-Correlation-Id: 74b12dea-6f27-4591-29bf-08d3939292a8 X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 2:zNwg+RdiJG0ACkon+YO4CnThyn8OY8IAblyW1zHkksMEywPUjsP6uFjVw68vf0LOloaB9sVgxaqcL9b/D4CWwaudZPnOwMOp4rJVFPT7lImNEWH14CNhwEYrdljcNKOOB92fiy9P36bFRkNjU/qEhffJc0Os1aCJbP3wlduSFaSSBdWTxz5lYREAW3icF+SB; 3:QDD2HXdbQshwJbb0Gjya5UMPMKOEDsUz4fqSrhCwDaHnaBACujBr4jIAO99prJNFccwfhYc18+fOxDw3kHoDk43x0yi7KYbtVKVX/PehwjLu+Lx7RKfWotVz0XUecBcf X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BN3PR0701MB1717; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 25:8n2FjGm0S9au+6Bjj0ZzW7RiVeSAAjf72ug50YqbPP6TtZ6RFkciQgq1pWDnVLEWPc/KFiX4w3w+ogqMwWdzoU9w4RdKn+IB28sAteKTJ9smHKD8A+LxaI+OzsyffsfVtzUZiiUyGQioiowKNi6rsgFNtEKx8CPNUy6/+0Etee5CUrGbu380YJoAkImNA0dPf/4iDPIpp8zYkf6fQY/Z4eYQI1YOxJ4EdgP4YF1t/GfEN4xjMuHsCIE6lA3aBCgdKGA5Y9bP95y/U4GT+LP2e56uAcZzQyq7nED6cJ/8y61XHKcwJdFYg6A4ujtFAThF4hT2L8fvWYBjrrvY98YxtKsHm11kqXPkSzq/f5IShPLiXS1ncKVLwlCSQgh+8T5szZ0p0UGdkhGhNl8yZOO7Kos6ygBdvQZPRW+6Mh5wSBghLLnTipYYF+mJhWZSuwVl0eUtyw+r7ypfWCTxEr6n22uBzcwxb18HiA60h0n22haH5CcC7wLUCdCl1tzGXh5Ozj1NUNVBuS2/8uQzc2MbbmSZ34/1QtK7LAFfV4k2B6Ov3mMJC2Fteg5Ydw3HoNmZ84O8gdFc+QiLP/3DajjdGe+7P5nhq+NuyJ2t9MIYumTMdKiUl4i6BCRMN3IX15QIi6ADXWeNbDvBu9m5OBMuo2l87CcvcldRTYcsJdonxo3oN24No8+HwHdizGvhByZiaYlFwclLguqZ4+UyVwOHjIyddN6lMM5Xmfig0OorXlfeGsRBgdmIdiHAa6gN6lfI3maUoTvtsaNE9choYzpGMA== X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 20:97dWa+Lsao8axfW9Nm0SM0GhZ/PbY9TB0JoHD6H/C2bGVylsRO6TTYx5kFmbg5YzT9EpHS1LNnvaUOlEKu0lieigGW5I9bQ73Fd6LURLlSaLxZuerbboOABezxdmMHJhaBTFlLdESas8Xl2oUZHVM+eV+TU7dBgp+RD4lVPw1hPOffbUZ925nOQhRhEnvBIOGvI3dtczOwK5uhHKJa6rfQ9bixfCpvF8WBggeGvTdyp0SfRlAYFYNTZ0ad7vouLgIg1SgAJ5o5bUgJpf2KuZznulLunpJ/1bkqOhQzf6FaDu0esFy2Ti+Zh3+0D2Ns6IjzL6/vNjasrtrCAclkfe0Oo+H7FRwMOKkx/GikwqKbSUYYhO6K06BCHqRj+T1Wh7Q41SDSgILeJRbzGqaAOo8eImxlIxNTezK7P774WW/G/A9YyyML2//mJ2oYLx3TlwoK5uK/ME0RsQhBlLKgi1LAvW28Oia4mxsVeq//8/5QMtBTEqhSmHlhlDowUhlqCT5eCPjy0KwnG1qC2fMGxNBfNKACubwIqz5a2xtIrtyID79lJ96or5goBjYqAOHb3MnAWLIECxM7CArvRVr6zv3HcAVHh9kS+Erly4jaey6O4= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046); SRVR:BN3PR0701MB1717; BCL:0; PCL:0; RULEID:; SRVR:BN3PR0701MB1717; X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 4:lLTOgU2PUx4aBBuUWRtwLZMdpQeQ0w9jNSB7Co80eOeirmzxo47CuTqyZm436O8RXlO2+GvtqkkG9czF6i+PMBHxl5F2Tptw1btOxVDog0eMHDTTrzTZ7aerAUKodSIl3daiBJaOez09C0zBUiUiH33mhc6mjCqY3E+01vPDnQ+bH/6YyRjd5xqJFMTi/g54/GJoYRXTxFLu2THjnalWbc+oEvpog0XkKNu27mmm9PNPN97tVsKYbWK0LVZFZY/Y1II28LRyLxxhmb7NaTLXrzo+7V3yAq9FfQZDn4YUekZXoxrBFgilkZsbbyQMUSDF/2cuw05XYUZRilXNkQ3axVopFj0R+6J21OfWZzzjb9nfxSMBlx6hZub1eZ8bTUOS X-Forefront-PRVS: 0972DEC1D9 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(6069001)(7916002)(189002)(199003)(50466002)(48376002)(101416001)(42186005)(50986999)(92566002)(76176999)(105586002)(106356001)(33646002)(2351001)(5004730100002)(47776003)(66066001)(36756003)(586003)(3846002)(6116002)(19580405001)(19580395003)(77096005)(8676002)(2906002)(81156014)(81166006)(4326007)(189998001)(97736004)(2950100001)(110136002)(5008740100001)(229853001)(5003940100001)(50226002)(68736007); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR0701MB1717; H:localhost.localdomain.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; CAT:NONE; LANG:en; CAT:NONE; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR0701MB1717; 23:MUg26Ssq6zs1G8JSgcFVBtZBZjo+dRm8BJddvyI?= =?us-ascii?Q?yafnDicAwvHvf8xEaLQT+QQSm2jT7KV0+QWvdNZEw+MTgK2FTnljH8KdgzMK?= =?us-ascii?Q?VUp39D7iTMoyhGssNQOqGOTx2qRGjcREIqDdPr/YA+EiLVaqzsxkg2Uy7Opx?=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M5spAGAVxhccPWTzBV3+7TQOnaT0SwO?= =?us-ascii?Q?xI45XKYkNFG3WcZnhdQneaG7Ayj10?= X-Microsoft-Exchange-Diagnostics: 1; BN3PR0701MB1717; 6:eGX8H5qd5o/ux4I8zT2LypAHIfqTf6uG3Zn9o607jdFpWsFH7e1vMtSJheHzLS+DZq03kwjX0lmmM5Tui2lreo8x4+5AjooG3E3fKykJtXr97rc9CHlnJIwS4ebApXTEkHEVz8vxkQNqvs01sELsTPoJF8BGxzmzOg6UcXGCUGqyVijAt9HZvzq0Jq9SzNioBpN8iL1PXuei+nwqnb5d6k2w+rfnQJqHV1+3G4HiZFgp4tAI6RFh86RpLkT/wCv46OfH+v/+gMzNrmlCVbmJ7QSuJO4acrbaPUgumWBL3qs=; 5:9wpgQeRrIXwEDUmpv/Y2eVg71JmwAUP8njgBNS5Yxo3SwLVl3FGdirWprTybw/lfMQnqBlpCdNZT3lxKlelynDXUUtbVxrmJNhDZh/ZdKmDb4p1DB8ld4/HjR+8aLX07tdukMNOpc709Jl3ssqthqg==; 24:NumhyFnoTGTNDg1VTnbkaObViKes2mqxoGK9w+PMIxMOOKhnBGSC/GdcYz3i8/hG7zFKWdP7chC2mI+fb5Q9qhJzSS6qS5XxSXHBZ+LOjJ0=; 7:WyF6vttyF2EDM3+XpYTM4FIe6bKBeHjR9GB8cmAY6O7uuThfRkho7c1qUojrtPiByDJUMZRcYy09vHwWAZH1RtP4jElv50rbELKLz3jMGJpSycHrcWCfv1KdPyME9jIQrgZCMwHpKGfEut33wV7xKz9wWUdYCuYKp24VuUY1jvGJsqcOPU9zBxvpoYYyhxDOhmKl5ggMuYmlyA+Af8qWs4rN9xXeC4TGLEfwm2Q8DKw= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Jun 2016 13:56:48.4862 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR0701MB1717 Subject: [dpdk-dev] [PATCH v4 04/19] net/thunderx: add get_reg and get_reg_length support 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: Mon, 13 Jun 2016 13:56:54 -0000 Signed-off-by: Jerin Jacob Signed-off-by: Maciej Czekaj Signed-off-by: Kamil Rytarowski Signed-off-by: Zyta Szpak Signed-off-by: Slawomir Rosek Signed-off-by: Radoslaw Biernacki --- drivers/net/thunderx/nicvf_ethdev.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c index 6fa486a..5c066e2 100644 --- a/drivers/net/thunderx/nicvf_ethdev.c +++ b/drivers/net/thunderx/nicvf_ethdev.c @@ -143,9 +143,36 @@ nicvf_dev_link_update(struct rte_eth_dev *dev, return nicvf_atomic_write_link_status(dev, &link); } +static int +nicvf_dev_get_reg_length(struct rte_eth_dev *dev __rte_unused) +{ + return nicvf_reg_get_count(); +} + +static int +nicvf_dev_get_regs(struct rte_eth_dev *dev, struct rte_dev_reg_info *regs) +{ + uint64_t *data = regs->data; + struct nicvf *nic = nicvf_pmd_priv(dev); + + if (data == NULL) + return -EINVAL; + + /* Support only full register dump */ + if ((regs->length == 0) || + (regs->length == (uint32_t)nicvf_reg_get_count())) { + regs->version = nic->vendor_id << 16 | nic->device_id; + nicvf_reg_dump(nic, data); + return 0; + } + return -ENOTSUP; +} + /* Initialize and register driver with DPDK Application */ static const struct eth_dev_ops nicvf_eth_dev_ops = { .link_update = nicvf_dev_link_update, + .get_reg_length = nicvf_dev_get_reg_length, + .get_reg = nicvf_dev_get_regs, }; static int -- 2.5.5