1. 24 May, 2018 9 commits
    • Huy Nguyen's avatar
      net/mlx5e: Receive buffer configuration · 0696d608
      Huy Nguyen authored
      Add APIs for buffer configuration based on the changes in
      pfc configuration, cable len, buffer size configuration,
      and priority to buffer mapping.
      
      Note that the xoff fomula is as below
        xoff = ((301+2.16 * len [m]) * speed [Gbps] + 2.72 MTU [B]
        xoff_threshold = buffer_size - xoff
        xon_threshold = xoff_threshold - MTU
      Signed-off-by: default avatarHuy Nguyen <huyn@mellanox.com>
      Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      0696d608
    • Huy Nguyen's avatar
      net/mlx5: PPTB and PBMC register firmware command support · 50b4a3c2
      Huy Nguyen authored
      Add firmware command interface to read and write PPTB and PBMC
      registers.
      
      PPTB register enables mappings priority to a specific receive buffer.
      
      PBMC registers enables changing the receive buffer's configuration such
      as buffer size, xon/xoff thresholds, buffer's lossy property and
      buffer's shared property.
      Signed-off-by: default avatarHuy Nguyen <huyn@mellanox.com>
      Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      50b4a3c2
    • Huy Nguyen's avatar
      net/mlx5: Add pbmc and pptb in the port_access_reg_cap_mask · df5f1361
      Huy Nguyen authored
      Add pbmc and pptb in the port_access_reg_cap_mask. These two
      bits determine if device supports receive buffer configuration.
      Signed-off-by: default avatarHuy Nguyen <huyn@mellanox.com>
      Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      df5f1361
    • Huy Nguyen's avatar
      net/mlx5e: Move port speed code from en_ethtool.c to en/port.c · 2c81bfd5
      Huy Nguyen authored
      Move four below functions from en_ethtool.c to en/port.c. These
      functions are used by both en_ethtool.c and en_main.c. Future code
      can use these functions without ethtool link mode dependency.
        u32 mlx5e_port_ptys2speed(u32 eth_proto_oper);
        int mlx5e_port_linkspeed(struct mlx5_core_dev *mdev, u32 *speed);
        int mlx5e_port_max_linkspeed(struct mlx5_core_dev *mdev, u32 *speed);
        u32 mlx5e_port_speed2linkmodes(u32 speed);
      
      Delete the speed field from table mlx5e_build_ptys2ethtool_map. This
      table only keeps the mapping between the mlx5e link mode and
      ethtool link mode. Add new table mlx5e_link_speed for translation
      from mlx5e link mode to actual speed.
      Signed-off-by: default avatarHuy Nguyen <huyn@mellanox.com>
      Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      2c81bfd5
    • Huy Nguyen's avatar
      net/dcb: Add dcbnl buffer attribute · e549f6f9
      Huy Nguyen authored
      In this patch, we add dcbnl buffer attribute to allow user
      change the NIC's buffer configuration such as priority
      to buffer mapping and buffer size of individual buffer.
      
      This attribute combined with pfc attribute allows advanced user to
      fine tune the qos setting for specific priority queue. For example,
      user can give dedicated buffer for one or more priorities or user
      can give large buffer to certain priorities.
      
      The dcb buffer configuration will be controlled by lldptool.
      lldptool -T -i eth2 -V BUFFER prio 0,2,5,7,1,2,3,6
        maps priorities 0,1,2,3,4,5,6,7 to receive buffer 0,2,5,7,1,2,3,6
      lldptool -T -i eth2 -V BUFFER size 87296,87296,0,87296,0,0,0,0
        sets receive buffer size for buffer 0,1,2,3,4,5,6,7 respectively
      
      After discussion on mailing list with Jakub, Jiri, Ido and John, we agreed to
      choose dcbnl over devlink interface since this feature is intended to set
      port attributes which are governed by the netdev instance of that port, where
      devlink API is more suitable for global ASIC configurations.
      
      We present an use case scenario where dcbnl buffer attribute configured
      by advance user helps reduce the latency of messages of different sizes.
      
      Scenarios description:
      On ConnectX-5, we run latency sensitive traffic with
      small/medium message sizes ranging from 64B to 256KB and bandwidth sensitive
      traffic with large messages sizes 512KB and 1MB. We group small, medium,
      and large message sizes to their own pfc enables priorities as follow.
        Priorities 1 & 2 (64B, 256B and 1KB)
        Priorities 3 & 4 (4KB, 8KB, 16KB, 64KB, 128KB and 256KB)
        Priorities 5 & 6 (512KB and 1MB)
      
      By default, ConnectX-5 maps all pfc enabled priorities to a single
      lossless fixed buffer size of 50% of total available buffer space. The
      other 50% is assigned to lossy buffer. Using dcbnl buffer attribute,
      we create three equal size lossless buffers. Each buffer has 25% of total
      available buffer space. Thus, the lossy buffer size reduces to 25%. Priority
      to lossless  buffer mappings are set as follow.
        Priorities 1 & 2 on lossless buffer #1
        Priorities 3 & 4 on lossless buffer #2
        Priorities 5 & 6 on lossless buffer #3
      
      We observe improvements in latency for small and medium message sizes
      as follows. Please note that the large message sizes bandwidth performance is
      reduced but the total bandwidth remains the same.
        256B message size (42 % latency reduction)
        4K message size (21% latency reduction)
        64K message size (16% latency reduction)
      
      CC: Ido Schimmel <idosch@idosch.org>
      CC: Jakub Kicinski <jakub.kicinski@netronome.com>
      CC: Jiri Pirko <jiri@resnulli.us>
      CC: Or Gerlitz <gerlitz.or@gmail.com>
      CC: Parav Pandit <parav@mellanox.com>
      CC: Aron Silverton <aron.silverton@oracle.com>
      Signed-off-by: default avatarHuy Nguyen <huyn@mellanox.com>
      Reviewed-by: default avatarParav Pandit <parav@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      e549f6f9
    • Heiner Kallweit's avatar
      net: phy: replace bool members in struct phy_device with bit-fields · 87e5808d
      Heiner Kallweit authored
      In struct phy_device we have a number of flags being defined as type
      bool. Similar to e.g. struct pci_dev we can save some space by using
      bit-fields.
      Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87e5808d
    • David S. Miller's avatar
      Merge tag 'batadv-next-for-davem-20180524' of git://git.open-mesh.org/linux-merge · 5c352421
      David S. Miller authored
      Simon Wunderlich says:
      
      ====================
      This feature/cleanup patchset includes the following patches:
      
       - bump version strings, by Simon Wunderlich
      
       - Disable batman-adv debugfs by default, by Sven Eckelmann
      
       - Improve handling mesh nodes with multicast optimizations disabled,
         by Linus Luessing
      
       - Avoid bool in structs, by Sven Eckelmann
      
       - Allocate less memory when debugfs is disabled, by Sven Eckelmann
      
       - Fix batadv_interface_tx return data type, by Luc Van Oostenryck
      
       - improve link speed handling for virtual interfaces, by Marek Lindner
      
       - Enable BATMAN V algorithm by default, by Marek Lindner
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5c352421
    • Jakub Kicinski's avatar
      bpfilter: don't pass O_CREAT when opening console for debug · 13405468
      Jakub Kicinski authored
      Passing O_CREAT (00000100) to open means we should also pass file
      mode as the third parameter.  Creating /dev/console as a regular
      file may not be helpful anyway, so simply drop the flag when
      opening debug_fd.
      
      Fixes: d2ba09c1 ("net: add skeleton of bpfilter kernel module")
      Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      13405468
    • Alexei Starovoitov's avatar
      bpfilter: fix build dependency · 61a552eb
      Alexei Starovoitov authored
      BPFILTER could have been enabled without INET causing this build error:
      ERROR: "bpfilter_process_sockopt" [net/bpfilter/bpfilter.ko] undefined!
      
      Fixes: d2ba09c1 ("net: add skeleton of bpfilter kernel module")
      Reported-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Acked-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      61a552eb
  2. 23 May, 2018 31 commits