Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/941430/?format=api
{ "id": 941430, "url": "http://patchwork.ozlabs.org/api/patches/941430/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180709161954.8383.69951.stgit@ahduyck-green-test.jf.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": "<20180709161954.8383.69951.stgit@ahduyck-green-test.jf.intel.com>", "list_archive_url": null, "date": "2018-07-09T16:19:54", "name": "[jkirsher/next-queue,v2,5/7] net: Add generic ndo_select_queue functions", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": false, "hash": "58c71848f4fa14d2eb1dd0c49b9eb7d25094f9fc", "submitter": { "id": 251, "url": "http://patchwork.ozlabs.org/api/people/251/?format=api", "name": "Duyck, Alexander H", "email": "alexander.h.duyck@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/20180709161954.8383.69951.stgit@ahduyck-green-test.jf.intel.com/mbox/", "series": [ { "id": 54497, "url": "http://patchwork.ozlabs.org/api/series/54497/?format=api", "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=54497", "date": "2018-07-09T16:19:32", "name": "Add support for L2 Fwd Offload w/o ndo_select_queue", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/54497/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/941430/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/941430/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=intel.com" ], "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 41PW4L2Mt3z9ryt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 10 Jul 2018 02:29:06 +1000 (AEST)", "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id AEBB9878E5;\n\tMon, 9 Jul 2018 16:29:04 +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 gQvtxghmY6Kh; Mon, 9 Jul 2018 16:29:04 +0000 (UTC)", "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id F165387456;\n\tMon, 9 Jul 2018 16:29:03 +0000 (UTC)", "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 8B5551CE44F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 9 Jul 2018 16:29:03 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 88DBA81DA5\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 9 Jul 2018 16:29:03 +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 a7ewpu-KPwjN for <intel-wired-lan@lists.osuosl.org>;\n\tMon, 9 Jul 2018 16:29:02 +0000 (UTC)", "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id BF2AD81B94\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon, 9 Jul 2018 16:29:02 +0000 (UTC)", "from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 Jul 2018 09:29:02 -0700", "from ahduyck-green-test.jf.intel.com ([10.166.244.179])\n\tby fmsmga004.fm.intel.com with ESMTP; 09 Jul 2018 09:28:27 -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.51,330,1526367600\"; d=\"scan'208\";a=\"69851235\"", "From": "Alexander Duyck <alexander.h.duyck@intel.com>", "To": "netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,\n\tjeffrey.t.kirsher@intel.com", "Date": "Mon, 09 Jul 2018 12:19:54 -0400", "Message-ID": "<20180709161954.8383.69951.stgit@ahduyck-green-test.jf.intel.com>", "In-Reply-To": "<20180709161743.8383.97754.stgit@ahduyck-green-test.jf.intel.com>", "References": "<20180709161743.8383.97754.stgit@ahduyck-green-test.jf.intel.com>", "User-Agent": "StGit/0.17.1-dirty", "MIME-Version": "1.0", "Subject": "[Intel-wired-lan] [jkirsher/next-queue PATCH v2 5/7] net: Add\n\tgeneric ndo_select_queue functions", "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>", "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": "This patch adds a generic version of the ndo_select_queue functions for\neither returning 0 or selecting a queue based on the processor ID. This is\ngenerally meant to just reduce the number of functions we have to change\nin the future when we have to deal with ndo_select_queue changes.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\n drivers/net/ethernet/lantiq_etop.c | 10 +---------\n drivers/net/ethernet/ti/netcp_core.c | 9 +--------\n drivers/staging/netlogic/xlr_net.c | 9 +--------\n include/linux/netdevice.h | 4 ++++\n net/core/dev.c | 14 ++++++++++++++\n net/packet/af_packet.c | 2 +-\n 6 files changed, 22 insertions(+), 26 deletions(-)", "diff": "diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c\nindex afc8100..7a637b5 100644\n--- a/drivers/net/ethernet/lantiq_etop.c\n+++ b/drivers/net/ethernet/lantiq_etop.c\n@@ -563,14 +563,6 @@ struct ltq_etop_priv {\n \tspin_unlock_irqrestore(&priv->lock, flags);\n }\n \n-static u16\n-ltq_etop_select_queue(struct net_device *dev, struct sk_buff *skb,\n-\t\t void *accel_priv, select_queue_fallback_t fallback)\n-{\n-\t/* we are currently only using the first queue */\n-\treturn 0;\n-}\n-\n static int\n ltq_etop_init(struct net_device *dev)\n {\n@@ -641,7 +633,7 @@ struct ltq_etop_priv {\n \t.ndo_set_mac_address = ltq_etop_set_mac_address,\n \t.ndo_validate_addr = eth_validate_addr,\n \t.ndo_set_rx_mode = ltq_etop_set_multicast_list,\n-\t.ndo_select_queue = ltq_etop_select_queue,\n+\t.ndo_select_queue = dev_pick_tx_zero,\n \t.ndo_init = ltq_etop_init,\n \t.ndo_tx_timeout = ltq_etop_tx_timeout,\n };\ndiff --git a/drivers/net/ethernet/ti/netcp_core.c b/drivers/net/ethernet/ti/netcp_core.c\nindex 6ebf110..a1d335a 100644\n--- a/drivers/net/ethernet/ti/netcp_core.c\n+++ b/drivers/net/ethernet/ti/netcp_core.c\n@@ -1889,13 +1889,6 @@ static int netcp_rx_kill_vid(struct net_device *ndev, __be16 proto, u16 vid)\n \treturn err;\n }\n \n-static u16 netcp_select_queue(struct net_device *dev, struct sk_buff *skb,\n-\t\t\t void *accel_priv,\n-\t\t\t select_queue_fallback_t fallback)\n-{\n-\treturn 0;\n-}\n-\n static int netcp_setup_tc(struct net_device *dev, enum tc_setup_type type,\n \t\t\t void *type_data)\n {\n@@ -1972,7 +1965,7 @@ static int netcp_setup_tc(struct net_device *dev, enum tc_setup_type type,\n \t.ndo_vlan_rx_add_vid\t= netcp_rx_add_vid,\n \t.ndo_vlan_rx_kill_vid\t= netcp_rx_kill_vid,\n \t.ndo_tx_timeout\t\t= netcp_ndo_tx_timeout,\n-\t.ndo_select_queue\t= netcp_select_queue,\n+\t.ndo_select_queue\t= dev_pick_tx_zero,\n \t.ndo_setup_tc\t\t= netcp_setup_tc,\n };\n \ndiff --git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c\nindex e461168..4e6611e 100644\n--- a/drivers/staging/netlogic/xlr_net.c\n+++ b/drivers/staging/netlogic/xlr_net.c\n@@ -290,13 +290,6 @@ static netdev_tx_t xlr_net_start_xmit(struct sk_buff *skb,\n \treturn NETDEV_TX_OK;\n }\n \n-static u16 xlr_net_select_queue(struct net_device *ndev, struct sk_buff *skb,\n-\t\t\t\tvoid *accel_priv,\n-\t\t\t\tselect_queue_fallback_t fallback)\n-{\n-\treturn (u16)smp_processor_id();\n-}\n-\n static void xlr_hw_set_mac_addr(struct net_device *ndev)\n {\n \tstruct xlr_net_priv *priv = netdev_priv(ndev);\n@@ -403,7 +396,7 @@ static void xlr_stats(struct net_device *ndev, struct rtnl_link_stats64 *stats)\n \t.ndo_open = xlr_net_open,\n \t.ndo_stop = xlr_net_stop,\n \t.ndo_start_xmit = xlr_net_start_xmit,\n-\t.ndo_select_queue = xlr_net_select_queue,\n+\t.ndo_select_queue = dev_pick_tx_cpu_id,\n \t.ndo_set_mac_address = xlr_net_set_mac_addr,\n \t.ndo_set_rx_mode = xlr_set_rx_mode,\n \t.ndo_get_stats64 = xlr_stats,\ndiff --git a/include/linux/netdevice.h b/include/linux/netdevice.h\nindex 5729bc80..2e056bc 100644\n--- a/include/linux/netdevice.h\n+++ b/include/linux/netdevice.h\n@@ -2567,6 +2567,10 @@ struct net_device *__dev_get_by_flags(struct net *net, unsigned short flags,\n void dev_close_many(struct list_head *head, bool unlink);\n void dev_disable_lro(struct net_device *dev);\n int dev_loopback_xmit(struct net *net, struct sock *sk, struct sk_buff *newskb);\n+u16 dev_pick_tx_zero(struct net_device *dev, struct sk_buff *skb,\n+\t\t void *accel_priv, select_queue_fallback_t fallback);\n+u16 dev_pick_tx_cpu_id(struct net_device *dev, struct sk_buff *skb,\n+\t\t void *accel_priv, select_queue_fallback_t fallback);\n int dev_queue_xmit(struct sk_buff *skb);\n int dev_queue_xmit_accel(struct sk_buff *skb, struct net_device *sb_dev);\n int dev_direct_xmit(struct sk_buff *skb, u16 queue_id);\ndiff --git a/net/core/dev.c b/net/core/dev.c\nindex 09a7cc2..b5e5380 100644\n--- a/net/core/dev.c\n+++ b/net/core/dev.c\n@@ -3617,6 +3617,20 @@ static int get_xps_queue(struct net_device *dev, struct net_device *sb_dev,\n #endif\n }\n \n+u16 dev_pick_tx_zero(struct net_device *dev, struct sk_buff *skb,\n+\t\t void *accel_priv, select_queue_fallback_t fallback)\n+{\n+\treturn 0;\n+}\n+EXPORT_SYMBOL(dev_pick_tx_zero);\n+\n+u16 dev_pick_tx_cpu_id(struct net_device *dev, struct sk_buff *skb,\n+\t\t void *accel_priv, select_queue_fallback_t fallback)\n+{\n+\treturn (u16)raw_smp_processor_id() % dev->real_num_tx_queues;\n+}\n+EXPORT_SYMBOL(dev_pick_tx_cpu_id);\n+\n static u16 ___netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,\n \t\t\t struct net_device *sb_dev)\n {\ndiff --git a/net/packet/af_packet.c b/net/packet/af_packet.c\nindex 47931eb..f37d087 100644\n--- a/net/packet/af_packet.c\n+++ b/net/packet/af_packet.c\n@@ -277,7 +277,7 @@ static bool packet_use_direct_xmit(const struct packet_sock *po)\n \n static u16 __packet_pick_tx_queue(struct net_device *dev, struct sk_buff *skb)\n {\n-\treturn (u16) raw_smp_processor_id() % dev->real_num_tx_queues;\n+\treturn dev_pick_tx_cpu_id(dev, skb, NULL, NULL);\n }\n \n static u16 packet_pick_tx_queue(struct sk_buff *skb)\n", "prefixes": [ "jkirsher/next-queue", "v2", "5/7" ] }