1. 09 10月, 2014 8 次提交
  2. 08 10月, 2014 5 次提交
    • E
      net: better IFF_XMIT_DST_RELEASE support · 02875878
      Eric Dumazet 提交于
      Testing xmit_more support with netperf and connected UDP sockets,
      I found strange dst refcount false sharing.
      
      Current handling of IFF_XMIT_DST_RELEASE is not optimal.
      
      Dropping dst in validate_xmit_skb() is certainly too late in case
      packet was queued by cpu X but dequeued by cpu Y
      
      The logical point to take care of drop/force is in __dev_queue_xmit()
      before even taking qdisc lock.
      
      As Julian Anastasov pointed out, need for skb_dst() might come from some
      packet schedulers or classifiers.
      
      This patch adds new helper to cleanly express needs of various drivers
      or qdiscs/classifiers.
      
      Drivers that need skb_dst() in their ndo_start_xmit() should call
      following helper in their setup instead of the prior :
      
      	dev->priv_flags &= ~IFF_XMIT_DST_RELEASE;
      ->
      	netif_keep_dst(dev);
      
      Instead of using a single bit, we use two bits, one being
      eventually rebuilt in bonding/team drivers.
      
      The other one, is permanent and blocks IFF_XMIT_DST_RELEASE being
      rebuilt in bonding/team. Eventually, we could add something
      smarter later.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Julian Anastasov <ja@ssi.bg>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      02875878
    • E
      net/mlx4_en: remove NETDEV_TX_BUSY · fe971b95
      Eric Dumazet 提交于
      Drivers should avoid NETDEV_TX_BUSY as much as possible.
      
      They should stop the tx queue before qdisc even tries to push another
      packet, to avoid requeues.
      
      For a driver supporting skb->xmit_more, this is likely to be a prereq
      anyway, otherwise we could have a tx deadlock : We need to force a
      doorbell if TX ring is full.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Acked-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fe971b95
    • S
      3c59x: fix bad split of cpu_to_le32(pci_map_single()) · 88b09a6d
      Sylvain "ythier" Hitier 提交于
      In commit 6f2b6a30,
        # 3c59x: Add dma error checking and recovery
      the intent is to split out the mapping from the byte-swapping in order to
      insert a dma_mapping_error() check.
      
      Kinda this semantic patch:
      
          // See http://coccinelle.lip6.fr/
          //
          // Beware, grouik-and-dirty!
          @@
          expression DEV, X, Y, Z;
          @@
          -   cpu_to_le32(pci_map_single(DEV, X, Y, Z))
          +   dma_addr_t addr = pci_map_single(DEV, X, Y, Z);
          +   if (dma_mapping_error(&DEV->dev, addr))
          +       /* snip */;
          +   cpu_to_le32(addr)
      
      However, the #else part (of the #if DO_ZEROCOPY test) is changed this way:
      
          -   cpu_to_le32(pci_map_single(DEV, X, Y, Z))
          +   dma_addr_t addr = cpu_to_le32(pci_map_single(DEV, X, Y, Z));
          //                    ^^^^^^^^^^^
          //                    That mismatches the 3 other changes!
          +   if (dma_mapping_error(&DEV->dev, addr))
          +       /* snip */;
          +   cpu_to_le32(addr)
      
      Let's remove the leftover cpu_to_le32() for coherency.
      
      v2: Better changelog.
      v3: Add Acked-by
      
      Fixes: 6f2b6a30
        # 3c59x: Add dma error checking and recovery
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Signed-off-by: NSylvain "ythier" Hitier <sylvain.hitier@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88b09a6d
    • P
      net: bcmgenet: fix Tx ring priority programming · 37742166
      Petri Gynther 提交于
      GENET MAC has three Tx ring priority registers:
      - GENET_x_TDMA_PRIORITY0 for queues 0-5
      - GENET_x_TDMA_PRIORITY1 for queues 6-11
      - GENET_x_TDMA_PRIORITY2 for queues 12-16
      
      Fix bcmgenet_init_multiq() to program them correctly.
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      37742166
    • P
      net: phy: adjust fixed_phy_register() return value · fd2ef0ba
      Petri Gynther 提交于
      Adjust fixed_phy_register() to return struct phy_device *, so that
      it becomes easy to use fixed PHYs without device tree support:
      
        phydev = fixed_phy_register(PHY_POLL, &fixed_phy_status, NULL);
        fixed_phy_set_link_update(phydev, fixed_phy_link_update);
        phy_connect_direct(netdev, phydev, handler_fn, phy_interface);
      
      This change is a prerequisite for modifying bcmgenet driver to work
      without a device tree on Broadcom's MIPS-based 7xxx platforms.
      Signed-off-by: NPetri Gynther <pgynther@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fd2ef0ba
  3. 07 10月, 2014 5 次提交
  4. 06 10月, 2014 22 次提交