Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/986351/?format=api
{ "id": 986351, "url": "http://patchwork.ozlabs.org/api/patches/986351/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20181018223943.3709-1-jeffrey.t.kirsher@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": "<20181018223943.3709-1-jeffrey.t.kirsher@intel.com>", "list_archive_url": null, "date": "2018-10-18T22:39:43", "name": "[v2] ixgbe/ixgbevf: fix XFRM_ALGO dependency", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "6804675dd5d89973b66207d47bb5cc36c8f39411", "submitter": { "id": 473, "url": "http://patchwork.ozlabs.org/api/people/473/?format=api", "name": "Kirsher, Jeffrey T", "email": "jeffrey.t.kirsher@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/20181018223943.3709-1-jeffrey.t.kirsher@intel.com/mbox/", "series": [ { "id": 71588, "url": "http://patchwork.ozlabs.org/api/series/71588/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=71588", "date": "2018-10-18T22:39:43", "name": "[v2] ixgbe/ixgbevf: fix XFRM_ALGO dependency", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/71588/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/986351/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/986351/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.137; helo=fraxinus.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 fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\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 42bkWg0ynGz9s9J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 19 Oct 2018 09:39:57 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 6D7A686A2B;\n\tThu, 18 Oct 2018 22:39:55 +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 0nDFQKEuFzVQ; Thu, 18 Oct 2018 22:39:52 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 9B88E86806;\n\tThu, 18 Oct 2018 22:39:52 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id C01781BF488\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Oct 2018 22:39:51 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id BCA3586FB7\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Oct 2018 22:39:51 +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 0unwaZenUICk for <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Oct 2018 22:39:50 +0000 (UTC)", "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 9BB0286DF0\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tThu, 18 Oct 2018 22:39:50 +0000 (UTC)", "from orsmga008.jf.intel.com ([10.7.209.65])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t18 Oct 2018 15:39:50 -0700", "from jtkirshe-desk1.jf.intel.com ([134.134.177.96])\n\tby orsmga008.jf.intel.com with ESMTP; 18 Oct 2018 15:39:49 -0700" ], "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.54,397,1534834800\"; d=\"scan'208\";a=\"82607762\"", "From": "Jeff Kirsher <jeffrey.t.kirsher@intel.com>", "To": "intel-wired-lan@lists.osuosl.org", "Date": "Thu, 18 Oct 2018 15:39:43 -0700", "Message-Id": "<20181018223943.3709-1-jeffrey.t.kirsher@intel.com>", "X-Mailer": "git-send-email 2.17.2", "Subject": "[Intel-wired-lan] [PATCH v2] ixgbe/ixgbevf: fix XFRM_ALGO dependency", "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>", "Cc": "Arnd Bergmann <arnd@arndb.de>", "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": "Based on the original work from Arnd Bergmann.\n\nWhen XFRM_ALGO is not enabled, the new ixgbe IPsec code produces a\nlink error:\n\ndrivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.o: In function `ixgbe_ipsec_vf_add_sa':\nixgbe_ipsec.c:(.text+0x1266): undefined reference to `xfrm_aead_get_byname'\n\nSimply selecting XFRM_ALGO from here causes circular dependencies, so\nto fix it, we probably want this slightly more complex solution that is\nsimilar to what other drivers with XFRM offload do:\n\nA separate Kconfig symbol now controls whether we include the IPsec\noffload code. To keep the old behavior, this is left as 'default y'. The\ndependency in XFRM_OFFLOAD still causes a circular dependency but is\nnot actually needed because this symbol is not user visible, so removing\nthat dependency on top makes it all work.\n\nCC: Arnd Bergmann <arnd@arndb.de>\nCC: Shannon Nelson <shannon.nelson@oracle.com>\nFixes: eda0333ac293 (\"ixgbe: add VF IPsec management\")\nSigned-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>\n---\nv2: fixed spelling errors, also added the changes to ixgbevf driver as\n well\n\n drivers/net/ethernet/intel/Kconfig | 18 ++++++++++++++++++\n drivers/net/ethernet/intel/ixgbe/Makefile | 2 +-\n drivers/net/ethernet/intel/ixgbe/ixgbe.h | 8 ++++----\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 6 +++---\n drivers/net/ethernet/intel/ixgbevf/Makefile | 2 +-\n drivers/net/ethernet/intel/ixgbevf/ixgbevf.h | 4 ++--\n .../net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 +-\n net/xfrm/Kconfig | 1 -\n 8 files changed, 30 insertions(+), 13 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/Kconfig b/drivers/net/ethernet/intel/Kconfig\nindex fd3373d82a9e..59e1bc0f609e 100644\n--- a/drivers/net/ethernet/intel/Kconfig\n+++ b/drivers/net/ethernet/intel/Kconfig\n@@ -200,6 +200,15 @@ config IXGBE_DCB\n \n \t If unsure, say N.\n \n+config IXGBE_IPSEC\n+\tbool \"IPSec XFRM cryptography-offload acceleration\"\n+\tdepends on IXGBE\n+\tdepends on XFRM_OFFLOAD\n+\tdefault y\n+\tselect XFRM_ALGO\n+\t---help---\n+\t Enable support for IPSec offload in ixgbe.ko\n+\n config IXGBEVF\n \ttristate \"Intel(R) 10GbE PCI Express Virtual Function Ethernet support\"\n \tdepends on PCI_MSI\n@@ -217,6 +226,15 @@ config IXGBEVF\n \t will be called ixgbevf. MSI-X interrupt support is required\n \t for this driver to work correctly.\n \n+config IXGBEVF_IPSEC\n+\tbool \"IPSec XFRM cryptography-offload acceleration\"\n+\tdepends on IXGBEVF\n+\tdepends on XFRM_OFFLOAD\n+\tdefault y\n+\tselect XFRM_ALGO\n+\t---help---\n+\t Enable support for IPSec offload in ixgbevf.ko\n+\n config I40E\n \ttristate \"Intel(R) Ethernet Controller XL710 Family support\"\n \timply PTP_1588_CLOCK\ndiff --git a/drivers/net/ethernet/intel/ixgbe/Makefile b/drivers/net/ethernet/intel/ixgbe/Makefile\nindex ca6b0c458e4a..4fb0d9e3f2da 100644\n--- a/drivers/net/ethernet/intel/ixgbe/Makefile\n+++ b/drivers/net/ethernet/intel/ixgbe/Makefile\n@@ -17,4 +17,4 @@ ixgbe-$(CONFIG_IXGBE_DCB) += ixgbe_dcb.o ixgbe_dcb_82598.o \\\n ixgbe-$(CONFIG_IXGBE_HWMON) += ixgbe_sysfs.o\n ixgbe-$(CONFIG_DEBUG_FS) += ixgbe_debugfs.o\n ixgbe-$(CONFIG_FCOE:m=y) += ixgbe_fcoe.o\n-ixgbe-$(CONFIG_XFRM_OFFLOAD) += ixgbe_ipsec.o\n+ixgbe-$(CONFIG_IXGBE_IPSEC) += ixgbe_ipsec.o\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 7a7679e7be84..1d5d66436eac 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -770,9 +770,9 @@ struct ixgbe_adapter {\n #define IXGBE_RSS_KEY_SIZE 40 /* size of RSS Hash Key in bytes */\n \tu32 *rss_key;\n \n-#ifdef CONFIG_XFRM_OFFLOAD\n+#ifdef CONFIG_IXGBE_IPSEC\n \tstruct ixgbe_ipsec *ipsec;\n-#endif /* CONFIG_XFRM_OFFLOAD */\n+#endif /* CONFIG_IXGBE_IPSEC */\n \n \t/* AF_XDP zero-copy */\n \tstruct xdp_umem **xsk_umems;\n@@ -1009,7 +1009,7 @@ void ixgbe_store_key(struct ixgbe_adapter *adapter);\n void ixgbe_store_reta(struct ixgbe_adapter *adapter);\n s32 ixgbe_negotiate_fc(struct ixgbe_hw *hw, u32 adv_reg, u32 lp_reg,\n \t\t u32 adv_sym, u32 adv_asm, u32 lp_sym, u32 lp_asm);\n-#ifdef CONFIG_XFRM_OFFLOAD\n+#ifdef CONFIG_IXGBE_IPSEC\n void ixgbe_init_ipsec_offload(struct ixgbe_adapter *adapter);\n void ixgbe_stop_ipsec_offload(struct ixgbe_adapter *adapter);\n void ixgbe_ipsec_restore(struct ixgbe_adapter *adapter);\n@@ -1037,5 +1037,5 @@ static inline int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter,\n \t\t\t\t\tu32 *mbuf, u32 vf) { return -EACCES; }\n static inline int ixgbe_ipsec_vf_del_sa(struct ixgbe_adapter *adapter,\n \t\t\t\t\tu32 *mbuf, u32 vf) { return -EACCES; }\n-#endif /* CONFIG_XFRM_OFFLOAD */\n+#endif /* CONFIG_IXGBE_IPSEC */\n #endif /* _IXGBE_H_ */\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex 70b95cbff39e..8a514f4c6658 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -8694,7 +8694,7 @@ netdev_tx_t ixgbe_xmit_frame_ring(struct sk_buff *skb,\n \n #endif /* IXGBE_FCOE */\n \n-#ifdef CONFIG_XFRM_OFFLOAD\n+#ifdef CONFIG_IXGBE_IPSEC\n \tif (skb->sp && !ixgbe_ipsec_tx(tx_ring, first, &ipsec_tx))\n \t\tgoto out_drop;\n #endif\n@@ -10190,7 +10190,7 @@ ixgbe_features_check(struct sk_buff *skb, struct net_device *dev,\n \t * the TSO, so it's the exception.\n \t */\n \tif (skb->encapsulation && !(features & NETIF_F_TSO_MANGLEID)) {\n-#ifdef CONFIG_XFRM_OFFLOAD\n+#ifdef CONFIG_IXGBE_IPSEC\n \t\tif (!skb->sp)\n #endif\n \t\t\tfeatures &= ~NETIF_F_TSO;\n@@ -10884,7 +10884,7 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)\n \tif (hw->mac.type >= ixgbe_mac_82599EB)\n \t\tnetdev->features |= NETIF_F_SCTP_CRC;\n \n-#ifdef CONFIG_XFRM_OFFLOAD\n+#ifdef CONFIG_IXGBE_IPSEC\n #define IXGBE_ESP_FEATURES\t(NETIF_F_HW_ESP | \\\n \t\t\t\t NETIF_F_HW_ESP_TX_CSUM | \\\n \t\t\t\t NETIF_F_GSO_ESP)\ndiff --git a/drivers/net/ethernet/intel/ixgbevf/Makefile b/drivers/net/ethernet/intel/ixgbevf/Makefile\nindex 297d0f0858b5..186a4bb24fde 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/Makefile\n+++ b/drivers/net/ethernet/intel/ixgbevf/Makefile\n@@ -10,5 +10,5 @@ ixgbevf-objs := vf.o \\\n mbx.o \\\n ethtool.o \\\n ixgbevf_main.o\n-ixgbevf-$(CONFIG_XFRM_OFFLOAD) += ipsec.o\n+ixgbevf-$(CONFIG_IXGBEVF_IPSEC) += ipsec.o\n \ndiff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\nindex e399e1c0c54a..ecab686574b6 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf.h\n@@ -459,7 +459,7 @@ int ethtool_ioctl(struct ifreq *ifr);\n \n extern void ixgbevf_write_eitr(struct ixgbevf_q_vector *q_vector);\n \n-#ifdef CONFIG_XFRM_OFFLOAD\n+#ifdef CONFIG_IXGBEVF_IPSEC\n void ixgbevf_init_ipsec_offload(struct ixgbevf_adapter *adapter);\n void ixgbevf_stop_ipsec_offload(struct ixgbevf_adapter *adapter);\n void ixgbevf_ipsec_restore(struct ixgbevf_adapter *adapter);\n@@ -482,7 +482,7 @@ static inline int ixgbevf_ipsec_tx(struct ixgbevf_ring *tx_ring,\n \t\t\t\t struct ixgbevf_tx_buffer *first,\n \t\t\t\t struct ixgbevf_ipsec_tx_data *itd)\n { return 0; }\n-#endif /* CONFIG_XFRM_OFFLOAD */\n+#endif /* CONFIG_IXGBEVF_IPSEC */\n \n void ixgbe_napi_add_all(struct ixgbevf_adapter *adapter);\n void ixgbe_napi_del_all(struct ixgbevf_adapter *adapter);\ndiff --git a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\nindex d8ebd75bf41e..196b890467b2 100644\n--- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n+++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c\n@@ -4152,7 +4152,7 @@ static int ixgbevf_xmit_frame_ring(struct sk_buff *skb,\n \tfirst->tx_flags = tx_flags;\n \tfirst->protocol = vlan_get_protocol(skb);\n \n-#ifdef CONFIG_XFRM_OFFLOAD\n+#ifdef CONFIG_IXGBEVF_IPSEC\n \tif (skb->sp && !ixgbevf_ipsec_tx(tx_ring, first, &ipsec_tx))\n \t\tgoto out_drop;\n #endif\ndiff --git a/net/xfrm/Kconfig b/net/xfrm/Kconfig\nindex 4a9ee2d83158..140270a13d54 100644\n--- a/net/xfrm/Kconfig\n+++ b/net/xfrm/Kconfig\n@@ -8,7 +8,6 @@ config XFRM\n \n config XFRM_OFFLOAD\n bool\n- depends on XFRM\n \n config XFRM_ALGO\n \ttristate\n", "prefixes": [ "v2" ] }