Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809078/?format=api
{ "id": 809078, "url": "http://patchwork.ozlabs.org/api/patches/809078/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170902152126.17286-3-jiri@resnulli.us/", "project": { "id": 7, "url": "http://patchwork.ozlabs.org/api/projects/7/?format=api", "name": "Linux network development", "link_name": "netdev", "list_id": "netdev.vger.kernel.org", "list_email": "netdev@vger.kernel.org", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170902152126.17286-3-jiri@resnulli.us>", "list_archive_url": null, "date": "2017-09-02T15:21:07", "name": "[net-next,02/21] mlxsw: reg: Update RATR to support IP-in-IP tunnels", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "99779fbf14c9cd5c60d18e42cef8b15937c736ea", "submitter": { "id": 15321, "url": "http://patchwork.ozlabs.org/api/people/15321/?format=api", "name": "Jiri Pirko", "email": "jiri@resnulli.us" }, "delegate": { "id": 34, "url": "http://patchwork.ozlabs.org/api/users/34/?format=api", "username": "davem", "first_name": "David", "last_name": "Miller", "email": "davem@davemloft.net" }, "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20170902152126.17286-3-jiri@resnulli.us/mbox/", "series": [ { "id": 1159, "url": "http://patchwork.ozlabs.org/api/series/1159/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=1159", "date": "2017-09-02T15:21:05", "name": "mlxsw: Offloading GRE tunnels", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1159/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809078/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809078/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<netdev-owner@vger.kernel.org>", "X-Original-To": "patchwork-incoming@ozlabs.org", "Delivered-To": "patchwork-incoming@ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=resnulli-us.20150623.gappssmtp.com\n\theader.i=@resnulli-us.20150623.gappssmtp.com\n\theader.b=\"Sdw2DK+4\"; dkim-atps=neutral" ], "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xl0Fg2kwWz9sRY\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 3 Sep 2017 01:21:43 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752734AbdIBPVh (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 2 Sep 2017 11:21:37 -0400", "from mail-wr0-f193.google.com ([209.85.128.193]:38503 \"EHLO\n\tmail-wr0-f193.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752660AbdIBPVe (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sat, 2 Sep 2017 11:21:34 -0400", "by mail-wr0-f193.google.com with SMTP id j3so1341936wrb.5\n\tfor <netdev@vger.kernel.org>; Sat, 02 Sep 2017 08:21:33 -0700 (PDT)", "from localhost (jirka.pirko.cz. [84.16.102.26])\n\tby smtp.gmail.com with ESMTPSA id\n\tp1sm1619336wra.29.2017.09.02.08.21.31\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSat, 02 Sep 2017 08:21:31 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=resnulli-us.20150623.gappssmtp.com; s=20150623;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=B0NzQdEISYlXkq1ZZNSBqH09ESr75qC10REHuytVqe0=;\n\tb=Sdw2DK+4R5tVgN8xf7dzfMcSsE25rtiFt8+6vxLSaFqkjdD1yI/dId0QHC7wIr9D+z\n\tVe9TL/Ilwg7X8Ih+KolgD4X8QE/DDxIhbD6SBWan5xQclKlguNbkzhRVIkJ2YyELbb0w\n\tStNY4iEea3/mqZlrVe8H2f0kfMgl6Npwcy5iP5f2Xq7jKK60FTgH4Jxq4lCnG7urGL6u\n\tgUwBjBUm+MC4eFVNQoJ5NfJBwfMof15GLpJdd2DJDtOTqb0NaJlamkWG0mhTJIW7byMJ\n\t4djV6UMNnNblh1nI6jq5e3gtHl4cD1CfsK7+2O7bpwBtlX20Y0bfeIH0RxuoSHHof53v\n\tGYPQ==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=B0NzQdEISYlXkq1ZZNSBqH09ESr75qC10REHuytVqe0=;\n\tb=lG/ODUVZQK8Cb2dzPKhPav9ayP4YQpBl0xTxMdN5m7Cc5+sxtzJSwma0dS4MbHopeN\n\t+JBsQ+tXIYIU+72iN3axqJf0TbVTWY6qnGF1W9xJ3nXkmt8FdP8e74NkNbnD15JzLOqo\n\tuFdOrPUlabRyb42UdiYKNsuqJe20FeF+J4FcCS9Rq9U9Xqr41zuroQ9HVRp3OJ7F0miM\n\tkE2ndmpHEtB0nYt/vfZxreLfxhe8MUu55fFN4nFwQOVxtKENZEu5r2/T4iJYCmMKlrfH\n\tK2l9ykd/N9Ny5PoLryzXS0NH9oI7m/TCB852DaXCK6bfwyCiTA67KRzGWUS3rvukRmxT\n\tsEGg==", "X-Gm-Message-State": "AHPjjUjozOMIgfbrDFIlD6pEeiAvXaPIhxSoocZu4h+az6Hi4sM2NqLQ\n\tK4m0JsTR2ZxoU+eXKUo=", "X-Google-Smtp-Source": "ADKCNb7pUd2WvMV9ZZEdBpIG/1Sa3+ZCruauFvBSYxoclpOvltzvmKxGXj3HrAA/sc6cXSj5H0WLDw==", "X-Received": "by 10.223.142.87 with SMTP id n81mr2819517wrb.164.1504365692546; \n\tSat, 02 Sep 2017 08:21:32 -0700 (PDT)", "From": "Jiri Pirko <jiri@resnulli.us>", "To": "netdev@vger.kernel.org", "Cc": "davem@davemloft.net, petrm@mellanox.com, idosch@mellanox.com,\n\tmlxsw@mellanox.com", "Subject": "[patch net-next 02/21] mlxsw: reg: Update RATR to support IP-in-IP\n\ttunnels", "Date": "Sat, 2 Sep 2017 17:21:07 +0200", "Message-Id": "<20170902152126.17286-3-jiri@resnulli.us>", "X-Mailer": "git-send-email 2.9.3", "In-Reply-To": "<20170902152126.17286-1-jiri@resnulli.us>", "References": "<20170902152126.17286-1-jiri@resnulli.us>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "From: Petr Machata <petrm@mellanox.com>\n\nSo far, adjacencies have always been of type Ethernet (with value of 0),\nand thus there was no need to explicitly support RATR type. However to\nsupport IP-in-IP adjacencies, this type and a suite of IP-in-IP-specific\nattributes need to be added.\n\nSigned-off-by: Petr Machata <petrm@mellanox.com>\nReviewed-by: Ido Schimmel <idosch@mellanox.com>\nSigned-off-by: Jiri Pirko <jiri@mellanox.com>\n---\n drivers/net/ethernet/mellanox/mlxsw/reg.h | 66 +++++++++++++++++++++++++++++++\n 1 file changed, 66 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h\nindex 8736f8492..6a7757f 100644\n--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h\n+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h\n@@ -4362,6 +4362,38 @@ MLXSW_ITEM32(reg, ratr, v, 0x00, 24, 1);\n */\n MLXSW_ITEM32(reg, ratr, a, 0x00, 16, 1);\n \n+enum mlxsw_reg_ratr_type {\n+\t/* Ethernet */\n+\tMLXSW_REG_RATR_TYPE_ETHERNET,\n+\t/* IPoIB Unicast without GRH.\n+\t * Reserved for Spectrum.\n+\t */\n+\tMLXSW_REG_RATR_TYPE_IPOIB_UC,\n+\t/* IPoIB Unicast with GRH. Supported only in table 0 (Ethernet unicast\n+\t * adjacency).\n+\t * Reserved for Spectrum.\n+\t */\n+\tMLXSW_REG_RATR_TYPE_IPOIB_UC_W_GRH,\n+\t/* IPoIB Multicast.\n+\t * Reserved for Spectrum.\n+\t */\n+\tMLXSW_REG_RATR_TYPE_IPOIB_MC,\n+\t/* MPLS.\n+\t * Reserved for SwitchX/-2.\n+\t */\n+\tMLXSW_REG_RATR_TYPE_MPLS,\n+\t/* IPinIP Encap.\n+\t * Reserved for SwitchX/-2.\n+\t */\n+\tMLXSW_REG_RATR_TYPE_IPIP,\n+};\n+\n+/* reg_ratr_type\n+ * Adjacency entry type.\n+ * Access: RW\n+ */\n+MLXSW_ITEM32(reg, ratr, type, 0x04, 28, 4);\n+\n /* reg_ratr_adjacency_index_low\n * Bits 15:0 of index into the adjacency table.\n * For SwitchX and SwitchX-2, the adjacency table is linear and\n@@ -4416,6 +4448,34 @@ MLXSW_ITEM32(reg, ratr, trap_id, 0x0C, 0, 8);\n */\n MLXSW_ITEM_BUF(reg, ratr, eth_destination_mac, 0x12, 6);\n \n+enum mlxsw_reg_ratr_ipip_type {\n+\t/* IPv4, address set by mlxsw_reg_ratr_ipip_ipv4_udip. */\n+\tMLXSW_REG_RATR_IPIP_TYPE_IPV4,\n+\t/* IPv6, address set by mlxsw_reg_ratr_ipip_ipv6_ptr. */\n+\tMLXSW_REG_RATR_IPIP_TYPE_IPV6,\n+};\n+\n+/* reg_ratr_ipip_type\n+ * Underlay destination ip type.\n+ * Note: the type field must match the protocol of the router interface.\n+ * Access: RW\n+ */\n+MLXSW_ITEM32(reg, ratr, ipip_type, 0x10, 16, 4);\n+\n+/* reg_ratr_ipip_ipv4_udip\n+ * Underlay ipv4 dip.\n+ * Reserved when ipip_type is IPv6.\n+ * Access: RW\n+ */\n+MLXSW_ITEM32(reg, ratr, ipip_ipv4_udip, 0x18, 0, 32);\n+\n+/* reg_ratr_ipip_ipv6_ptr\n+ * Pointer to IPv6 underlay destination ip address.\n+ * For Spectrum: Pointer to KVD linear space.\n+ * Access: RW\n+ */\n+MLXSW_ITEM32(reg, ratr, ipip_ipv6_ptr, 0x1C, 0, 24);\n+\n static inline void\n mlxsw_reg_ratr_pack(char *payload,\n \t\t enum mlxsw_reg_ratr_op op, bool valid,\n@@ -4435,6 +4495,12 @@ static inline void mlxsw_reg_ratr_eth_entry_pack(char *payload,\n \tmlxsw_reg_ratr_eth_destination_mac_memcpy_to(payload, dest_mac);\n }\n \n+static inline void mlxsw_reg_ratr_ipip4_entry_pack(char *payload, u32 ipv4_udip)\n+{\n+\tmlxsw_reg_ratr_ipip_type_set(payload, MLXSW_REG_RATR_IPIP_TYPE_IPV4);\n+\tmlxsw_reg_ratr_ipip_ipv4_udip_set(payload, ipv4_udip);\n+}\n+\n /* RICNT - Router Interface Counter Register\n * -----------------------------------------\n * The RICNT register retrieves per port performance counters\n", "prefixes": [ "net-next", "02/21" ] }