get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/928371/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 928371,
    "url": "http://patchwork.ozlabs.org/api/patches/928371/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180612151851.86792.50638.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": "<20180612151851.86792.50638.stgit@ahduyck-green-test.jf.intel.com>",
    "list_archive_url": null,
    "date": "2018-06-12T15:18:51",
    "name": "[jkirsher/next-queue,v2,5/7] net: Add generic ndo_select_queue functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "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/20180612151851.86792.50638.stgit@ahduyck-green-test.jf.intel.com/mbox/",
    "series": [
        {
            "id": 49759,
            "url": "http://patchwork.ozlabs.org/api/series/49759/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=49759",
            "date": "2018-06-12T15:18:25",
            "name": "Add support for L2 Fwd Offload w/o ndo_select_queue",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/49759/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/928371/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/928371/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<intel-wired-lan-bounces@osuosl.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "intel-wired-lan@osuosl.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "intel-wired-lan@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 414tzD3bHbz9s0w\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Jun 2018 01:27:04 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 4B9158A13F;\n\tTue, 12 Jun 2018 15:27:02 +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 KAFgzePrVAK6; Tue, 12 Jun 2018 15:27:00 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 70A4489EF4;\n\tTue, 12 Jun 2018 15:27:00 +0000 (UTC)",
            "from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 744151C0D68\n\tfor <intel-wired-lan@osuosl.org>;\n\tTue, 12 Jun 2018 15:26:59 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 7041889B78\n\tfor <intel-wired-lan@osuosl.org>;\n\tTue, 12 Jun 2018 15:26:59 +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 LLNfGfbXrgHL for <intel-wired-lan@osuosl.org>;\n\tTue, 12 Jun 2018 15:26:58 +0000 (UTC)",
            "from mga05.intel.com (mga05.intel.com [192.55.52.43])\n\tby whitealder.osuosl.org (Postfix) with ESMTPS id 6AAB189B7B\n\tfor <intel-wired-lan@osuosl.org>;\n\tTue, 12 Jun 2018 15:26:58 +0000 (UTC)",
            "from fmsmga005.fm.intel.com ([10.253.24.32])\n\tby fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t12 Jun 2018 08:26:58 -0700",
            "from ahduyck-green-test.jf.intel.com ([10.166.244.179])\n\tby fmsmga005.fm.intel.com with ESMTP; 12 Jun 2018 08:26:57 -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,215,1526367600\"; d=\"scan'208\";a=\"236521208\"",
        "From": "Alexander Duyck <alexander.h.duyck@intel.com>",
        "To": "intel-wired-lan@osuosl.org, jeffrey.t.kirsher@intel.com,\n\tnetdev@vger.kernel.org",
        "Date": "Tue, 12 Jun 2018 11:18:51 -0400",
        "Message-ID": "<20180612151851.86792.50638.stgit@ahduyck-green-test.jf.intel.com>",
        "In-Reply-To": "<20180612151322.86792.97587.stgit@ahduyck-green-test.jf.intel.com>",
        "References": "<20180612151322.86792.97587.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 e40aa3e..2c455bd 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 91b3ca9..70f7ee3 100644\n--- a/include/linux/netdevice.h\n+++ b/include/linux/netdevice.h\n@@ -2551,6 +2551,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 2249294..1a1cf2c 100644\n--- a/net/core/dev.c\n+++ b/net/core/dev.c\n@@ -3505,6 +3505,20 @@ static inline int get_xps_queue(struct net_device *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 ee01856..905f7cd 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"
    ]
}