Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1045326/?format=api
{ "id": 1045326, "url": "http://patchwork.ozlabs.org/api/patches/1045326/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20190220123931.31441-1-sasha.neftin@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": "<20190220123931.31441-1-sasha.neftin@intel.com>", "list_archive_url": null, "date": "2019-02-20T12:39:31", "name": "[v1,1/1] igc: Add support for the ntuple feature", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "0fb8a48159f41791226f9b24374c25faffc9f01c", "submitter": { "id": 69860, "url": "http://patchwork.ozlabs.org/api/people/69860/?format=api", "name": "Sasha Neftin", "email": "sasha.neftin@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/20190220123931.31441-1-sasha.neftin@intel.com/mbox/", "series": [ { "id": 93146, "url": "http://patchwork.ozlabs.org/api/series/93146/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=93146", "date": "2019-02-20T12:39:31", "name": "[v1,1/1] igc: Add support for the ntuple feature", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/93146/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1045326/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1045326/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\tspf=pass (mailfrom) smtp.mailfrom=osuosl.org\n\t(client-ip=140.211.166.138; helo=whitealder.osuosl.org;\n\tenvelope-from=intel-wired-lan-bounces@osuosl.org;\n\treceiver=<UNKNOWN>)", "ozlabs.org;\n\tdmarc=fail (p=none dis=none) header.from=intel.com" ], "Received": [ "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 444HHJ2Jr4z9s70\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 20 Feb 2019 23:39:39 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id A25FC81423;\n\tWed, 20 Feb 2019 12:39:37 +0000 (UTC)", "from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 4NFQs9bG5Xg7; Wed, 20 Feb 2019 12:39:35 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 9C613811EC;\n\tWed, 20 Feb 2019 12:39:35 +0000 (UTC)", "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id DDB771BF42D\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 20 Feb 2019 12:39:34 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id D9E0285992\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 20 Feb 2019 12:39:34 +0000 (UTC)", "from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id goMDjJGKvBdP for <intel-wired-lan@lists.osuosl.org>;\n\tWed, 20 Feb 2019 12:39:34 +0000 (UTC)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id 11887814E1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tWed, 20 Feb 2019 12:39:34 +0000 (UTC)", "from orsmga007.jf.intel.com ([10.7.209.58])\n\tby fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t20 Feb 2019 04:39:33 -0800", "from ccdlinuxdev08.iil.intel.com ([143.185.161.150])\n\tby orsmga007.jf.intel.com with ESMTP; 20 Feb 2019 04:39:32 -0800" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "X-Amp-Result": "SKIPPED(no attachment in message)", "X-Amp-File-Uploaded": "False", "X-ExtLoop1": "1", "X-IronPort-AV": "E=Sophos;i=\"5.58,391,1544515200\"; d=\"scan'208\";a=\"116372882\"", "From": "Sasha Neftin <sasha.neftin@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Wed, 20 Feb 2019 14:39:31 +0200", "Message-Id": "<20190220123931.31441-1-sasha.neftin@intel.com>", "X-Mailer": "git-send-email 2.11.0", "Subject": "[Intel-wired-lan] [PATCH v1 1/1] igc: Add support for the ntuple\n\tfeature", "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\t<intel-wired-lan.osuosl.org>", "List-Unsubscribe": "<https://lists.osuosl.org/mailman/options/intel-wired-lan>, \n\t<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\t<mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>", "MIME-Version": "1.0", "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": "Copy the ntuple feature into list of user selectable features.\nEnable the ntuple feature.\n\nSigned-off-by: Sasha Neftin <sasha.neftin@intel.com>\n---\n drivers/net/ethernet/intel/igc/igc_defines.h | 3 +\n drivers/net/ethernet/intel/igc/igc_main.c | 86 ++++++++++++++++++++++++++++\n 2 files changed, 89 insertions(+)", "diff": "diff --git a/drivers/net/ethernet/intel/igc/igc_defines.h b/drivers/net/ethernet/intel/igc/igc_defines.h\nindex 925c89b57ec5..a9a30268de59 100644\n--- a/drivers/net/ethernet/intel/igc/igc_defines.h\n+++ b/drivers/net/ethernet/intel/igc/igc_defines.h\n@@ -400,6 +400,9 @@\n \n #define IGC_N0_QUEUE -1\n \n+#define IGC_MAX_MAC_HDR_LEN\t127\n+#define IGC_MAX_NETWORK_HDR_LEN\t511\n+\n #define IGC_VLAPQF_QUEUE_SEL(_n, q_idx) ((q_idx) << ((_n) * 4))\n #define IGC_VLAPQF_P_VALID(_n)\t(0x1 << (3 + (_n) * 4))\n #define IGC_VLAPQF_QUEUE_MASK\t0x03\ndiff --git a/drivers/net/ethernet/intel/igc/igc_main.c b/drivers/net/ethernet/intel/igc/igc_main.c\nindex 1d21b95d9e2c..cf49bacbb84a 100644\n--- a/drivers/net/ethernet/intel/igc/igc_main.c\n+++ b/drivers/net/ethernet/intel/igc/igc_main.c\n@@ -2127,6 +2127,86 @@ static struct net_device_stats *igc_get_stats(struct net_device *netdev)\n \treturn &netdev->stats;\n }\n \n+static netdev_features_t igc_fix_features(struct net_device *netdev,\n+\t\t\t\t\t netdev_features_t features)\n+{\n+\t/* Since there is no support for separate Rx/Tx vlan accel\n+\t * enable/disable make sure Tx flag is always in same state as Rx.\n+\t */\n+\tif (features & NETIF_F_HW_VLAN_CTAG_RX)\n+\t\tfeatures |= NETIF_F_HW_VLAN_CTAG_TX;\n+\telse\n+\t\tfeatures &= ~NETIF_F_HW_VLAN_CTAG_TX;\n+\n+\treturn features;\n+}\n+\n+static int igc_set_features(struct net_device *netdev,\n+\t\t\t netdev_features_t features)\n+{\n+\tnetdev_features_t changed = netdev->features ^ features;\n+\tstruct igc_adapter *adapter = netdev_priv(netdev);\n+\n+\t/* Add VLAN support */\n+\tif (!(changed & (NETIF_F_RXALL | NETIF_F_NTUPLE)))\n+\t\treturn 0;\n+\n+\tif (!(features & NETIF_F_NTUPLE)) {\n+\t\tstruct hlist_node *node2;\n+\t\tstruct igc_nfc_filter *rule;\n+\n+\t\tspin_lock(&adapter->nfc_lock);\n+\t\thlist_for_each_entry_safe(rule, node2,\n+\t\t\t\t\t &adapter->nfc_filter_list, nfc_node) {\n+\t\t\tigc_erase_filter(adapter, rule);\n+\t\t\thlist_del(&rule->nfc_node);\n+\t\t\tkfree(rule);\n+\t\t}\n+\t\tspin_unlock(&adapter->nfc_lock);\n+\t\tadapter->nfc_filter_count = 0;\n+\t}\n+\n+\tnetdev->features = features;\n+\n+\tif (netif_running(netdev))\n+\t\tigc_reinit_locked(adapter);\n+\telse\n+\t\tigc_reset(adapter);\n+\n+\treturn 1;\n+}\n+\n+static netdev_features_t\n+igc_features_check(struct sk_buff *skb, struct net_device *dev,\n+\t\t netdev_features_t features)\n+{\n+\tunsigned int network_hdr_len, mac_hdr_len;\n+\n+\t/* Make certain the headers can be described by a context descriptor */\n+\tmac_hdr_len = skb_network_header(skb) - skb->data;\n+\tif (unlikely(mac_hdr_len > IGC_MAX_MAC_HDR_LEN))\n+\t\treturn features & ~(NETIF_F_HW_CSUM |\n+\t\t\t\t NETIF_F_SCTP_CRC |\n+\t\t\t\t NETIF_F_HW_VLAN_CTAG_TX |\n+\t\t\t\t NETIF_F_TSO |\n+\t\t\t\t NETIF_F_TSO6);\n+\n+\tnetwork_hdr_len = skb_checksum_start(skb) - skb_network_header(skb);\n+\tif (unlikely(network_hdr_len > IGC_MAX_NETWORK_HDR_LEN))\n+\t\treturn features & ~(NETIF_F_HW_CSUM |\n+\t\t\t\t NETIF_F_SCTP_CRC |\n+\t\t\t\t NETIF_F_TSO |\n+\t\t\t\t NETIF_F_TSO6);\n+\n+\t/* We can only support IPV4 TSO in tunnels if we can mangle the\n+\t * inner IP ID field, so strip TSO if MANGLEID is not supported.\n+\t */\n+\tif (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID))\n+\t\tfeatures &= ~NETIF_F_TSO;\n+\n+\treturn features;\n+}\n+\n /**\n * igc_configure - configure the hardware for RX and TX\n * @adapter: private board structure\n@@ -3793,6 +3873,9 @@ static const struct net_device_ops igc_netdev_ops = {\n \t.ndo_set_mac_address\t= igc_set_mac,\n \t.ndo_change_mtu\t\t= igc_change_mtu,\n \t.ndo_get_stats\t\t= igc_get_stats,\n+\t.ndo_fix_features\t= igc_fix_features,\n+\t.ndo_set_features\t= igc_set_features,\n+\t.ndo_features_check\t= igc_features_check,\n };\n \n /* PCIe configuration access */\n@@ -4022,6 +4105,9 @@ static int igc_probe(struct pci_dev *pdev,\n \tif (err)\n \t\tgoto err_sw_init;\n \n+\t/* copy netdev features into list of user selectable features */\n+\tnetdev->hw_features |= NETIF_F_NTUPLE;\n+\n \t/* MTU range: 68 - 9216 */\n \tnetdev->min_mtu = ETH_MIN_MTU;\n \tnetdev->max_mtu = MAX_STD_JUMBO_FRAME_SIZE;\n", "prefixes": [ "v1", "1/1" ] }