1. 01 May, 2015 1 commit
  2. 30 Apr, 2015 2 commits
    • erj's avatar
      Add support for certain Intel X550 devices. · 4ead5077
      erj authored
      These include standalone X550 adapters, X552 10GbE backplane, and
      X552/X557-AT 10GBASE-T; with the latter two being integrated into Xeon D SoCs.
      
      As well, this bumps the ixgbe version number to 2.8.3, and includes updates
      to shared code for support for the new devices.
      
      Differential Revision: D2414
      Reviewed by:	gnn, adrian
      Approved by:	jfv (mentor), gnn (mentor)
      4ead5077
    • jhb's avatar
      Various fixes to the stats in igb(4), ixgbe(4), and ixl(4). · 4df8afdd
      jhb authored
      - Use hardware counters for ifnet stats in igb(4) when possible.  This
        ensures these stats include packets that bypass the regular stack via
        netmap.
      - Don't derefence values off the end of the igb(4) VF stats structure.
        Instead, add a dedicated if_get_counter method for igb(4) VF interfaces.
      - Report missed packets on igb(4) as input queue drops rather than an
        input error.
      - Report bug_ring drop counts as output queue drops for igb(4) and ixgbe(4).
      - Export the buf_ring drop stats for individual rings via sysctl on
        ixgbe(4).
      - Fix a typo that in ixl(4) that caused output queue drops to be reported
        as input queue drops and input queue drops to be unreported.
      
      Differential Revision:	https://reviews.freebsd.org/D2402
      Reviewed by:	jfv, rstone (6)
      Sponsored by:	Norse Corp, Inc.
      4df8afdd
  3. 20 Apr, 2015 2 commits
  4. 18 Mar, 2015 1 commit
    • adrian's avatar
      Fix ixgbe(4) to compile - with RSS; with ix+ixv in the kernel. · 8dff5909
      adrian authored
      * Fix the multiple same-named devclasses; the duplicate name
        trips up the linker.
      
      * Re-do the taskqueue stuff to use the new cpuset API, not the old
        pinned API.
      
      * Add includes for the new location of the RSS configuration routines.
      
      This allows ixgbe to compile as a module /and/ linked into the kernel,
      along with RSS working.
      
      Sponsored by:	Norse Corp, Inc.
      8dff5909
  5. 17 Mar, 2015 1 commit
    • jfv's avatar
      Update to the Intel ixgbe driver: · 06710b08
      jfv authored
      	- Split the driver into independent pf and vf loadables. This is
      	  in preparation for SRIOV support which will be following shortly.
      	  This also allows us to keep a seperate revision control over the
      	  two parts, making for easier sustaining.
      	- Make the TX/RX code a shared/seperated file, in the old code base
      	  the ixv code would miss fixes that went into ixgbe, this model
      	  will eliminate that problem.
      	- The driver loadables will now match the device names, something that
      	  has been requested for some time.
      	- Rather than a modules/ixgbe there is now modules/ix and modules/ixv
      	- It will also be possible to make your static kernel with only one
      	  or the other for streamlined installs, or both.
      
      Enjoy!
      
      Submitted by: jfv and erj
      06710b08
  6. 09 Mar, 2015 3 commits
  7. 25 Feb, 2015 1 commit
  8. 24 Feb, 2015 1 commit
  9. 18 Jan, 2015 1 commit
    • adrian's avatar
      Refactor / restructure the RSS code into generic, IPv4 and IPv6 specific · f1c9d3f3
      adrian authored
      bits.
      
      The motivation here is to eventually teach netisr and potentially
      other networking subsystems a bit more about how RSS work queues / buckets
      are configured so things have a hope of auto-configuring in the future.
      
      * net/rss_config.[ch] takes care of the generic bits for doing
        configuration, hash function selection, etc;
      * topelitz.[ch] is now in net/ rather than netinet/;
      * (and would be in libkern if it didn't directly include RSS_KEYSIZE;
        that's a later thing to fix up.)
      * netinet/in_rss.[ch] now just contains the IPv4 specific methods;
      * and netinet/in6_rss.[ch] now just contains the IPv6 specific methods.
      
      This should have no functional impact on anyone currently using
      the RSS support.
      
      Differential Revision:	D1383
      Reviewed by:	gnn, jfv (intel driver bits)
      f1c9d3f3
  10. 02 Dec, 2014 1 commit
  11. 01 Dec, 2014 2 commits
    • dim's avatar
      Merge ^/head r275262 through r275363. · 78c1f8fb
      dim authored
      78c1f8fb
    • hselasky's avatar
      Start process of removing the use of the deprecated "M_FLOWID" flag · 12fec361
      hselasky authored
      from the FreeBSD network code. The flag is still kept around in the
      "sys/mbuf.h" header file, but does no longer have any users. Instead
      the "m_pkthdr.rsstype" field in the mbuf structure is now used to
      decide the meaning of the "m_pkthdr.flowid" field. To modify the
      "m_pkthdr.rsstype" field please use the existing "M_HASHTYPE_XXX"
      macros as defined in the "sys/mbuf.h" header file.
      
      This patch introduces new behaviour in the transmit direction.
      Previously network drivers checked if "M_FLOWID" was set in "m_flags"
      before using the "m_pkthdr.flowid" field. This check has now now been
      replaced by checking if "M_HASHTYPE_GET(m)" is different from
      "M_HASHTYPE_NONE". In the future more hashtypes will be added, for
      example hashtypes for hardware dedicated flows.
      
      "M_HASHTYPE_OPAQUE" indicates that the "m_pkthdr.flowid" value is
      valid and has no particular type. This change removes the need for an
      "if" statement in TCP transmit code checking for the presence of a
      valid flowid value. The "if" statement mentioned above is now a direct
      variable assignment which is then later checked by the respective
      network drivers like before.
      
      Additional notes:
      - The SCTP code changes will be committed as a separate patch.
      - Removal of the "M_FLOWID" flag will also be done separately.
      - The FreeBSD version has been bumped.
      
      MFC after:	1 month
      Sponsored by:	Mellanox Technologies
      12fec361
  12. 26 Nov, 2014 1 commit
  13. 16 Nov, 2014 1 commit
    • melifaro's avatar
      Fix r273112: do not turn DROP_EN by default. · f66efc9c
      melifaro authored
      Due to adapter->hw.fc.requested_mode is filled with default value
      after ixgbe_initialize_receive_units(), this leads to enabling
      DROP_EN in most cases.
      
      Tested by:	ae
      MFC after:	1 week
      f66efc9c
  14. 21 Oct, 2014 1 commit
    • hselasky's avatar
      Fix multiple incorrect SYSCTL arguments in the kernel: · 49c137f7
      hselasky authored
      - Wrong integer type was specified.
      
      - Wrong or missing "access" specifier. The "access" specifier
      sometimes included the SYSCTL type, which it should not, except for
      procedural SYSCTL nodes.
      
      - Logical OR where binary OR was expected.
      
      - Properly assert the "access" argument passed to all SYSCTL macros,
      using the CTASSERT macro. This applies to both static- and dynamically
      created SYSCTLs.
      
      - Properly assert the the data type for both static and dynamic
      SYSCTLs. In the case of static SYSCTLs we only assert that the data
      pointed to by the SYSCTL data pointer has the correct size, hence
      there is no easy way to assert types in the C language outside a
      C-function.
      
      - Rewrote some code which doesn't pass a constant "access" specifier
      when creating dynamic SYSCTL nodes, which is now a requirement.
      
      - Updated "EXAMPLES" section in SYSCTL manual page.
      
      MFC after:	3 days
      Sponsored by:	Mellanox Technologies
      49c137f7
  15. 15 Oct, 2014 1 commit
    • adrian's avatar
      Set the DROP_EN bit before the RX queue is brought up and active. · 3a99bd52
      adrian authored
      He noticed issues setting this bit in SRRCTL after the queue was up,
      so doing it from the sysctl handler isn't enough and may not actually
      work correctly.
      
      This commit doesn't remove the sysctl path or try to change its
      behaviour.  I'll talk with others about how to finish fixing that
      before I tackle that.
      
      PR:		kern/194311
      Submitted by:	luigi
      MFC after:	3 days
      Sponsored by:	Norse Corp, Inc
      3a99bd52
  16. 28 Sep, 2014 1 commit
  17. 15 Sep, 2014 2 commits
  18. 08 Sep, 2014 1 commit
  19. 30 Aug, 2014 1 commit
  20. 29 Aug, 2014 1 commit
  21. 16 Aug, 2014 1 commit
    • luigi's avatar
      Update to the current version of netmap. · 3ab69a24
      luigi authored
      Mostly bugfixes or features developed in the past 6 months,
      so this is a 10.1 candidate.
      
      Basically no user API changes (some bugfixes in sys/net/netmap_user.h).
      
      In detail:
      
      1. netmap support for virtio-net, including in netmap mode.
        Under bhyve and with a netmap backend [2] we reach over 1Mpps
        with standard APIs (e.g. libpcap), and 5-8 Mpps in netmap mode.
      
      2. (kernel) add support for multiple memory allocators, so we can
        better partition physical and virtual interfaces giving access
        to separate users. The most visible effect is one additional
        argument to the various kernel functions to compute buffer
        addresses. All netmap-supported drivers are affected, but changes
        are mechanical and trivial
      
      3. (kernel) simplify the prototype for *txsync() and *rxsync()
        driver methods. All netmap drivers affected, changes mostly mechanical.
      
      4. add support for netmap-monitor ports. Think of it as a mirroring
        port on a physical switch: a netmap monitor port replicates traffic
        present on the main port. Restrictions apply. Drive carefully.
      
      5. if_lem.c: support for various paravirtualization features,
        experimental and disabled by default.
        Most of these are described in our ANCS'13 paper [1].
        Paravirtualized support in netmap mode is new, and beats the
        numbers in the paper by a large factor (under qemu-kvm,
        we measured gues-host throughput up to 10-12 Mpps).
      
      A lot of refactoring and additional documentation in the files
      in sys/dev/netmap, but apart from #2 and #3 above, almost nothing
      of this stuff is visible to other kernel parts.
      
      Example programs in tools/tools/netmap have been updated with bugfixes
      and to support more of the existing features.
      
      This is meant to go into 10.1 so we plan an MFC before the Aug.22 deadline.
      
      A lot of this code has been contributed by my colleagues at UNIPI,
      including Giuseppe Lettieri, Vincenzo Maffione, Stefano Garzarella.
      
      MFC after:	3 days.
      3ab69a24
  22. 14 Aug, 2014 1 commit
  23. 20 Jul, 2014 4 commits
  24. 17 Jul, 2014 1 commit
    • hiren's avatar
      Fix a typo. · 6164dd2f
      hiren authored
      PR:		191898
      Submitted by:	vsjcfm@gmail.com
      6164dd2f
  25. 30 Jun, 2014 2 commits
    • adrian's avatar
      Initialise these variables so gcc doesn't complain. · c2f3de4f
      adrian authored
      Submitted by:	luigi
      c2f3de4f
    • adrian's avatar
      Add initial RSS awareness to the ixgbe(4) driver. · 6ffa0d59
      adrian authored
      The ixgbe(4) hardware is capable of RSS hashing RX packets and doing RSS
      queue selection for up to 8 queues.
      
      However, even if multi-queue is enabled for ixgbe(4), the RX path doesn't use
      the RSS flowid from the received descriptor.  It just uses the MSIX queue id.
      
      This patch does a handful of things if RSS is enabled:
      
      * Instead of using a random key at boot, fetch the RSS key from the RSS code
        and program that in to the RSS redirection table.
      
        That whole chunk of code should be double checked for endian correctness.
      
      * Use the RSS queue mapping to CPU ID to figure out where to thread pin
        the RX swi thread and the taskqueue threads for each queue.
      
      * The software queue is now really an "RSS bucket".
      
      * When programming the RSS indirection table, use the RSS code to
        figure out which RSS bucket each slot in the indirection table maps
        to.
      
      * When transmitting, use the flowid RSS mapping if the mbuf has
        an RSS aware hash.  The existing method wasn't guaranteed to align
        correctly with the destination RSS bucket (and thus CPU ID.)
      
      This code warns if the number of RSS buckets isn't the same as the
      automatically configured number of hardware queues.  The administrator
      will have to tweak one of them for better performance.
      
      There's currently no way to re-balance the RSS indirection table after
      startup.  I'll worry about that later.
      
      Additionally, it may be worthwhile to always use the full 32 bit flowid if
      multi-queue is enabled.  It'll make things like lagg(4) behave better with
      respect to traffic distribution.
      6ffa0d59
  26. 28 Jun, 2014 1 commit
  27. 27 Jun, 2014 2 commits
    • gjb's avatar
      Revert r267961, r267973: · fc21f405
      gjb authored
      These changes prevent sysctl(8) from returning proper output,
      such as:
      
       1) no output from sysctl(8)
       2) erroneously returning ENOMEM with tools like truss(1)
          or uname(1)
       truss: can not get etype: Cannot allocate memory
      fc21f405
    • hselasky's avatar
      Extend the meaning of the CTLFLAG_TUN flag to automatically check if · bd1ed65f
      hselasky authored
      there is an environment variable which shall initialize the SYSCTL
      during early boot. This works for all SYSCTL types both statically and
      dynamically created ones, except for the SYSCTL NODE type and SYSCTLs
      which belong to VNETs. A new flag, CTLFLAG_NOFETCH, has been added to
      be used in the case a tunable sysctl has a custom initialisation
      function allowing the sysctl to still be marked as a tunable. The
      kernel SYSCTL API is mostly the same, with a few exceptions for some
      special operations like iterating childrens of a static/extern SYSCTL
      node. This operation should probably be made into a factored out
      common macro, hence some device drivers use this. The reason for
      changing the SYSCTL API was the need for a SYSCTL parent OID pointer
      and not only the SYSCTL parent OID list pointer in order to quickly
      generate the sysctl path. The motivation behind this patch is to avoid
      parameter loading cludges inside the OFED driver subsystem. Instead of
      adding special code to the OFED driver subsystem to post-load tunables
      into dynamically created sysctls, we generalize this in the kernel.
      
      Other changes:
      - Corrected a possibly incorrect sysctl name from "hw.cbb.intr_mask"
      to "hw.pcic.intr_mask".
      - Removed redundant TUNABLE statements throughout the kernel.
      - Some minor code rewrites in connection to removing not needed
      TUNABLE statements.
      - Added a missing SYSCTL_DECL().
      - Wrapped two very long lines.
      - Avoid malloc()/free() inside sysctl string handling, in case it is
      called to initialize a sysctl from a tunable, hence malloc()/free() is
      not ready when sysctls from the sysctl dataset are registered.
      - Bumped FreeBSD version to indicate SYSCTL API change.
      
      MFC after:	2 weeks
      Sponsored by:	Mellanox Technologies
      bd1ed65f
  28. 12 Jun, 2014 1 commit
  29. 06 Jun, 2014 1 commit