get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 941427,
    "url": "http://patchwork.ozlabs.org/api/patches/941427/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20180709162004.8383.91041.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": "<20180709162004.8383.91041.stgit@ahduyck-green-test.jf.intel.com>",
    "list_archive_url": null,
    "date": "2018-07-09T16:20:04",
    "name": "[jkirsher/next-queue,v2,7/7] net: allow fallback function to pass netdev",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "ac082e9e6734c16e55f432e411747531204334ce",
    "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/20180709162004.8383.91041.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/941427/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/941427/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 AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 41PW4442hZz9ryt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 10 Jul 2018 02:28:52 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 1CA6881B94;\n\tMon,  9 Jul 2018 16:28:51 +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 XyWI1ZQ4Oig2; Mon,  9 Jul 2018 16:28:49 +0000 (UTC)",
            "from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id AC77A82C54;\n\tMon,  9 Jul 2018 16:28:49 +0000 (UTC)",
            "from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\tby ash.osuosl.org (Postfix) with ESMTP id 83E0D1CE44F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  9 Jul 2018 16:28:48 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 8069785E41\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  9 Jul 2018 16:28:48 +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 2NMKdq17inPm for <intel-wired-lan@lists.osuosl.org>;\n\tMon,  9 Jul 2018 16:28:47 +0000 (UTC)",
            "from mga11.intel.com (mga11.intel.com [192.55.52.93])\n\tby fraxinus.osuosl.org (Postfix) with ESMTPS id A349085E3F\n\tfor <intel-wired-lan@lists.osuosl.org>;\n\tMon,  9 Jul 2018 16:28:47 +0000 (UTC)",
            "from orsmga006.jf.intel.com ([10.7.209.51])\n\tby fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t09 Jul 2018 09:28:47 -0700",
            "from ahduyck-green-test.jf.intel.com ([10.166.244.179])\n\tby orsmga006.jf.intel.com with ESMTP; 09 Jul 2018 09:28:37 -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=\"56242388\"",
        "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:20:04 -0400",
        "Message-ID": "<20180709162004.8383.91041.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 7/7] net: allow\n\tfallback function to pass netdev",
        "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": "For most of these calls we can just pass NULL through to the fallback\nfunction as the sb_dev. The only cases where we cannot are the cases where\nwe might be dealing with either an upper device or a driver that would\nhave configured things to support an sb_dev itself.\n\nThe only driver that has any signficant change in this patchset should be\nixgbe as we can drop the redundant functionality that existed in both the\nndo_select_queue function and the fallback function that was passed through\nto us.\n\nSigned-off-by: Alexander Duyck <alexander.h.duyck@intel.com>\n---\n drivers/net/ethernet/amazon/ena/ena_netdev.c    |    2 +-\n drivers/net/ethernet/broadcom/bcmsysport.c      |    4 ++--\n drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c |    3 ++-\n drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c |    2 +-\n drivers/net/ethernet/hisilicon/hns/hns_enet.c   |    2 +-\n drivers/net/ethernet/intel/ixgbe/ixgbe_main.c   |    4 ++--\n drivers/net/ethernet/mellanox/mlx4/en_tx.c      |    4 ++--\n drivers/net/ethernet/mellanox/mlx5/core/en_tx.c |    2 +-\n drivers/net/hyperv/netvsc_drv.c                 |    2 +-\n drivers/net/net_failover.c                      |    2 +-\n drivers/net/xen-netback/interface.c             |    2 +-\n include/linux/netdevice.h                       |    3 ++-\n net/core/dev.c                                  |   12 +++---------\n net/packet/af_packet.c                          |    7 ++++---\n 14 files changed, 24 insertions(+), 27 deletions(-)",
    "diff": "diff --git a/drivers/net/ethernet/amazon/ena/ena_netdev.c b/drivers/net/ethernet/amazon/ena/ena_netdev.c\nindex e3befb1..c673ac2 100644\n--- a/drivers/net/ethernet/amazon/ena/ena_netdev.c\n+++ b/drivers/net/ethernet/amazon/ena/ena_netdev.c\n@@ -2224,7 +2224,7 @@ static u16 ena_select_queue(struct net_device *dev, struct sk_buff *skb,\n \tif (skb_rx_queue_recorded(skb))\n \t\tqid = skb_get_rx_queue(skb);\n \telse\n-\t\tqid = fallback(dev, skb);\n+\t\tqid = fallback(dev, skb, NULL);\n \n \treturn qid;\n }\ndiff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c\nindex 32f548e..eb890c4 100644\n--- a/drivers/net/ethernet/broadcom/bcmsysport.c\n+++ b/drivers/net/ethernet/broadcom/bcmsysport.c\n@@ -2116,7 +2116,7 @@ static u16 bcm_sysport_select_queue(struct net_device *dev, struct sk_buff *skb,\n \tunsigned int q, port;\n \n \tif (!netdev_uses_dsa(dev))\n-\t\treturn fallback(dev, skb);\n+\t\treturn fallback(dev, skb, NULL);\n \n \t/* DSA tagging layer will have configured the correct queue */\n \tq = BRCM_TAG_GET_QUEUE(queue);\n@@ -2124,7 +2124,7 @@ static u16 bcm_sysport_select_queue(struct net_device *dev, struct sk_buff *skb,\n \ttx_ring = priv->ring_map[q + port * priv->per_port_num_tx_queues];\n \n \tif (unlikely(!tx_ring))\n-\t\treturn fallback(dev, skb);\n+\t\treturn fallback(dev, skb, NULL);\n \n \treturn tx_ring->index;\n }\ndiff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c\nindex e4e1cf9..5a727d4 100644\n--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c\n+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c\n@@ -1933,7 +1933,8 @@ u16 bnx2x_select_queue(struct net_device *dev, struct sk_buff *skb,\n \t}\n \n \t/* select a non-FCoE queue */\n-\treturn fallback(dev, skb) % (BNX2X_NUM_ETH_QUEUES(bp) * bp->max_cos);\n+\treturn fallback(dev, skb, NULL) %\n+\t       (BNX2X_NUM_ETH_QUEUES(bp) * bp->max_cos);\n }\n \n void bnx2x_set_num_queues(struct bnx2x *bp)\ndiff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c\nindex 5dc5e56..40cf8dc 100644\n--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c\n+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c\n@@ -973,7 +973,7 @@ static u16 cxgb_select_queue(struct net_device *dev, struct sk_buff *skb,\n \t\treturn txq;\n \t}\n \n-\treturn fallback(dev, skb) % dev->real_num_tx_queues;\n+\treturn fallback(dev, skb, NULL) % dev->real_num_tx_queues;\n }\n \n static int closest_timer(const struct sge *s, int time)\ndiff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c\nindex ff7a74e..948b3e0 100644\n--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c\n+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c\n@@ -2033,7 +2033,7 @@ static void hns_nic_get_stats64(struct net_device *ndev,\n \t    is_multicast_ether_addr(eth_hdr->h_dest))\n \t\treturn 0;\n \telse\n-\t\treturn fallback(ndev, skb);\n+\t\treturn fallback(ndev, skb, NULL);\n }\n \n static const struct net_device_ops hns_nic_netdev_ops = {\ndiff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\nindex a0cf33d..bdaecae 100644\n--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c\n@@ -8242,11 +8242,11 @@ static u16 ixgbe_select_queue(struct net_device *dev, struct sk_buff *skb,\n \tcase htons(ETH_P_FIP):\n \t\tadapter = netdev_priv(dev);\n \n-\t\tif (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)\n+\t\tif (!sb_dev && (adapter->flags & IXGBE_FLAG_FCOE_ENABLED))\n \t\t\tbreak;\n \t\t/* fall through */\n \tdefault:\n-\t\treturn fallback(dev, skb);\n+\t\treturn fallback(dev, skb, sb_dev);\n \t}\n \n \tf = &adapter->ring_feature[RING_F_FCOE];\ndiff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c\nindex df29966..1857ee0 100644\n--- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c\n+++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c\n@@ -695,9 +695,9 @@ u16 mlx4_en_select_queue(struct net_device *dev, struct sk_buff *skb,\n \tu16 rings_p_up = priv->num_tx_rings_p_up;\n \n \tif (netdev_get_num_tc(dev))\n-\t\treturn fallback(dev, skb);\n+\t\treturn fallback(dev, skb, NULL);\n \n-\treturn fallback(dev, skb) % rings_p_up;\n+\treturn fallback(dev, skb, NULL) % rings_p_up;\n }\n \n static void mlx4_bf_copy(void __iomem *dst, const void *src,\ndiff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c\nindex dfcc371..9106ea4 100644\n--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c\n+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c\n@@ -115,7 +115,7 @@ u16 mlx5e_select_queue(struct net_device *dev, struct sk_buff *skb,\n \t\t       select_queue_fallback_t fallback)\n {\n \tstruct mlx5e_priv *priv = netdev_priv(dev);\n-\tint channel_ix = fallback(dev, skb);\n+\tint channel_ix = fallback(dev, skb, NULL);\n \tu16 num_channels;\n \tint up = 0;\n \ndiff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c\nindex 98c0107..cf4f40a 100644\n--- a/drivers/net/hyperv/netvsc_drv.c\n+++ b/drivers/net/hyperv/netvsc_drv.c\n@@ -345,7 +345,7 @@ static u16 netvsc_select_queue(struct net_device *ndev, struct sk_buff *skb,\n \t\t\ttxq = vf_ops->ndo_select_queue(vf_netdev, skb,\n \t\t\t\t\t\t       sb_dev, fallback);\n \t\telse\n-\t\t\ttxq = fallback(vf_netdev, skb);\n+\t\t\ttxq = fallback(vf_netdev, skb, NULL);\n \n \t\t/* Record the queue selected by VF so that it can be\n \t\t * used for common case where VF has more queues than\ndiff --git a/drivers/net/net_failover.c b/drivers/net/net_failover.c\nindex 78b5496..d00d42c 100644\n--- a/drivers/net/net_failover.c\n+++ b/drivers/net/net_failover.c\n@@ -131,7 +131,7 @@ static u16 net_failover_select_queue(struct net_device *dev,\n \t\t\ttxq = ops->ndo_select_queue(primary_dev, skb,\n \t\t\t\t\t\t    sb_dev, fallback);\n \t\telse\n-\t\t\ttxq = fallback(primary_dev, skb);\n+\t\t\ttxq = fallback(primary_dev, skb, NULL);\n \n \t\tqdisc_skb_cb(skb)->slave_dev_queue_mapping = skb->queue_mapping;\n \ndiff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c\nindex 19c4c58..92274c2 100644\n--- a/drivers/net/xen-netback/interface.c\n+++ b/drivers/net/xen-netback/interface.c\n@@ -155,7 +155,7 @@ static u16 xenvif_select_queue(struct net_device *dev, struct sk_buff *skb,\n \tunsigned int size = vif->hash.size;\n \n \tif (vif->hash.alg == XEN_NETIF_CTRL_HASH_ALGORITHM_NONE)\n-\t\treturn fallback(dev, skb) % dev->real_num_tx_queues;\n+\t\treturn fallback(dev, skb, NULL) % dev->real_num_tx_queues;\n \n \txenvif_set_skb_hash(vif, skb);\n \ndiff --git a/include/linux/netdevice.h b/include/linux/netdevice.h\nindex 0d3df30..6bb01c7 100644\n--- a/include/linux/netdevice.h\n+++ b/include/linux/netdevice.h\n@@ -793,7 +793,8 @@ static inline bool netdev_phys_item_id_same(struct netdev_phys_item_id *a,\n }\n \n typedef u16 (*select_queue_fallback_t)(struct net_device *dev,\n-\t\t\t\t       struct sk_buff *skb);\n+\t\t\t\t       struct sk_buff *skb,\n+\t\t\t\t       struct net_device *sb_dev);\n \n enum tc_setup_type {\n \tTC_SETUP_QDISC_MQPRIO,\ndiff --git a/net/core/dev.c b/net/core/dev.c\nindex a051ce2..e18d818 100644\n--- a/net/core/dev.c\n+++ b/net/core/dev.c\n@@ -3633,8 +3633,8 @@ u16 dev_pick_tx_cpu_id(struct net_device *dev, struct sk_buff *skb,\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+static u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,\n+\t\t\t    struct net_device *sb_dev)\n {\n \tstruct sock *sk = skb->sk;\n \tint queue_index = sk_tx_queue_get(sk);\n@@ -3659,12 +3659,6 @@ static u16 ___netdev_pick_tx(struct net_device *dev, struct sk_buff *skb,\n \treturn queue_index;\n }\n \n-static u16 __netdev_pick_tx(struct net_device *dev,\n-\t\t\t    struct sk_buff *skb)\n-{\n-\treturn ___netdev_pick_tx(dev, skb, NULL);\n-}\n-\n struct netdev_queue *netdev_pick_tx(struct net_device *dev,\n \t\t\t\t    struct sk_buff *skb,\n \t\t\t\t    struct net_device *sb_dev)\n@@ -3685,7 +3679,7 @@ struct netdev_queue *netdev_pick_tx(struct net_device *dev,\n \t\t\tqueue_index = ops->ndo_select_queue(dev, skb, sb_dev,\n \t\t\t\t\t\t\t    __netdev_pick_tx);\n \t\telse\n-\t\t\tqueue_index = ___netdev_pick_tx(dev, skb, sb_dev);\n+\t\t\tqueue_index = __netdev_pick_tx(dev, skb, sb_dev);\n \n \t\tqueue_index = netdev_cap_txqueue(dev, queue_index);\n \t}\ndiff --git a/net/packet/af_packet.c b/net/packet/af_packet.c\nindex f37d087..00189a3 100644\n--- a/net/packet/af_packet.c\n+++ b/net/packet/af_packet.c\n@@ -275,9 +275,10 @@ static bool packet_use_direct_xmit(const struct packet_sock *po)\n \treturn po->xmit == packet_direct_xmit;\n }\n \n-static u16 __packet_pick_tx_queue(struct net_device *dev, struct sk_buff *skb)\n+static u16 __packet_pick_tx_queue(struct net_device *dev, struct sk_buff *skb,\n+\t\t\t\t  struct net_device *sb_dev)\n {\n-\treturn dev_pick_tx_cpu_id(dev, skb, NULL, NULL);\n+\treturn dev_pick_tx_cpu_id(dev, skb, sb_dev, NULL);\n }\n \n static u16 packet_pick_tx_queue(struct sk_buff *skb)\n@@ -291,7 +292,7 @@ static u16 packet_pick_tx_queue(struct sk_buff *skb)\n \t\t\t\t\t\t    __packet_pick_tx_queue);\n \t\tqueue_index = netdev_cap_txqueue(dev, queue_index);\n \t} else {\n-\t\tqueue_index = __packet_pick_tx_queue(dev, skb);\n+\t\tqueue_index = __packet_pick_tx_queue(dev, skb, NULL);\n \t}\n \n \treturn queue_index;\n",
    "prefixes": [
        "jkirsher/next-queue",
        "v2",
        "7/7"
    ]
}