Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1303260/?format=api
{ "id": 1303260, "url": "http://patchwork.ozlabs.org/api/patches/1303260/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200604000105.15059-5-andre.guedes@intel.com/", "project": { "id": 46, "url": "http://patchwork.ozlabs.org/api/projects/46/?format=api", "name": "Intel Wired Ethernet development", "link_name": "intel-wired-lan", "list_id": "intel-wired-lan.osuosl.org", "list_email": "intel-wired-lan@osuosl.org", "web_url": "", "scm_url": "", "webscm_url": "", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20200604000105.15059-5-andre.guedes@intel.com>", "list_archive_url": null, "date": "2020-06-04T00:01:03", "name": "[4/6] igc: Remove UDP filter setup in PTP code", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "ef1dac9f74b40e547764f179d4a179f6d627f6ab", "submitter": { "id": 72323, "url": "http://patchwork.ozlabs.org/api/people/72323/?format=api", "name": "Andre Guedes", "email": "andre.guedes@intel.com" }, "delegate": { "id": 68, "url": "http://patchwork.ozlabs.org/api/users/68/?format=api", "username": "jtkirshe", "first_name": "Jeff", "last_name": "Kirsher", "email": "jeffrey.t.kirsher@intel.com" }, "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20200604000105.15059-5-andre.guedes@intel.com/mbox/", "series": [ { "id": 181182, "url": "http://patchwork.ozlabs.org/api/series/181182/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=181182", "date": "2020-06-04T00:01:02", "name": "igc: PTP timestamping fixes", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/181182/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1303260/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1303260/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<intel-wired-lan-bounces@osuosl.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Delivered-To": [ "patchwork-incoming@bilbo.ozlabs.org", "intel-wired-lan@lists.osuosl.org" ], "Authentication-Results": [ "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org; receiver=<UNKNOWN>)", "ozlabs.org;\n dmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 49cmD61N2lz9sSc\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 4 Jun 2020 10:01:58 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id A62AE88720;\n\tThu, 4 Jun 2020 00:01:56 +0000 (UTC)", "from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id k6n8q3ZKmj9W; Thu, 4 Jun 2020 00:01:55 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4449288703;\n\tThu, 4 Jun 2020 00:01:55 +0000 (UTC)", "from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136])\n by ash.osuosl.org (Postfix) with ESMTP id 9FB781BF9B4\n for <intel-wired-lan@lists.osuosl.org>; Thu, 4 Jun 2020 00:01:23 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by silver.osuosl.org (Postfix) with ESMTP id 937C0203F2\n for <intel-wired-lan@lists.osuosl.org>; Thu, 4 Jun 2020 00:01:23 +0000 (UTC)", "from silver.osuosl.org ([127.0.0.1])\n by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n with ESMTP id 0RoxL7eFQ+6u for <intel-wired-lan@lists.osuosl.org>;\n Thu, 4 Jun 2020 00:01:22 +0000 (UTC)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by silver.osuosl.org (Postfix) with ESMTPS id 64C41221D2\n for <intel-wired-lan@lists.osuosl.org>; Thu, 4 Jun 2020 00:01:22 +0000 (UTC)", "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 03 Jun 2020 17:01:21 -0700", "from mrief-mobl1.amr.corp.intel.com ([10.209.62.192])\n by orsmga006.jf.intel.com with ESMTP; 03 Jun 2020 17:01:21 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "IronPort-SDR": [ "\n gQI2iBDvyQ71lFdxewovh5qp2P7LyVKEmgqY4930xFxeVW+YhabjekF9dkKoX0XN4PU6CmVp5P\n XB8IlnUPl7LA==", "\n /k0X2tdoaEH6QP1HmVtNPwd/YR0nVDQsMey4fK7RkiK3CxbAicg2sRpK5Uj/ASpVuaeoSsOgBz\n W3CSZkKsg4ZA==" ], "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.73,470,1583222400\"; d=\"scan'208\";a=\"272932801\"", "From": "Andre Guedes <andre.guedes@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 3 Jun 2020 17:01:03 -0700", "Message-Id": "<20200604000105.15059-5-andre.guedes@intel.com>", "X-Mailer": "git-send-email 2.26.2", "In-Reply-To": "<20200604000105.15059-1-andre.guedes@intel.com>", "References": "<20200604000105.15059-1-andre.guedes@intel.com>", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [PATCH 4/6] igc: Remove UDP filter setup in PTP\n code", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>", "List-Archive": "<http://lists.osuosl.org/pipermail/intel-wired-lan/>", "List-Post": "<mailto:intel-wired-lan@osuosl.org>", "List-Help": "<mailto:intel-wired-lan-request@osuosl.org?subject=help>", "List-Subscribe": "<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "intel-wired-lan-bounces@osuosl.org", "Sender": "\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>" }, "content": "As implemented in igc_ethtool_get_ts_info(), igc only supports HWTSTAMP_\nFILTER_ALL so any HWTSTAMP_FILTER_* option the user may set falls back to\nHWTSTAMP_FILTER_ALL.\n\nHWTSTAMP_FILTER_ALL is implemented via Rx Time Sync Control (TSYNCRXCTL)\nconfiguration which timestamps all incoming packets. Configuring an\nUDP filter, in addition to TSYNCRXCTL, doesn't add much so this patch\nremoves that code. It also takes this opportunity to remove some\nnon-applicable comments.\n\nSigned-off-by: Andre Guedes <andre.guedes@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_ptp.c | 51 +-----------------------\n 1 file changed, 1 insertion(+), 50 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc_ptp.c b/drivers/net/ethernet/intel/igc/igc_ptp.c\nindex e65fdcf966b2..bdf934377abb 100644\n--- a/drivers/net/ethernet/intel/igc/igc_ptp.c\n+++ b/drivers/net/ethernet/intel/igc/igc_ptp.c\n@@ -244,18 +244,7 @@ static void igc_ptp_enable_tstamp_all_rxqueues(struct igc_adapter *adapter,\n * @adapter: networking device structure\n * @config: hwtstamp configuration\n *\n- * Outgoing time stamping can be enabled and disabled. Play nice and\n- * disable it when requested, although it shouldn't case any overhead\n- * when no packet needs it. At most one packet in the queue may be\n- * marked for time stamping, otherwise it would be impossible to tell\n- * for sure to which packet the hardware time stamp belongs.\n- *\n- * Incoming time stamping has to be configured via the hardware\n- * filters. Not all combinations are supported, in particular event\n- * type has to be specified. Matching the kind of event packet is\n- * not supported, with the exception of \"all V2 events regardless of\n- * level 2 or 4\".\n- *\n+ * Return: 0 in case of success, negative errno code otherwise.\n */\n static int igc_ptp_set_timestamp_mode(struct igc_adapter *adapter,\n \t\t\t\t struct hwtstamp_config *config)\n@@ -263,8 +252,6 @@ static int igc_ptp_set_timestamp_mode(struct igc_adapter *adapter,\n \tu32 tsync_tx_ctl = IGC_TSYNCTXCTL_ENABLED;\n \tu32 tsync_rx_ctl = IGC_TSYNCRXCTL_ENABLED;\n \tstruct igc_hw *hw = &adapter->hw;\n-\tu32 tsync_rx_cfg = 0;\n-\tbool is_l4 = false;\n \tu32 regval;\n \n \t/* reserved for future extensions */\n@@ -285,15 +272,7 @@ static int igc_ptp_set_timestamp_mode(struct igc_adapter *adapter,\n \t\ttsync_rx_ctl = 0;\n \t\tbreak;\n \tcase HWTSTAMP_FILTER_PTP_V1_L4_SYNC:\n-\t\ttsync_rx_ctl |= IGC_TSYNCRXCTL_TYPE_L4_V1;\n-\t\ttsync_rx_cfg = IGC_TSYNCRXCFG_PTP_V1_SYNC_MESSAGE;\n-\t\tis_l4 = true;\n-\t\tbreak;\n \tcase HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:\n-\t\ttsync_rx_ctl |= IGC_TSYNCRXCTL_TYPE_L4_V1;\n-\t\ttsync_rx_cfg = IGC_TSYNCRXCFG_PTP_V1_DELAY_REQ_MESSAGE;\n-\t\tis_l4 = true;\n-\t\tbreak;\n \tcase HWTSTAMP_FILTER_PTP_V2_EVENT:\n \tcase HWTSTAMP_FILTER_PTP_V2_L2_EVENT:\n \tcase HWTSTAMP_FILTER_PTP_V2_L4_EVENT:\n@@ -303,32 +282,22 @@ static int igc_ptp_set_timestamp_mode(struct igc_adapter *adapter,\n \tcase HWTSTAMP_FILTER_PTP_V2_DELAY_REQ:\n \tcase HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ:\n \tcase HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ:\n-\t\ttsync_rx_ctl |= IGC_TSYNCRXCTL_TYPE_EVENT_V2;\n-\t\tconfig->rx_filter = HWTSTAMP_FILTER_PTP_V2_EVENT;\n-\t\tis_l4 = true;\n-\t\tbreak;\n \tcase HWTSTAMP_FILTER_PTP_V1_L4_EVENT:\n \tcase HWTSTAMP_FILTER_NTP_ALL:\n \tcase HWTSTAMP_FILTER_ALL:\n \t\ttsync_rx_ctl |= IGC_TSYNCRXCTL_TYPE_ALL;\n \t\tconfig->rx_filter = HWTSTAMP_FILTER_ALL;\n \t\tbreak;\n-\t\t/* fall through */\n \tdefault:\n \t\tconfig->rx_filter = HWTSTAMP_FILTER_NONE;\n \t\treturn -ERANGE;\n \t}\n \n-\t/* Per-packet timestamping only works if all packets are\n-\t * timestamped, so enable timestamping in all packets as long\n-\t * as one Rx filter was configured.\n-\t */\n \tif (tsync_rx_ctl) {\n \t\ttsync_rx_ctl = IGC_TSYNCRXCTL_ENABLED;\n \t\ttsync_rx_ctl |= IGC_TSYNCRXCTL_TYPE_ALL;\n \t\ttsync_rx_ctl |= IGC_TSYNCRXCTL_RXSYNSIG;\n \t\tconfig->rx_filter = HWTSTAMP_FILTER_ALL;\n-\t\tis_l4 = true;\n \n \t\tif (hw->mac.type == igc_i225) {\n \t\t\tregval = rd32(IGC_RXPBS);\n@@ -359,24 +328,6 @@ static int igc_ptp_set_timestamp_mode(struct igc_adapter *adapter,\n \tregval |= tsync_rx_ctl;\n \twr32(IGC_TSYNCRXCTL, regval);\n \n-\t/* define which PTP packets are time stamped */\n-\twr32(IGC_TSYNCRXCFG, tsync_rx_cfg);\n-\n-\t/* L4 Queue Filter[3]: filter by destination port and protocol */\n-\tif (is_l4) {\n-\t\tu32 ftqf = (IPPROTO_UDP /* UDP */\n-\t\t\t | IGC_FTQF_VF_BP /* VF not compared */\n-\t\t\t | IGC_FTQF_1588_TIME_STAMP /* Enable Timestamp */\n-\t\t\t | IGC_FTQF_MASK); /* mask all inputs */\n-\t\tftqf &= ~IGC_FTQF_MASK_PROTO_BP; /* enable protocol check */\n-\n-\t\twr32(IGC_IMIR(3), htons(PTP_EV_PORT));\n-\t\twr32(IGC_IMIREXT(3),\n-\t\t (IGC_IMIREXT_SIZE_BP | IGC_IMIREXT_CTRL_BP));\n-\t\twr32(IGC_FTQF(3), ftqf);\n-\t} else {\n-\t\twr32(IGC_FTQF(3), IGC_FTQF_MASK);\n-\t}\n \twrfl();\n \n \t/* clear TX time stamp registers, just to be sure */\n", "prefixes": [ "4/6" ] }