Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/957181/?format=api
{ "id": 957181, "url": "http://patchwork.ozlabs.org/api/patches/957181/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/1534185825-12451-6-git-send-email-shannon.nelson@oracle.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": "<1534185825-12451-6-git-send-email-shannon.nelson@oracle.com>", "list_archive_url": null, "date": "2018-08-13T18:43:42", "name": "[next-queue,5/8] ixgbe: add VF IPsec offload request message handling", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "7ff459ea4e6bd248ac715d76a46ba7706a1512a4", "submitter": { "id": 70766, "url": "http://patchwork.ozlabs.org/api/people/70766/?format=api", "name": "Shannon Nelson", "email": "shannon.nelson@oracle.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/1534185825-12451-6-git-send-email-shannon.nelson@oracle.com/mbox/", "series": [ { "id": 60595, "url": "http://patchwork.ozlabs.org/api/series/60595/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=60595", "date": "2018-08-13T18:43:38", "name": "ixgbe/ixgbevf: IPsec offload support for VFs", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/60595/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/957181/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/957181/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.133; helo=hemlock.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=oracle.com", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=oracle.com header.i=@oracle.com\n\theader.b=\"UuRcKJXS\"; dkim-atps=neutral" ], "Received": [ "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41q4Pv1r22z9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 14 Aug 2018 04:44:03 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 8F209867A8;\n\tMon, 13 Aug 2018 18:44:01 +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 aYcOpppYw3pv; Mon, 13 Aug 2018 18:44:00 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id C0B1285F23;\n\tMon, 13 Aug 2018 18:44:00 +0000 (UTC)", "from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id B6E521C0574\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 13 Aug 2018 18:43:57 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id B4D2F859F1\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 13 Aug 2018 18:43:57 +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 6+--labwDdBk for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 13 Aug 2018 18:43:57 +0000 (UTC)", "from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 18AE78583A\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 13 Aug 2018 18:43:57 +0000 (UTC)", "from pps.filterd (aserp2130.oracle.com [127.0.0.1])\n\tby aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id\n\tw7DIdJ0o019898; Mon, 13 Aug 2018 18:43:55 GMT", "from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71])\n\tby aserp2130.oracle.com with ESMTP id 2ksnacwpne-1\n\t(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Mon, 13 Aug 2018 18:43:55 +0000", "from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75])\n\tby userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w7DIhsNn028037\n\t(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256\n\tverify=OK); Mon, 13 Aug 2018 18:43:54 GMT", "from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14])\n\tby userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id\n\tw7DIhswX008057; Mon, 13 Aug 2018 18:43:54 GMT", "from slnelson-mint18.us.oracle.com (/10.159.144.11)\n\tby default (Oracle Beehive Gateway v4.0)\n\twith ESMTP ; Mon, 13 Aug 2018 11:43:54 -0700" ], "X-Virus-Scanned": [ "amavisd-new at osuosl.org", "amavisd-new at osuosl.org" ], "X-Greylist": "domain auto-whitelisted by SQLgrey-1.7.6", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;\n\th=from : to : cc :\n\tsubject : date : message-id : in-reply-to : references;\n\ts=corp-2018-07-02; \n\tbh=MPP22FoO6zH8kx0v5xTwgcbDMv4wsRMRfWd3xCTZpmY=;\n\tb=UuRcKJXS3OTLu8tV3Qhc8ECG6NV7yfBvebtDHwTu1GGZigvO5nsbCuMF6IBnAt6oyuC6\n\thpESNlHRGX/lvQyUe8t/PbxgE9EJtLWvpgRAQ11GlBc6RHSX5R/TRqbWH7UqP2jT4C9x\n\tSDCjSTlJzJtIDdJEaJQEqFlmcXl5vDJtoMS2+HUNNAmR2VRkPzvHQ9WkDFlf7i1RQHEc\n\tXGES9pB/UqzfpGT5Wp7ty3+SCP9girPjtl7B0jU9DeQrBqxwqqAbUFuDODJ9Zx1t5dMA\n\tvADbfWcp8+Fg+bf31x57Jv9dvqYjcWSk/5BKkJApqpd0fwUHuLFgcsyd/3XOx3AzjDvc\n\tWQ== ", "From": "Shannon Nelson <shannon.nelson@oracle.com>", "To": "intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com", "Date": "Mon, 13 Aug 2018 11:43:42 -0700", "Message-Id": "<1534185825-12451-6-git-send-email-shannon.nelson@oracle.com>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1534185825-12451-1-git-send-email-shannon.nelson@oracle.com>", "References": "<1534185825-12451-1-git-send-email-shannon.nelson@oracle.com>", "X-Proofpoint-Virus-Version": "vendor=nai engine=5900 definitions=8984\n\tsignatures=668707", "X-Proofpoint-Spam-Details": "rule=notspam policy=default score=0 suspectscore=0\n\tmalwarescore=0\n\tphishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999\n\tadultscore=0 classifier=spam adjust=0 reason=mlx scancount=1\n\tengine=8.0.1-1807170000 definitions=main-1808130188", "Subject": "[Intel-wired-lan] [PATCH next-queue 5/8] ixgbe: add VF IPsec\n\toffload request message handling", "X-BeenThere": "intel-wired-lan@osuosl.org", "X-Mailman-Version": "2.1.24", "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": "steffen.klassert@secunet.com, netdev@vger.kernel.org", "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": "Add an add and a delete message for IPsec offload requests from\nthe VF. These call into the ipsec functions that can translate\nthe message buffer into a useful IPsec offload.\n\nThese new messages bump the mbox API version to 1.4.\n\nSigned-off-by: Shannon Nelson <shannon.nelson@oracle.com>\n---\n drivers/net/ethernet/intel/ixgbe/ixgbe.h | 19 ++++++++++++++-----\n drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h | 5 +++++\n drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 17 ++++++++++++++++-\n 3 files changed, 35 insertions(+), 6 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe.h b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\nindex 89e709c..5c6fd42 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe.h\n@@ -1004,15 +1004,24 @@ void ixgbe_ipsec_rx(struct ixgbe_ring *rx_ring,\n \t\t struct sk_buff *skb);\n int ixgbe_ipsec_tx(struct ixgbe_ring *tx_ring, struct ixgbe_tx_buffer *first,\n \t\t struct ixgbe_ipsec_tx_data *itd);\n+void ixgbe_ipsec_vf_clear(struct ixgbe_adapter *adapter, u32 vf);\n+int ixgbe_ipsec_vf_add_sa(struct ixgbe_adapter *adapter, u32 *mbuf, u32 vf);\n+int ixgbe_ipsec_vf_del_sa(struct ixgbe_adapter *adapter, u32 *mbuf, u32 vf);\n #else\n-static inline void ixgbe_init_ipsec_offload(struct ixgbe_adapter *adapter) { };\n-static inline void ixgbe_stop_ipsec_offload(struct ixgbe_adapter *adapter) { };\n-static inline void ixgbe_ipsec_restore(struct ixgbe_adapter *adapter) { };\n+static inline void ixgbe_init_ipsec_offload(struct ixgbe_adapter *adapter) { }\n+static inline void ixgbe_stop_ipsec_offload(struct ixgbe_adapter *adapter) { }\n+static inline void ixgbe_ipsec_restore(struct ixgbe_adapter *adapter) { }\n static inline void ixgbe_ipsec_rx(struct ixgbe_ring *rx_ring,\n \t\t\t\t union ixgbe_adv_rx_desc *rx_desc,\n-\t\t\t\t struct sk_buff *skb) { };\n+\t\t\t\t struct sk_buff *skb) { }\n static inline int ixgbe_ipsec_tx(struct ixgbe_ring *tx_ring,\n \t\t\t\t struct ixgbe_tx_buffer *first,\n-\t\t\t\t struct ixgbe_ipsec_tx_data *itd) { return 0; };\n+\t\t\t\t struct ixgbe_ipsec_tx_data *itd) { return 0; }\n+static inline void ixgbe_ipsec_vf_clear(struct ixgbe_adapter *adapter,\n+\t\t\t\t\tu32 vf) { }\n+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 /* _IXGBE_H_ */\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h\nindex e085b65..a148534 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_mbx.h\n@@ -50,6 +50,7 @@ enum ixgbe_pfvf_api_rev {\n \tixgbe_mbox_api_11,\t/* API version 1.1, linux/freebsd VF driver */\n \tixgbe_mbox_api_12,\t/* API version 1.2, linux/freebsd VF driver */\n \tixgbe_mbox_api_13,\t/* API version 1.3, linux/freebsd VF driver */\n+\tixgbe_mbox_api_14,\t/* API version 1.4, linux/freebsd VF driver */\n \t/* This value should always be last */\n \tixgbe_mbox_api_unknown,\t/* indicates that API version is not known */\n };\n@@ -80,6 +81,10 @@ enum ixgbe_pfvf_api_rev {\n \n #define IXGBE_VF_UPDATE_XCAST_MODE\t0x0c\n \n+/* mailbox API, version 1.4 VF requests */\n+#define IXGBE_VF_IPSEC_ADD\t0x0d\n+#define IXGBE_VF_IPSEC_DEL\t0x0e\n+\n /* length of permanent address message returned from PF */\n #define IXGBE_VF_PERMADDR_MSG_LEN 4\n /* word in permanent address message with the current multicast type */\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\nindex 6f59933..e86a4d5 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c\n@@ -491,6 +491,7 @@ static s32 ixgbe_set_vf_lpe(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)\n \t\tcase ixgbe_mbox_api_11:\n \t\tcase ixgbe_mbox_api_12:\n \t\tcase ixgbe_mbox_api_13:\n+\t\tcase ixgbe_mbox_api_14:\n \t\t\t/* Version 1.1 supports jumbo frames on VFs if PF has\n \t\t\t * jumbo frames enabled which means legacy VFs are\n \t\t\t * disabled\n@@ -718,6 +719,9 @@ static inline void ixgbe_vf_reset_event(struct ixgbe_adapter *adapter, u32 vf)\n \t/* reset multicast table array for vf */\n \tadapter->vfinfo[vf].num_vf_mc_hashes = 0;\n \n+\t/* clear any ipsec table info */\n+\tixgbe_ipsec_vf_clear(adapter, vf);\n+\n \t/* Flush and reset the mta with the new values */\n \tixgbe_set_rx_mode(adapter->netdev);\n \n@@ -969,6 +973,7 @@ static int ixgbe_negotiate_vf_api(struct ixgbe_adapter *adapter,\n \tcase ixgbe_mbox_api_11:\n \tcase ixgbe_mbox_api_12:\n \tcase ixgbe_mbox_api_13:\n+\tcase ixgbe_mbox_api_14:\n \t\tadapter->vfinfo[vf].vf_api = api;\n \t\treturn 0;\n \tdefault:\n@@ -994,6 +999,7 @@ static int ixgbe_get_vf_queues(struct ixgbe_adapter *adapter,\n \tcase ixgbe_mbox_api_11:\n \tcase ixgbe_mbox_api_12:\n \tcase ixgbe_mbox_api_13:\n+\tcase ixgbe_mbox_api_14:\n \t\tbreak;\n \tdefault:\n \t\treturn -1;\n@@ -1034,6 +1040,7 @@ static int ixgbe_get_vf_reta(struct ixgbe_adapter *adapter, u32 *msgbuf, u32 vf)\n \n \t/* verify the PF is supporting the correct API */\n \tswitch (adapter->vfinfo[vf].vf_api) {\n+\tcase ixgbe_mbox_api_14:\n \tcase ixgbe_mbox_api_13:\n \tcase ixgbe_mbox_api_12:\n \t\tbreak;\n@@ -1066,6 +1073,7 @@ static int ixgbe_get_vf_rss_key(struct ixgbe_adapter *adapter,\n \n \t/* verify the PF is supporting the correct API */\n \tswitch (adapter->vfinfo[vf].vf_api) {\n+\tcase ixgbe_mbox_api_14:\n \tcase ixgbe_mbox_api_13:\n \tcase ixgbe_mbox_api_12:\n \t\tbreak;\n@@ -1091,8 +1099,9 @@ static int ixgbe_update_vf_xcast_mode(struct ixgbe_adapter *adapter,\n \t\t/* promisc introduced in 1.3 version */\n \t\tif (xcast_mode == IXGBEVF_XCAST_MODE_PROMISC)\n \t\t\treturn -EOPNOTSUPP;\n-\t\t/* Fall threw */\n+\t\t/* Fall through */\n \tcase ixgbe_mbox_api_13:\n+\tcase ixgbe_mbox_api_14:\n \t\tbreak;\n \tdefault:\n \t\treturn -EOPNOTSUPP;\n@@ -1218,6 +1227,12 @@ static int ixgbe_rcv_msg_from_vf(struct ixgbe_adapter *adapter, u32 vf)\n \tcase IXGBE_VF_UPDATE_XCAST_MODE:\n \t\tretval = ixgbe_update_vf_xcast_mode(adapter, msgbuf, vf);\n \t\tbreak;\n+\tcase IXGBE_VF_IPSEC_ADD:\n+\t\tretval = ixgbe_ipsec_vf_add_sa(adapter, msgbuf, vf);\n+\t\tbreak;\n+\tcase IXGBE_VF_IPSEC_DEL:\n+\t\tretval = ixgbe_ipsec_vf_del_sa(adapter, msgbuf, vf);\n+\t\tbreak;\n \tdefault:\n \t\te_err(drv, \"Unhandled Msg %8.8x\\n\", msgbuf[0]);\n \t\tretval = IXGBE_ERR_MBX;\n", "prefixes": [ "next-queue", "5/8" ] }