Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/73357/?format=api
https://patches.dpdk.org/api/patches/73357/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/patch/B56561B686D6CA42BB913619B216541481EAE311@DGGEMM527-MBS.china.huawei.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": "<B56561B686D6CA42BB913619B216541481EAE311@DGGEMM527-MBS.china.huawei.com>", "list_archive_url": "https://inbox.dpdk.org/dev/B56561B686D6CA42BB913619B216541481EAE311@DGGEMM527-MBS.china.huawei.com", "date": "2020-07-07T01:51:21", "name": "[RFC] net/bonding: change the state machine to defaulted", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "2fa19d8ea45ef719b3a616602ea542f01aae38b4", "submitter": { "id": 362, "url": "https://patches.dpdk.org/api/people/362/?format=api", "name": "Weifeng Li", "email": "liyunqi@huawei.com" }, "delegate": { "id": 319, "url": "https://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "https://patches.dpdk.org/project/dpdk/patch/B56561B686D6CA42BB913619B216541481EAE311@DGGEMM527-MBS.china.huawei.com/mbox/", "series": [ { "id": 10830, "url": "https://patches.dpdk.org/api/series/10830/?format=api", "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=10830", "date": "2020-07-07T01:51:21", "name": "[RFC] net/bonding: change the state machine to defaulted", "version": 1, "mbox": "https://patches.dpdk.org/series/10830/mbox/" } ], "comments": "https://patches.dpdk.org/api/patches/73357/comments/", "check": "success", "checks": "https://patches.dpdk.org/api/patches/73357/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@inbox.dpdk.org", "Delivered-To": "patchwork@inbox.dpdk.org", "Received": [ "from dpdk.org (dpdk.org [92.243.14.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 1C5E1A00BE;\n\tTue, 7 Jul 2020 03:51:35 +0200 (CEST)", "from [92.243.14.124] (localhost [127.0.0.1])\n\tby dpdk.org (Postfix) with ESMTP id 1A1E71DCAE;\n\tTue, 7 Jul 2020 03:51:34 +0200 (CEST)", "from huawei.com (szxga08-in.huawei.com [45.249.212.255])\n by dpdk.org (Postfix) with ESMTP id 5AA8B1DC93\n for <dev@dpdk.org>; Tue, 7 Jul 2020 03:51:32 +0200 (CEST)", "from DGGEMM403-HUB.china.huawei.com (unknown [172.30.72.57])\n by Forcepoint Email with ESMTP id C33F4ECC141C31BE3961;\n Tue, 7 Jul 2020 09:51:30 +0800 (CST)", "from DGGEMM423-HUB.china.huawei.com (10.1.198.40) by\n DGGEMM403-HUB.china.huawei.com (10.3.20.211) with Microsoft SMTP Server (TLS)\n id 14.3.487.0; Tue, 7 Jul 2020 09:51:29 +0800", "from DGGEMM527-MBS.china.huawei.com ([169.254.5.197]) by\n dggemm423-hub.china.huawei.com ([10.1.198.40]) with mapi id 14.03.0487.000;\n Tue, 7 Jul 2020 09:51:22 +0800" ], "From": "\"Liyunqi (FENIX)\" <liyunqi@huawei.com>", "To": "\"dev@dpdk.org\" <dev@dpdk.org>", "CC": "\"Huwei (Xavier)\" <xavier.huwei@huawei.com>, \"chas3@att.com\"\n <chas3@att.com>, Songyujin <songyujin@huawei.com>, \"Liweifeng (DOPRA MSS)\"\n <liweifeng2@huawei.com>", "Thread-Topic": "[RFC PATCH] net/bonding: change the state machine to defaulted", "Thread-Index": "AQHWUPxZdw4XEnY2tECPQle2v0FLEqj7X5Kw", "Date": "Tue, 7 Jul 2020 01:51:21 +0000", "Message-ID": "\n <B56561B686D6CA42BB913619B216541481EAE311@DGGEMM527-MBS.china.huawei.com>", "References": "<20200703133146.22195-1-liweifeng2@huawei.com>", "In-Reply-To": "<20200703133146.22195-1-liweifeng2@huawei.com>", "Accept-Language": "zh-CN, en-US", "Content-Language": "zh-CN", "X-MS-Has-Attach": "", "X-MS-TNEF-Correlator": "", "x-originating-ip": "[10.174.105.44]", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "quoted-printable", "MIME-Version": "1.0", "X-CFilter-Loop": "Reflected", "Subject": "[dpdk-dev] [RFC PATCH] net/bonding: change the state machine to\n\tdefaulted", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dev>,\n <mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dev>,\n <mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "A dpdk bonding 802.3ad network as follows:\n+----------+ +-----------+\n|dpdk lacp |slave1 <------> port1|switch lacp|\n| |slave2 <------> port2| |\n+----------+ +-----------+\nIf a fiber optic go wrong about single pass during normal runing like\nthis:\nslave2 -----> port2 ok\nslave2 <----- port2 error: salve2 receive no LACPDU Some packets from switch to dpdk will choose port2 and lost.\n\nDpdk lacp state machine will transits to the expired state if no LACPDU is received before the current_while_timer expires. But if no LACPDU is received before the current_while_timer expires again, dpdk lacp state machine has no change. Port2 can not change to inactive depend on the received LACPDU.\nAccording to IEEE 802.3ad, if no lacpdu is received before the current_while_timer expires again, the state machine should transits from expired to defaulted. Port2 will change to inactive depend on the LACPDU with defaulted state.\n\nThis Patch add a state machine change from expired to defaulted when no lacpdu is received before the current_while_timer expires again according to IEEE 802.3ad:\nIf no LACPDU is received before the current_while timer expires again, the state machine transits to the DEFAULTED state. The recordDefault function overwrites the current operational parameters for the Partner with administratively configured values. This allows configuration of aggregations and individual links when no protocol partner is present, while still permitting an active partner to override default settings.\nThe update_Default_Selected function sets the Selected variable FALSE if the Link Aggregation Group has changed. Since all operational parameters are now set to locally administered values there can be no disagreement as to the Link Aggregation Group, so the Matched variable is set TRUE.\n\nThe relevant description is in the chapter 43.4.12 of the link below:\nhttps://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&arnumber=850426\n\nSigned-off-by: Weifeng Li <liweifeng2@huawei.com>\n---\n drivers/net/bonding/eth_bond_8023ad_private.h | 2 ++\n drivers/net/bonding/rte_eth_bond_8023ad.c | 21 +++++++++++++++++----\n 2 files changed, 19 insertions(+), 4 deletions(-)\n\n--\n1.8.3.1\n\n-----\nThis e-mail and its attachments contain confidential information from HUAWEI, which is intended only for the person or entity whose address is listed above. \nAny use of the information contained herein in any way (including, but not limited to, total or partial disclosure, reproduction, or dissemination) by persons\nother than the intended recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender by phone or email immediately and delete it!\n-----", "diff": "diff --git a/drivers/net/bonding/eth_bond_8023ad_private.h b/drivers/net/bonding/eth_bond_8023ad_private.h\nindex 6e44ffd..76f8b8d 100644\n--- a/drivers/net/bonding/eth_bond_8023ad_private.h\n+++ b/drivers/net/bonding/eth_bond_8023ad_private.h\n@@ -50,6 +50,7 @@\n #define SM_FLAGS_MOVED 0x0100\n #define SM_FLAGS_PARTNER_SHORT_TIMEOUT 0x0200\n #define SM_FLAGS_NTT 0x0400\n+#define SM_FLAGS_EXPIRED 0x0800\n \n #define BOND_LINK_FULL_DUPLEX_KEY 0x01\n #define BOND_LINK_SPEED_KEY_10M 0x02\n@@ -103,6 +104,7 @@ struct port {\n \n \t/** The operational Partner's port parameters */\n \tstruct port_params partner;\n+\tstruct port_params partner_admin;\n \n \t/* Additional port parameters not listed in documentation */\n \t/** State machine flags */\ndiff --git a/drivers/net/bonding/rte_eth_bond_8023ad.c b/drivers/net/bonding/rte_eth_bond_8023ad.c\nindex b77a37d..bfa418d 100644\n--- a/drivers/net/bonding/rte_eth_bond_8023ad.c\n+++ b/drivers/net/bonding/rte_eth_bond_8023ad.c\n@@ -356,16 +356,28 @@\n \n \t\ttimer_set(&port->current_while_timer, timeout);\n \t\tACTOR_STATE_CLR(port, EXPIRED);\n+\t\tSM_FLAG_CLR(port, EXPIRED);\n \t\treturn; /* No state change */\n \t}\n \n \t/* If CURRENT state timer is not running (stopped or expired)\n \t * transit to EXPIRED state from DISABLED or CURRENT */\n \tif (!timer_is_running(&port->current_while_timer)) {\n-\t\tACTOR_STATE_SET(port, EXPIRED);\n-\t\tPARTNER_STATE_CLR(port, SYNCHRONIZATION);\n-\t\tPARTNER_STATE_SET(port, LACP_SHORT_TIMEOUT);\n-\t\ttimer_set(&port->current_while_timer, internals->mode4.short_timeout);\n+\t\tif (SM_FLAG(port, EXPIRED)) {\n+\t\t\tport->selected = UNSELECTED;\n+\t\t\tmemcpy(&port->partner, &port->partner_admin,\n+\t\t\t\tsizeof(struct port_params));\n+\t\t\trecord_default(port);\n+\t\t\tACTOR_STATE_CLR(port, EXPIRED);\n+\t\t\ttimer_cancel(&port->current_while_timer);\n+\t\t} else {\n+\t\t\tSM_FLAG_SET(port, EXPIRED);\n+\t\t\tACTOR_STATE_SET(port, EXPIRED);\n+\t\t\tPARTNER_STATE_CLR(port, SYNCHRONIZATION);\n+\t\t\tPARTNER_STATE_SET(port, LACP_SHORT_TIMEOUT);\n+\t\t\ttimer_set(&port->current_while_timer,\n+\t\t\t\tinternals->mode4.short_timeout);\n+\t\t}\n \t}\n }\n \n@@ -1020,6 +1032,7 @@\n \tport->actor.port_number = rte_cpu_to_be_16(slave_id + 1);\n \n \tmemcpy(&port->partner, &initial, sizeof(struct port_params));\n+\tmemcpy(&port->partner_admin, &initial, sizeof(struct port_params));\n \n \t/* default states */\n \tport->actor_state = STATE_AGGREGATION | STATE_LACP_ACTIVE | STATE_DEFAULTED;\n", "prefixes": [ "RFC" ] }{ "id": 73357, "url": "