Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/86823/?format=api
http://patches.dpdk.org/api/patches/86823/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20210118203508.1332-4-aboyer@pensando.io/", "project": { "id": 1, "url": "http://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": "<20210118203508.1332-4-aboyer@pensando.io>", "list_archive_url": "https://inbox.dpdk.org/dev/20210118203508.1332-4-aboyer@pensando.io", "date": "2021-01-18T20:34:58", "name": "[03/13] net/ionic: observe endianness in Rx filter code", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "225d3a11aa3400a77c3c744721361552dfe44e3c", "submitter": { "id": 2036, "url": "http://patches.dpdk.org/api/people/2036/?format=api", "name": "Andrew Boyer", "email": "aboyer@pensando.io" }, "delegate": { "id": 319, "url": "http://patches.dpdk.org/api/users/319/?format=api", "username": "fyigit", "first_name": "Ferruh", "last_name": "Yigit", "email": "ferruh.yigit@amd.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20210118203508.1332-4-aboyer@pensando.io/mbox/", "series": [ { "id": 14820, "url": "http://patches.dpdk.org/api/series/14820/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=14820", "date": "2021-01-18T20:34:55", "name": "net/ionic: fixes and optimizations", "version": 1, "mbox": "http://patches.dpdk.org/series/14820/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/86823/comments/", "check": "success", "checks": "http://patches.dpdk.org/api/patches/86823/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 mails.dpdk.org (mails.dpdk.org [217.70.189.124])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 66423A0A03;\n\tMon, 18 Jan 2021 21:35:53 +0100 (CET)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 96295140E3F;\n\tMon, 18 Jan 2021 21:35:41 +0100 (CET)", "from mail-pl1-f178.google.com (mail-pl1-f178.google.com\n [209.85.214.178])\n by mails.dpdk.org (Postfix) with ESMTP id 435B2140E31\n for <dev@dpdk.org>; Mon, 18 Jan 2021 21:35:39 +0100 (CET)", "by mail-pl1-f178.google.com with SMTP id b8so9263859plx.0\n for <dev@dpdk.org>; Mon, 18 Jan 2021 12:35:39 -0800 (PST)", "from driver-dev1.pensando.io ([12.226.153.42])\n by smtp.gmail.com with ESMTPSA id g201sm795160pfb.81.2021.01.18.12.35.37\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 18 Jan 2021 12:35:37 -0800 (PST)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=pensando.io; s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references;\n bh=bSmpDwBakpZ9ausv5Xzn0hCAL8t7stgUDjVVwuwbC1k=;\n b=EjV/DAiaBZJFswz1VxKzT0Lvcv+HBw+lUnzCsSwoMd6b8uftnwD2qb5nfh3j57GuAU\n 6EiYTb0KeV/D9zH66NWCJQgXr394GbC0MlWD0GQLs+3vFToXMDl9uytRArSuC9vFnSFh\n qS0zJAXBRMiWooNlktfbkQs0q2QzXci8Sa2Nhdp4ckKbm5f5IIQG5BQ/BrrUz/+2Auc+\n bxpTDnHnFkrFIFa1DbT6xonz2X3eF6bU12f/yoFnN3pAxVJqB4c72WlCo805zyeHGtHz\n +ZhVjf+7wOdhAgjHuVT8h1AgZCuw1uRGV7dqc2X/Wuc2SRcpVY4qUCj/Z0n0Mlr+uYZZ\n THQg==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references;\n bh=bSmpDwBakpZ9ausv5Xzn0hCAL8t7stgUDjVVwuwbC1k=;\n b=h+MIajroNhBTrF0XCSx1+W/hq3yY+OaWCfn3OfukA9I+DtHg4ZhehnayDXQ2/N9DAR\n N0RrUn91lDMqftgx99Nxis4LLiD+u7rQc4CbP/6a80sgdYYZ8m/UQ+TXhmlSBt3OeRW/\n T6wWKbDBoasbEgrHrs27sxOugs0MPlNcCYau1HXlX1/iv1mMHNMVWWS51lsi7SQhXKxp\n yaY75jDgw7dFquyJ50N5qgGIr4TCd1QfkBIiPVACv+b4UshkGfb7ovLllIWoRgjL51x4\n lKfMjfmkySsXLvPr9I4cWpE8Y8gXzIJGjV9OWd5xHv5oTM5chkOT77u57QP3Al28lLLL\n 9+7w==", "X-Gm-Message-State": "AOAM531rkJHAtcuPTi8ySoWVwhDMGk36434+70LcVE97YOdKbPvL8iBH\n 0+niZsnNOepGUdiESlyORc73XVi5pwSbaQ==", "X-Google-Smtp-Source": "\n ABdhPJzkAW7nUXzJtgDmbpGgXbdv9O5TSfI16H/WPyEE4n4AR8lzP1XSiCA8xWst3GV98UDhSqyLbQ==", "X-Received": "by 2002:a17:90a:bb0d:: with SMTP id\n u13mr1171994pjr.106.1611002138376;\n Mon, 18 Jan 2021 12:35:38 -0800 (PST)", "From": "Andrew Boyer <aboyer@pensando.io>", "To": "dev@dpdk.org", "Cc": "Alfredo Cardigliano <cardigliano@ntop.org>,\n Andrew Boyer <aboyer@pensando.io>", "Date": "Mon, 18 Jan 2021 12:34:58 -0800", "Message-Id": "<20210118203508.1332-4-aboyer@pensando.io>", "X-Mailer": "git-send-email 2.17.1", "In-Reply-To": "<20210118203508.1332-1-aboyer@pensando.io>", "References": "<20210118203508.1332-1-aboyer@pensando.io>", "Subject": "[dpdk-dev] [PATCH 03/13] net/ionic: observe endianness in Rx filter\n code", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.29", "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": "The IONIC firmware is little-endian.\nAdd a new field to struct ionic_rx_filter to store the CPU-endian\nmatch type.\nUse a local variable for the VLAN when searching the hash table.\n\nSigned-off-by: Andrew Boyer <aboyer@pensando.io>\n---\n drivers/net/ionic/ionic_rx_filter.c | 22 +++++++++++-----------\n drivers/net/ionic/ionic_rx_filter.h | 1 +\n 2 files changed, 12 insertions(+), 11 deletions(-)", "diff": "diff --git a/drivers/net/ionic/ionic_rx_filter.c b/drivers/net/ionic/ionic_rx_filter.c\nindex fe624538df..320b9019b3 100644\n--- a/drivers/net/ionic/ionic_rx_filter.c\n+++ b/drivers/net/ionic/ionic_rx_filter.c\n@@ -25,7 +25,7 @@ ionic_rx_filter_del(struct ionic_lif *lif, struct ionic_rx_filter *f)\n \t\t.pending_work = true,\n \t\t.cmd.rx_filter_del = {\n \t\t\t.opcode = IONIC_CMD_RX_FILTER_DEL,\n-\t\t\t.filter_id = f->filter_id,\n+\t\t\t.filter_id = rte_cpu_to_le_32(f->filter_id),\n \t\t},\n \t};\n \n@@ -74,25 +74,24 @@ ionic_rx_filter_save(struct ionic_lif *lif, uint32_t flow_id,\n \t\treturn -ENOMEM;\n \n \tf->flow_id = flow_id;\n-\tf->filter_id = ctx->comp.rx_filter_add.filter_id;\n+\tf->filter_id = rte_le_to_cpu_32(ctx->comp.rx_filter_add.filter_id);\n \tf->rxq_index = rxq_index;\n+\tf->match = rte_le_to_cpu_16(f->cmd.match);\n \tmemcpy(&f->cmd, &ctx->cmd, sizeof(f->cmd));\n \n-\tswitch (f->cmd.match) {\n+\tswitch (f->match) {\n \tcase IONIC_RX_FILTER_MATCH_VLAN:\n-\t\tkey = f->cmd.vlan.vlan & IONIC_RX_FILTER_HLISTS_MASK;\n+\t\tkey = rte_le_to_cpu_16(f->cmd.vlan.vlan);\n \t\tbreak;\n \tcase IONIC_RX_FILTER_MATCH_MAC:\n \t\tmemcpy(&key, f->cmd.mac.addr, sizeof(key));\n-\t\tkey &= IONIC_RX_FILTER_HLISTS_MASK;\n-\t\tbreak;\n-\tcase IONIC_RX_FILTER_MATCH_MAC_VLAN:\n-\t\tkey = f->cmd.mac_vlan.vlan & IONIC_RX_FILTER_HLISTS_MASK;\n \t\tbreak;\n \tdefault:\n \t\treturn -EINVAL;\n \t}\n \n+\tkey &= IONIC_RX_FILTER_HLISTS_MASK;\n+\n \trte_spinlock_lock(&lif->rx_filters.lock);\n \n \tLIST_INSERT_HEAD(&lif->rx_filters.by_hash[key], f, by_hash);\n@@ -111,11 +110,12 @@ ionic_rx_filter_by_vlan(struct ionic_lif *lif, uint16_t vid)\n {\n \tuint32_t key = vid & IONIC_RX_FILTER_HLISTS_MASK;\n \tstruct ionic_rx_filter *f;\n+\t__le16 vid_le = rte_cpu_to_le_16(vid);\n \n \tLIST_FOREACH(f, &lif->rx_filters.by_hash[key], by_hash) {\n-\t\tif (f->cmd.match != IONIC_RX_FILTER_MATCH_VLAN)\n+\t\tif (f->match != IONIC_RX_FILTER_MATCH_VLAN)\n \t\t\tcontinue;\n-\t\tif (f->cmd.vlan.vlan == vid)\n+\t\tif (f->cmd.vlan.vlan == vid_le)\n \t\t\treturn f;\n \t}\n \n@@ -130,7 +130,7 @@ ionic_rx_filter_by_addr(struct ionic_lif *lif, const uint8_t *addr)\n \tstruct ionic_rx_filter *f;\n \n \tLIST_FOREACH(f, &lif->rx_filters.by_hash[key], by_hash) {\n-\t\tif (f->cmd.match != IONIC_RX_FILTER_MATCH_MAC)\n+\t\tif (f->match != IONIC_RX_FILTER_MATCH_MAC)\n \t\t\tcontinue;\n \t\tif (memcmp(addr, f->cmd.mac.addr, RTE_ETHER_ADDR_LEN) == 0)\n \t\t\treturn f;\ndiff --git a/drivers/net/ionic/ionic_rx_filter.h b/drivers/net/ionic/ionic_rx_filter.h\nindex 6204a7b535..e1dd5f910c 100644\n--- a/drivers/net/ionic/ionic_rx_filter.h\n+++ b/drivers/net/ionic/ionic_rx_filter.h\n@@ -15,6 +15,7 @@ struct ionic_rx_filter {\n \tuint32_t flow_id;\n \tuint32_t filter_id;\n \tuint16_t rxq_index;\n+\tuint16_t match;\n \tstruct ionic_rx_filter_add_cmd cmd;\n \tLIST_ENTRY(ionic_rx_filter) by_hash;\n \tLIST_ENTRY(ionic_rx_filter) by_id;\n", "prefixes": [ "03/13" ] }{ "id": 86823, "url": "