From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0042.outbound.protection.outlook.com [104.47.38.42]) by dpdk.org (Postfix) with ESMTP id C356CFE5 for ; Fri, 31 Mar 2017 21:36:22 +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=kZ4BMNcu/5Pm3Eja/qjJaJJUNKMnwYxnwpOe1jWNxsA=; b=KwOpQOKzLv/l4ZWPcsE7DYZw3ktQF8Fa1j0hP5LXKFvjwvqM7RhaSbWFvJgP0pDOSnKWbnHF+H+hYTG5hKJPWBsqhUy+ZDjRpunIWqOIGVeorOmK9ZxDkhvs+XPZumH5sF2JAvzKM5DX8Kf0SNxPGlhBln/DIVkfH7g39q/vk7E= Authentication-Results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=caviumnetworks.com; Received: from localhost.localdomain (14.140.2.178) by BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Fri, 31 Mar 2017 19:36:17 +0000 From: Jerin Jacob To: dev@dpdk.org Cc: thomas.monjalon@6wind.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, hemant.agrawal@nxp.com, gage.eads@intel.com, nipun.gupta@nxp.com, santosh.shukla@caviumnetworks.com, Jerin Jacob Date: Sat, 1 Apr 2017 01:04:38 +0530 Message-Id: <1490988905-12584-12-git-send-email-jerin.jacob@caviumnetworks.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> References: <1488562101-6658-1-git-send-email-jerin.jacob@caviumnetworks.com> <1490988905-12584-1-git-send-email-jerin.jacob@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: MAXPR01CA0058.INDPRD01.PROD.OUTLOOK.COM (10.164.146.158) To BY1PR0701MB1723.namprd07.prod.outlook.com (10.162.111.142) X-MS-Office365-Filtering-Correlation-Id: f6ce9914-a1fb-45d2-9a7e-08d4786d359e X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 3:UDCvoQQ90HEUw4Uc/K7X9+5Wu8wwEVZ3aqGm/B0UWivzre0ShztkdFk91Q86Z5FI4hlQrMA8p6rgYgM/BTgK6Km+QnbMZE3/VZ9ijTVs1gxaI3XNnLkvbTCqDyOfWx8i840793RmFRXDvQGrEhrrtnh4KTE5UkP24MMunqjDvYFZHsDWZ1FAF9sX6UeuD3Ph+ZQYvehIY4LPB6ar88MgZmO2zHWQk2Kj5DtGCgowqcgWoc+IGx0NKs78qiaXP97Hq2bwwhbOEpDuCYviXVAztHeFepI4VZxqGCbm8GUQXRNCk+PsIcSKuBO/FlRJfRm2zqupEsLztpcJNWbKTaDXbA==; 25:tbPuHq4m+zqGC+ncnUAQ3DS3WwqJ0JxDZCP2Rl6VpEDOQEx7SBuut3nPkQ8nqxdLxseK9GDf3SfG7ztWfInAFVaSvUU5u34jdXUrNt21fB38NylIc3L7kzJ8OsbAMIV5TwPb9ai0kLPUUdu+NWOSRVZl6Fl399Vq9wRlqSD/GEmK+5WKUNUsG6cEiLdY5qgwRWrNnQHNdm1IXd++PsigOQrZphVUyAE/XQXCyCDBP6MtKBi7GfVEqcxPnty9sbyUeGAOL328N/iaDjMvkr3DM/MCk8bOh02lPMtn96x9I/EB2BQQa860sV2EceArt5ySNdFqHSeKldynupHR81XWQ1WM2YTmwxQOOPP4t4jOQsWmlGp/vH51vc4WlHcW17LWhBua/FSYTAZUCTXX52nNQMjWIukqLguAmcvmyzMfaQ85Aepv7WzC/LJ0RrSv7/Ab9MfjGIdcfST4AZ10V2OTgQ== X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 31:cR+XZ+9h/BVsjqCXWs82QTXfoJUmMu/lecC32iWlWOpoWH8Y89UhKEzVo7UJbLmEf3PQSaluSHvTDLy6tgHSC9c6ONgvJINHzaI6vUjuNXSaR1W96cPk3fGkZIiHmxsNb02bPpa+ncV83k67v7weMDYDNcOGNizT3J3rYITqFDT1zmJx3biLcI7ldR8iLwEgL3LQTaN88JqgteJOz8tDEI8J+ld5HOI5ssrPKTy2cBc=; 20:FOI5hZ16k6zdc83E+8eZPfCmIhyMCOD+0sFRolqgA9kp8K7Ro40EWmO5lXzRH6Utl7fuu3BmcqS9zmDlTDjRQMkcntRVp8iwnuJ40tK1RZ+HlPR+N4dBE6rw0Z+LRbTaM4CPmp31ETHNXAyl9lsMQZLZQJPUwawur++3JvWreE0UBdC8FU6bVXIGsIb3Vmu8wMPLPqmrNicWaoYJkHIo8W3H1XnSO+eB6LJ8nkJb2tmNBlCb3gPD51DMEY7ITjr04L5Y88W4rtCOv8HC6+k09M8qFGGxiNMGRoiXPWvJtGxORK9TYNxHLz7TnIadl7XXNppuVloac1FVA99RMAuckJ7ZDoCElAXEiWXunCKaenZJ86jz4iM1qIEYI9GgEpOYJ6p++ySHIIN/YgPCupSFZeAFQ3W8rK7vV5Y2pSW0faT6SoR+O1VdzDKc9FWcF45/iliewKdwznkw/unWB9hS5AwWB9dThF0cpchQ/XDh4Z6Jlnrj67lNIvGEruAEZMelRKSwJ/qroHq1MdNkMsdivbN1336floNnCgER7RHeWwAhs+Fh2t3mbVzDgw0FziCV50KXUTAnBYcvtwJ0afo888BBdmz/BONXNeBRyvj0Y1Y= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(6041248)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(20161123560025)(20161123564025)(6072148); SRVR:BY1PR0701MB1723; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1723; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 4:sX6fjo9DNMclzxZqL+AYQ5YiWuGr/MVVyZ9qxteL8RLIUivsK14zhmIr6JLDbTYJkXLSq1gbBLP3VYzImb2hF7aZiaAcidDeFa/aj7MsQSX1DkAgWBJxW3xb5LF/QksBbZtCwEVSsRRM5/RFB2cJEYazTqztuHEFMM/I+PiJ99uV45TU6OQ5P3l1h3liH+GiNvTv2kXXnjaPFWE9eYx3ByCxkslByUoPmqg0V6b/yytxWnZnzeLBv7T+SSsbZ6fkkH9CzuaCuK5jJYrhKM9yU525EV71LVGNoHcpTb+SU6fhXCMFItvabemg2k+7PKokmZkXsEM97WXHTsDaFcnjdLoMrCpMZaVQzg/z3n7TD2TotyM/StQTWCk5Sf73DfwerkL7chtuyxmi8w/vLARZq9era9HeXXQXpaksIqjvk1cFVvMks9WkxMQ8FnTY+sglpcaxeKDrvKzFnHQ7iHOqscD/JZwXLDWPmhqMtJN1Tfi/8PcI6QzAJYVIWLkeifxKHEHKb/+PFwc2dcNO8N1l3KIUMyN4MWQ93aYCna2/s5Xiy/IXOh0g+MEX7bXvEyc8nlB/YQIII4aeAZAGYehR6F7bb2v2O128VmzShp9U4aoplDAjZ2d4ku8L1IGU0xk8mgpsDvVCd9LYgNG8OOVtjGdRcxdi0a34twzogCOmVugfQZ0gPeUsQyebhOuMjscbPLTUkkvBBN4t5dveFFCpODpg4M+MKXygTEbrQMCf9v2abahOu0UPjwP1EttTe0ie X-Forefront-PRVS: 02638D901B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6069001)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39840400002)(38730400002)(8676002)(107886003)(110136004)(50466002)(189998001)(305945005)(6506006)(36756003)(50226002)(25786009)(48376002)(6666003)(575784001)(8656002)(6486002)(7736002)(2950100002)(5660300001)(53936002)(81156014)(81166006)(3846002)(42882006)(6916009)(6116002)(6512007)(42186005)(33646002)(2361001)(2351001)(76176999)(50986999)(5003940100001)(47776003)(2906002)(5009440100003)(4326008)(66066001)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1723; H:localhost.localdomain; FPR:; SPF:None; MLV:nov; PTR:InfoNoRecords; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY1PR0701MB1723; 23:XEeVWnSWOXvAHorlxTPIHLR7m44AQiRq1QDJV6m?= =?us-ascii?Q?uQKXk+hJ/eOcL5IkckZhUinQQyGRWLP9Ov+ysYmuPomOANMt+Kn/Bm6lMEbg?= =?us-ascii?Q?KNZrYWKcZJhJZD8VBqSmUjxB06JfznaQhH6NI/+Y3U4iympk+VXYMmTZEbk1?= =?us-ascii?Q?tApOlls+COKCxkpyqMyF1gQ9nhgcms/CeAB3G+uIxtIjluss1RWpPhfoGY5y?= =?us-ascii?Q?Oz0GfHBuZ+4A2zsqXMKHCxsrl51rTwDH2/YFDzEMir76uN1TZRwStWNZNNVs?= =?us-ascii?Q?H80E3b+ShRkIlwghQgZh1+GKbc8DTLKBQKAjP9LOcLtyehCspTCV1dqumPMY?= =?us-ascii?Q?8eeNxEiCuiqrhPXHKPRt/7avnOD8DQjlcEbSQKZxfS546YMM+TD+mC8as+SH?= =?us-ascii?Q?k+lsxdMPv2ZbE01FUL7NaoeDqbQdmg981BCBSbccnrvLaQTy0Dr9NhwEdBv/?= =?us-ascii?Q?vtWLyfgkSyi3OcpBdhUOvvj0pqR7l11ekf7vDHCTEUGdY5BmO1e748ASo6R5?= =?us-ascii?Q?CD79X3aorITi4AJRq2KvyF3rp/5rq4Y4t0pjwGFQ64ZbL6gFjnwIOurmW3ak?= =?us-ascii?Q?pyZbBce12WQ8fffFpkxo0EZM2W2PLxABoj2Nk04lczfXXEef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QPiMxgHtLNXUVtCd3279+PNAeMosQrZePe94aYQMwmzcjrpCm/t5CW8ELUumibMwXdOth/69mv1KLyb3yCu7DIa+yUE/Q==; 5:8RTPSLQpw1ICcyUx53xSkjyEo29zJRU/cCCHv0EAoa4OSJb4sICPo123p/cXTBpFAAsoZMctgWEPQaCM+axEkakyv8fiw1PzA+kp8dZKvZpIe+Jds7nfc3s653WtpPDXSbaMtXNsFD3Eg7i4cgZRwW9OzV7I9xnjY9UEetWM1Ko=; 24:kuwD7/rgT86MPUDQUwXwXUbxPD9FJCz8rPyPdu5BhrDQx0sCilp06aIdvnz/2XkBHHhAGKdlNs7jRq1VkZjjv5fKHV9wG7K1Nw7l4jEfFYc= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1723; 7:mROf7uQRNR1hjIRMamlRcKz3JrW158FCUBDhF+CtvqMXv89jThu/WGX71ORWfjq1kK0dt82yzbDJffRb5jhNWlvzBCTdj0TlhXToWzCZx7zVgUpjzbjQkhAcPTARmnZQAZ+ji+DiTNux3jIsCSjNNnXiE6wSXYPnCZI0yp/AutOhauJ3U8q3OHkE6fyTUy7HVxamzM3X2orl/9SigzfaZxHNTsN2YOXV7EGYN3Wa0mzu45/FMmFoeKRbcl4vwIG/lp5Iq7FPkFvGqkBYzd4SxtaRof13Rwydl7vaXwVzcDwj8lPpnzQ5qQg6zDGSbqVf6y2VFl6SYy3IgyvVarvt3w== X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Mar 2017 19:36:17.7976 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1723 Subject: [dpdk-dev] [PATCH v2 11/38] event/octeontx: add support for linking queues to ports 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, 31 Mar 2017 19:36:23 -0000 queues to port link and unlink establishment is through setting/resetting the queue/group membership in SSOW_VHWS_GRPMSK_CHGX Signed-off-by: Jerin Jacob Signed-off-by: Santosh Shukla Acked-by: Gage Eads --- drivers/event/octeontx/ssovf_evdev.c | 42 ++++++++++++++++++++++++++++++++++++ drivers/event/octeontx/ssovf_evdev.h | 8 +++++++ 2 files changed, 50 insertions(+) diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c index 6781f00..78b0f26 100644 --- a/drivers/event/octeontx/ssovf_evdev.c +++ b/drivers/event/octeontx/ssovf_evdev.c @@ -260,6 +260,46 @@ ssovf_port_setup(struct rte_eventdev *dev, uint8_t port_id, ssovf_log_dbg("port=%d ws=%p", port_id, ws); return 0; } + +static int +ssovf_port_link(struct rte_eventdev *dev, void *port, const uint8_t queues[], + const uint8_t priorities[], uint16_t nb_links) +{ + uint16_t link; + uint64_t val; + struct ssows *ws = port; + + ssovf_func_trace("port=%d nb_links=%d", ws->port, nb_links); + RTE_SET_USED(dev); + RTE_SET_USED(priorities); + + for (link = 0; link < nb_links; link++) { + val = queues[link]; + val |= (1ULL << 24); /* Set membership */ + ssovf_write64(val, ws->base + SSOW_VHWS_GRPMSK_CHGX(0)); + } + return (int)nb_links; +} + +static int +ssovf_port_unlink(struct rte_eventdev *dev, void *port, uint8_t queues[], + uint16_t nb_unlinks) +{ + uint16_t unlink; + uint64_t val; + struct ssows *ws = port; + + ssovf_func_trace("port=%d nb_links=%d", ws->port, nb_unlinks); + RTE_SET_USED(dev); + + for (unlink = 0; unlink < nb_unlinks; unlink++) { + val = queues[unlink]; + val &= ~(1ULL << 24); /* Clear membership */ + ssovf_write64(val, ws->base + SSOW_VHWS_GRPMSK_CHGX(0)); + } + return (int)nb_unlinks; +} + /* Initialize and register event driver with DPDK Application */ static const struct rte_eventdev_ops ssovf_ops = { .dev_infos_get = ssovf_info_get, @@ -270,6 +310,8 @@ static const struct rte_eventdev_ops ssovf_ops = { .port_def_conf = ssovf_port_def_conf, .port_setup = ssovf_port_setup, .port_release = ssovf_port_release, + .port_link = ssovf_port_link, + .port_unlink = ssovf_port_unlink, }; static int diff --git a/drivers/event/octeontx/ssovf_evdev.h b/drivers/event/octeontx/ssovf_evdev.h index eda0e37..9a6bac5 100644 --- a/drivers/event/octeontx/ssovf_evdev.h +++ b/drivers/event/octeontx/ssovf_evdev.h @@ -120,6 +120,14 @@ #define SSO_GRP_GET_PRIORITY 0x7 #define SSO_GRP_SET_PRIORITY 0x8 +/* + * In Cavium OcteonTX SoC, all accesses to the device registers are + * implictly strongly ordered. So, The relaxed version of IO operation is + * safe to use with out any IO memory barriers. + */ +#define ssovf_read64 rte_read64_relaxed +#define ssovf_write64 rte_write64_relaxed + struct ssovf_evdev { uint8_t max_event_queues; uint8_t max_event_ports; -- 2.5.5