1. 03 8月, 2017 15 次提交
    • I
      rocker: Provide offload indication using nexthop flags · 63e701c1
      Ido Schimmel 提交于
      We want to stop using the FIB info's flags to provide the offlaod
      indication and instead do that on a per-nexthop basis.
      
      Convert rocker to do just that. It only supports one nexthop per-route,
      so conversion is simple.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      63e701c1
    • I
      ipv4: fib: Set offload indication according to nexthop flags · 475abbf1
      Ido Schimmel 提交于
      We're going to have capable drivers indicate route offload using the
      nexthop flags, but for non-multipath routes these flags aren't dumped to
      user space.
      
      Instead, set the offload indication in the route message flags.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      475abbf1
    • I
      mlxsw: core: Use correct EMAD transaction ID in debug message · 9820355f
      Ido Schimmel 提交于
      'trans->tid' is only assigned later in the function, resulting in a zero
      transaction ID. Use 'tid' instead.
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9820355f
    • D
      Merge branch 'netvsc-transparent-VF-support' · f6775a28
      David S. Miller 提交于
      Stephen Hemminger says:
      
      ====================
      netvsc: transparent VF support
      
      This patch set changes how SR-IOV Virtual Function devices are managed
      in the Hyper-V network driver. This version is rebased onto current net-next.
      
      Background
      
      In Hyper-V SR-IOV can be enabled (and disabled) by changing guest settings
      on host. When SR-IOV is enabled a matching PCI device is hot plugged and
      visible on guest. The VF device is an add-on to an existing netvsc
      device, and has the same MAC address.
      
      How is this different?
      
      The original support of VF relied on using bonding driver in active
      standby mode to handle the VF device.
      
      With the new netvsc VF logic, the Linux hyper-V network
      virtual driver will directly manage the link to SR-IOV VF device.
      When VF device is detected (hot plug) it is automatically made a
      slave device of the netvsc device. The VF device state reflects
      the state of the netvsc device; i.e. if netvsc is set down, then
      VF is set down. If netvsc is set up, then VF is brought up.
      
      Packet flow is independent of VF status; all packets are sent and
      received as if they were associated with the netvsc device. If VF is
      removed or link is down then the synthetic VMBUS path is used.
      
      What was wrong with using bonding script?
      
      A lot of work went into getting the bonding script to work on all
      distributions, but it was a major struggle. Linux network devices
      can be configured many, many ways and there is no one solution from
      userspace to make it all work. What is really hard is when
      configuration is attached to synthetic device during boot (eth0) and
      then the same addresses and firewall rules needs to also work later if
      doing bonding. The new code gets around all of this.
      
      How does VF work during initialization?
      
      Since all packets are sent and received through the logical netvsc
      device, initialization is much easier. Just configure the regular
      netvsc Ethernet device; when/if SR-IOV is enabled it just
      works. Provisioning and cloud init only need to worry about setting up
      netvsc device (eth0). If SR-IOV is enabled (even as a later step), the
      address and rules stay the same.
      
      What devices show up?
      
      Both netvsc and PCI devices are visible in the system. The netvsc
      device is active and named in usual manner (eth0). The PCI device is
      visible to Linux and gets renamed by udev to a persistent name
      (enP2p3s0). The PCI device name is now irrelevant now.
      
      The logic also sets the PCI VF device SLAVE flag on the network
      device so network tools can see the relationship if they are smart
      enough to understand how layered devices work.
      
      This is a lot like how I see Windows working.
      The VF device is visible in Device Manager, but is not configured.
      
      Is there any performance impact?
      There is no visible change in performance. The bonding
      and netvsc driver both have equivalent steps.
      
      Is it compatible with old bonding script?
      
      It turns out that if you use the old bonding script, then everything
      still works but in a sub-optimum manner. What happens is that bonding
      is unable to steal the VF from the netvsc device so it creates a one
      legged bond.  Packet flow then is:
      	bond0 <--> eth0 <- -> VF (enP2p3s0).
      In other words, if you get it wrong it still works, just
      awkward and slower.
      
      What if I add address or firewall rule onto the VF?
      
      Same problems occur with now as already occur with bonding, bridging,
      teaming on Linux if user incorrectly does configuration onto
      an underlying slave device. It will sort of work, packets will come in
      and out but the Linux kernel gets confused and things like ARP don’t
      work right.  There is no way to block manipulation of the slave
      device, and I am sure someone will find some special use case where
      they want it.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f6775a28
    • S
      netvsc: remove bonding setup script · 12aa7469
      stephen hemminger 提交于
      No longer needed, now all managed by transparent VF logic.
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      12aa7469
    • S
      netvsc: add documentation · a5050c61
      stephen hemminger 提交于
      Add some background documentation on netvsc device options
      and limitations.
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a5050c61
    • S
      netvsc: transparent VF management · 0c195567
      stephen hemminger 提交于
      This patch implements transparent fail over from synthetic NIC to
      SR-IOV virtual function NIC in Hyper-V environment. It is a better
      alternative to using bonding as is done now. Instead, the receive and
      transmit fail over is done internally inside the driver.
      
      Using bonding driver has lots of issues because it depends on the
      script being run early enough in the boot process and with sufficient
      information to make the association. This patch moves all that
      functionality into the kernel.
      Signed-off-by: NStephen Hemminger <sthemmin@microsoft.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0c195567
    • A
      atm: solos-pci: constify attribute_group structures · 638ce0fc
      Amitoj Kaur Chawla 提交于
      Functions working with attribute_groups provided by <linux/sysfs.h>
      work with const attribute_group. These attribute_group structures do not
      change at runtime so mark them as const.
      
      File size before:
       text      data     bss     dec     hex filename
       35740    28424     832   64996    fde4 drivers/atm/solos-pci.o
      
      File size after:
       text      data     bss     dec     hex filename
       35932    28232     832   64996    fde4 drivers/atm/solos-pci.o
      
      This change was made with the help of Coccinelle.
      Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      638ce0fc
    • A
      atm: adummy: constify attribute_group structure · 444826a9
      Amitoj Kaur Chawla 提交于
      Functions working with attribute_groups provided by <linux/sysfs.h>
      work with const attribute_group. These attribute_group structures do not
      change at runtime so mark them as const.
      
      File size before:
       text      data     bss     dec     hex filename
       2033      1448       0    3481     d99 drivers/atm/adummy.o
      
      File size after:
       text      data     bss     dec     hex filename
       2129      1352       0    3481     d99 drivers/atm/adummy.o
      
      This change was made with the help of Coccinelle.
      Signed-off-by: NAmitoj Kaur Chawla <amitoj1606@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      444826a9
    • D
      liquidio: set sriov_totalvfs correctly · cf19a8c3
      Derek Chickles 提交于
      The file /sys/devices/pci000.../sriov_totalvfs is showing a wrong value.
      Fix it by calling pci_sriov_set_totalvfs() to set the total number of VFs
      available after calculations for the number of PF and VF queues are made.
      Signed-off-by: NDerek Chickles <derek.chickles@cavium.com>
      Signed-off-by: NRaghu Vatsavayi <raghu.vatsavayi@cavium.com>
      Signed-off-by: NFelix Manlunas <felix.manlunas@cavium.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cf19a8c3
    • F
      net: dsa: Add support for 64-bit statistics · f613ed66
      Florian Fainelli 提交于
      DSA slave network devices maintain a pair of bytes and packets counters
      for each directions, but these are not 64-bit capable. Re-use
      pcpu_sw_netstats which contains exactly what we need for that purpose
      and update the code path to report 64-bit capable statistics.
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f613ed66
    • W
      flow_dissector: remove unused functions · b2f9d432
      WANG Cong 提交于
      They are introduced by commit f70ea018
      ("net: Add functions to get skb->hash based on flow structures")
      but never gets used in tree.
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b2f9d432
    • E
      tcp: tcp_data_queue() cleanup · 5357f0bd
      Eric Dumazet 提交于
      Commit c13ee2a4 ("tcp: reindent two spots after prequeue removal")
      removed code in tcp_data_queue().
      
      We can go a little farther, removing an always true test,
      and removing initializers for fragstolen and eaten variables.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Cc: Florian Westphal <fw@strlen.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5357f0bd
    • A
      net: bcmgenet: drop COMPILE_TEST dependency · aa6c16c4
      Arnd Bergmann 提交于
      The last patch added the dependency on 'OF && HAS_IOMEM' but left
      COMPILE_TEST as an alternative, which kind of defeats the purpose
      of adding the dependency, we still get randconfig build warnings:
      
      warning: (NET_DSA_BCM_SF2 && BCMGENET) selects MDIO_BCM_UNIMAC which has unmet direct dependencies (NETDEVICES && MDIO_BUS && HAS_IOMEM && OF_MDIO)
      
      For compile-testing purposes, we don't really need this anyway,
      as CONFIG_OF can be enabled on all architectures, and HAS_IOMEM
      is present on all architectures we do meaningful compile-testing on
      (the exception being arch/um).
      
      This makes both OF and HAS_IOMEM hard dependencies.
      
      Fixes: 5af74bb4 ("net: bcmgenet: Add dependency on HAS_IOMEM && OF")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      aa6c16c4
    • J
      hyperv: netvsc: Neaten netvsc_send_pkt by using a temporary · 956a25c9
      Joe Perches 提交于
      Repeated dereference of nvmsg.msg.v1_msg.send_rndis_pkt can be
      shortened by using a temporary.  Do so.
      
      No change in object code.
      
      Miscellanea:
      
      o Use * const for rpkt and nvchan
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      956a25c9
  2. 02 8月, 2017 25 次提交