Re: svn commit: r284049 - in head/sys: dev/ixl modules/ixl modules/ixlv

2015-06-08 Thread Jack Vogel
I did not realize this, but there is an update utility on our public site,
this will update your hardware to
the latest released version of FW provided its an OEM generic product, if
you have another OEM specific
adapter (say HP or Dell...), then you will need to get the update from them.

https://downloadcenter.intel.com/download/24769/NVM-Update-Utility-for-Intel-Ethernet-Converged-Network-Adapter-XL710-X710-Series


For right now this utility is only available for EFI or Linux, later in the
Fall there will be a FreeBSD specific version.


Hope this helps,


Jack



On Fri, Jun 5, 2015 at 4:07 PM, Adrian Chadd adr...@freebsd.org wrote:

 Hi!

 Is there any public information / firmware on this? Or do we have to
 have some commercial arrangement with Intel to get the updated
 firmware?

 My support channel is whoever gave me the two ixv 40g nics to test
 netmap on soon and I don't think they have firmware. :)

 Thanks,



 -adrian


 On 5 June 2015 at 15:52, Jack F Vogel j...@freebsd.org wrote:
  Author: jfv
  Date: Fri Jun  5 22:52:42 2015
  New Revision: 284049
  URL: https://svnweb.freebsd.org/changeset/base/284049
 
  Log:
Update SW4 to the Intel ixl/ixlv drivers. This is primarily a shared
code update, with supporting changes in the CORE. Changes for the
 extended
media types, VF driver has virtual channel protocol changes, and some
register use corrections.  This software change should be coordinated
 with
Firmware updates to your hardware, contact your support channels for
 that.
 
MFC after:1 week
 
  Added:
head/sys/dev/ixl/i40e_devids.h   (contents, props changed)
  Modified:
head/sys/dev/ixl/i40e_adminq.c
head/sys/dev/ixl/i40e_adminq.h
head/sys/dev/ixl/i40e_adminq_cmd.h
head/sys/dev/ixl/i40e_common.c
head/sys/dev/ixl/i40e_hmc.c
head/sys/dev/ixl/i40e_hmc.h
head/sys/dev/ixl/i40e_lan_hmc.c
head/sys/dev/ixl/i40e_nvm.c
head/sys/dev/ixl/i40e_osdep.h
head/sys/dev/ixl/i40e_prototype.h
head/sys/dev/ixl/i40e_register.h
head/sys/dev/ixl/i40e_type.h
head/sys/dev/ixl/i40e_virtchnl.h
head/sys/dev/ixl/if_ixl.c
head/sys/dev/ixl/if_ixlv.c
head/sys/dev/ixl/ixlv.h
head/sys/dev/ixl/ixlvc.c
head/sys/modules/ixl/Makefile
head/sys/modules/ixlv/Makefile
 
  Modified: head/sys/dev/ixl/i40e_adminq.c
 
 ==
  --- head/sys/dev/ixl/i40e_adminq.c  Fri Jun  5 21:45:35 2015
 (r284048)
  +++ head/sys/dev/ixl/i40e_adminq.c  Fri Jun  5 22:52:42 2015
 (r284049)
  @@ -315,8 +315,12 @@ static enum i40e_status_code i40e_config
  wr32(hw, hw-aq.asq.tail, 0);
 
  /* set starting point */
  -   wr32(hw, hw-aq.asq.len, (hw-aq.num_asq_entries |
  - I40E_PF_ATQLEN_ATQENABLE_MASK));
  +   if (!i40e_is_vf(hw))
  +   wr32(hw, hw-aq.asq.len, (hw-aq.num_asq_entries |
  +
  I40E_PF_ATQLEN_ATQENABLE_MASK));
  +   if (i40e_is_vf(hw))
  +   wr32(hw, hw-aq.asq.len, (hw-aq.num_asq_entries |
  +
  I40E_VF_ATQLEN1_ATQENABLE_MASK));
  wr32(hw, hw-aq.asq.bal, I40E_LO_DWORD(hw-aq.asq.desc_buf.pa));
  wr32(hw, hw-aq.asq.bah, I40E_HI_DWORD(hw-aq.asq.desc_buf.pa));
 
  @@ -344,8 +348,12 @@ static enum i40e_status_code i40e_config
  wr32(hw, hw-aq.arq.tail, 0);
 
  /* set starting point */
  -   wr32(hw, hw-aq.arq.len, (hw-aq.num_arq_entries |
  - I40E_PF_ARQLEN_ARQENABLE_MASK));
  +   if (!i40e_is_vf(hw))
  +   wr32(hw, hw-aq.arq.len, (hw-aq.num_arq_entries |
  +
  I40E_PF_ARQLEN_ARQENABLE_MASK));
  +   if (i40e_is_vf(hw))
  +   wr32(hw, hw-aq.arq.len, (hw-aq.num_arq_entries |
  +
  I40E_VF_ARQLEN1_ARQENABLE_MASK));
  wr32(hw, hw-aq.arq.bal, I40E_LO_DWORD(hw-aq.arq.desc_buf.pa));
  wr32(hw, hw-aq.arq.bah, I40E_HI_DWORD(hw-aq.arq.desc_buf.pa));
 
  @@ -559,6 +567,7 @@ enum i40e_status_code i40e_init_adminq(s
   {
  enum i40e_status_code ret_code;
  u16 eetrack_lo, eetrack_hi;
  +   u16 cfg_ptr, oem_hi, oem_lo;
  int retry = 0;
  /* verify input for valid configuration */
  if ((hw-aq.num_arq_entries == 0) ||
  @@ -619,6 +628,12 @@ enum i40e_status_code i40e_init_adminq(s
  i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, eetrack_lo);
  i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, eetrack_hi);
  hw-nvm.eetrack = (eetrack_hi  16) | eetrack_lo;
  +   i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, cfg_ptr);
  +   i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF),
  +  oem_hi);
  +   i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)),
  +  oem_lo);
  +   hw-nvm.oem_ver = ((u32)oem_hi  16) | oem_lo;
 
  if (hw-aq.api_maj_ver  I40E_FW_API_VERSION_MAJOR) {
  ret_code = I40E_ERR_FIRMWARE_API_VERSION;
  @@ -669,6 

Re: svn commit: r284049 - in head/sys: dev/ixl modules/ixl modules/ixlv

2015-06-05 Thread Jack Vogel
Well, you know me don't you :)  Larger customers will have some kind of
field engineer to contact,
but if anyone here, ahem, doesn't you can work with me to get what you need.

Cheers,

Jack


On Fri, Jun 5, 2015 at 4:07 PM, Adrian Chadd adr...@freebsd.org wrote:

 Hi!

 Is there any public information / firmware on this? Or do we have to
 have some commercial arrangement with Intel to get the updated
 firmware?

 My support channel is whoever gave me the two ixv 40g nics to test
 netmap on soon and I don't think they have firmware. :)

 Thanks,



 -adrian


 On 5 June 2015 at 15:52, Jack F Vogel j...@freebsd.org wrote:
  Author: jfv
  Date: Fri Jun  5 22:52:42 2015
  New Revision: 284049
  URL: https://svnweb.freebsd.org/changeset/base/284049
 
  Log:
Update SW4 to the Intel ixl/ixlv drivers. This is primarily a shared
code update, with supporting changes in the CORE. Changes for the
 extended
media types, VF driver has virtual channel protocol changes, and some
register use corrections.  This software change should be coordinated
 with
Firmware updates to your hardware, contact your support channels for
 that.
 
MFC after:1 week
 
  Added:
head/sys/dev/ixl/i40e_devids.h   (contents, props changed)
  Modified:
head/sys/dev/ixl/i40e_adminq.c
head/sys/dev/ixl/i40e_adminq.h
head/sys/dev/ixl/i40e_adminq_cmd.h
head/sys/dev/ixl/i40e_common.c
head/sys/dev/ixl/i40e_hmc.c
head/sys/dev/ixl/i40e_hmc.h
head/sys/dev/ixl/i40e_lan_hmc.c
head/sys/dev/ixl/i40e_nvm.c
head/sys/dev/ixl/i40e_osdep.h
head/sys/dev/ixl/i40e_prototype.h
head/sys/dev/ixl/i40e_register.h
head/sys/dev/ixl/i40e_type.h
head/sys/dev/ixl/i40e_virtchnl.h
head/sys/dev/ixl/if_ixl.c
head/sys/dev/ixl/if_ixlv.c
head/sys/dev/ixl/ixlv.h
head/sys/dev/ixl/ixlvc.c
head/sys/modules/ixl/Makefile
head/sys/modules/ixlv/Makefile
 
  Modified: head/sys/dev/ixl/i40e_adminq.c
 
 ==
  --- head/sys/dev/ixl/i40e_adminq.c  Fri Jun  5 21:45:35 2015
 (r284048)
  +++ head/sys/dev/ixl/i40e_adminq.c  Fri Jun  5 22:52:42 2015
 (r284049)
  @@ -315,8 +315,12 @@ static enum i40e_status_code i40e_config
  wr32(hw, hw-aq.asq.tail, 0);
 
  /* set starting point */
  -   wr32(hw, hw-aq.asq.len, (hw-aq.num_asq_entries |
  - I40E_PF_ATQLEN_ATQENABLE_MASK));
  +   if (!i40e_is_vf(hw))
  +   wr32(hw, hw-aq.asq.len, (hw-aq.num_asq_entries |
  +
  I40E_PF_ATQLEN_ATQENABLE_MASK));
  +   if (i40e_is_vf(hw))
  +   wr32(hw, hw-aq.asq.len, (hw-aq.num_asq_entries |
  +
  I40E_VF_ATQLEN1_ATQENABLE_MASK));
  wr32(hw, hw-aq.asq.bal, I40E_LO_DWORD(hw-aq.asq.desc_buf.pa));
  wr32(hw, hw-aq.asq.bah, I40E_HI_DWORD(hw-aq.asq.desc_buf.pa));
 
  @@ -344,8 +348,12 @@ static enum i40e_status_code i40e_config
  wr32(hw, hw-aq.arq.tail, 0);
 
  /* set starting point */
  -   wr32(hw, hw-aq.arq.len, (hw-aq.num_arq_entries |
  - I40E_PF_ARQLEN_ARQENABLE_MASK));
  +   if (!i40e_is_vf(hw))
  +   wr32(hw, hw-aq.arq.len, (hw-aq.num_arq_entries |
  +
  I40E_PF_ARQLEN_ARQENABLE_MASK));
  +   if (i40e_is_vf(hw))
  +   wr32(hw, hw-aq.arq.len, (hw-aq.num_arq_entries |
  +
  I40E_VF_ARQLEN1_ARQENABLE_MASK));
  wr32(hw, hw-aq.arq.bal, I40E_LO_DWORD(hw-aq.arq.desc_buf.pa));
  wr32(hw, hw-aq.arq.bah, I40E_HI_DWORD(hw-aq.arq.desc_buf.pa));
 
  @@ -559,6 +567,7 @@ enum i40e_status_code i40e_init_adminq(s
   {
  enum i40e_status_code ret_code;
  u16 eetrack_lo, eetrack_hi;
  +   u16 cfg_ptr, oem_hi, oem_lo;
  int retry = 0;
  /* verify input for valid configuration */
  if ((hw-aq.num_arq_entries == 0) ||
  @@ -619,6 +628,12 @@ enum i40e_status_code i40e_init_adminq(s
  i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, eetrack_lo);
  i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, eetrack_hi);
  hw-nvm.eetrack = (eetrack_hi  16) | eetrack_lo;
  +   i40e_read_nvm_word(hw, I40E_SR_BOOT_CONFIG_PTR, cfg_ptr);
  +   i40e_read_nvm_word(hw, (cfg_ptr + I40E_NVM_OEM_VER_OFF),
  +  oem_hi);
  +   i40e_read_nvm_word(hw, (cfg_ptr + (I40E_NVM_OEM_VER_OFF + 1)),
  +  oem_lo);
  +   hw-nvm.oem_ver = ((u32)oem_hi  16) | oem_lo;
 
  if (hw-aq.api_maj_ver  I40E_FW_API_VERSION_MAJOR) {
  ret_code = I40E_ERR_FIRMWARE_API_VERSION;
  @@ -669,6 +684,9 @@ enum i40e_status_code i40e_shutdown_admi
  i40e_destroy_spinlock(hw-aq.asq_spinlock);
  i40e_destroy_spinlock(hw-aq.arq_spinlock);
 
  +   if (hw-nvm_buff.va)
  +   i40e_free_virt_mem(hw, hw-nvm_buff);
  +
  return ret_code;
   }
 
  @@ -688,16 +706,16 @@ u16 i40e_clean_asq(struct i40e_hw *hw)
 
  desc = 

Re: svn commit: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv

2015-03-18 Thread Jack Vogel
OK, thanks for pointing that out, I'll include them.

On Wed, Mar 18, 2015 at 8:20 AM, Nathan Whitehorn nwhiteh...@freebsd.org
wrote:



 On 03/17/15 11:32, Jack F Vogel wrote:

 Author: jfv
 Date: Tue Mar 17 18:32:28 2015
 New Revision: 280182
 URL: https://svnweb.freebsd.org/changeset/base/280182

 Log:
Update to the Intel ixgbe driver:
 - 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

 Added:
head/sys/dev/ixgbe/if_ix.c   (contents, props changed)
head/sys/dev/ixgbe/if_ixv.c   (contents, props changed)
head/sys/dev/ixgbe/ix_txrx.c   (contents, props changed)
head/sys/modules/ix/
head/sys/modules/ix/Makefile   (contents, props changed)
head/sys/modules/ixv/
head/sys/modules/ixv/Makefile   (contents, props changed)
 Deleted:
head/sys/dev/ixgbe/ixgbe.c
head/sys/dev/ixgbe/ixv.c
head/sys/dev/ixgbe/ixv.h
head/sys/modules/ixgbe/
 Modified:
head/sys/amd64/conf/GENERIC


 Note that the mips OCTEON1 and PowerPC GENERIC64 config files also need to
 be changed here and are currently unbuildable.
 -Nathan


 head/sys/conf/NOTES
head/sys/conf/files
head/sys/dev/ixgbe/LICENSE
head/sys/dev/ixgbe/ixgbe.h
head/sys/dev/ixgbe/ixgbe_82598.c
head/sys/dev/ixgbe/ixgbe_82598.h
head/sys/dev/ixgbe/ixgbe_82599.c
head/sys/dev/ixgbe/ixgbe_82599.h
head/sys/dev/ixgbe/ixgbe_api.c
head/sys/dev/ixgbe/ixgbe_api.h
head/sys/dev/ixgbe/ixgbe_common.c
head/sys/dev/ixgbe/ixgbe_common.h
head/sys/dev/ixgbe/ixgbe_dcb.c
head/sys/dev/ixgbe/ixgbe_dcb.h
head/sys/dev/ixgbe/ixgbe_dcb_82598.c
head/sys/dev/ixgbe/ixgbe_dcb_82598.h
head/sys/dev/ixgbe/ixgbe_dcb_82599.c
head/sys/dev/ixgbe/ixgbe_dcb_82599.h
head/sys/dev/ixgbe/ixgbe_mbx.c
head/sys/dev/ixgbe/ixgbe_mbx.h
head/sys/dev/ixgbe/ixgbe_phy.c
head/sys/dev/ixgbe/ixgbe_phy.h
head/sys/dev/ixgbe/ixgbe_type.h
head/sys/dev/ixgbe/ixgbe_vf.c
head/sys/dev/ixgbe/ixgbe_vf.h
head/sys/dev/ixgbe/ixgbe_x540.c
head/sys/dev/ixgbe/ixgbe_x540.h

 Modified: head/sys/amd64/conf/GENERIC
 
 ==
 --- head/sys/amd64/conf/GENERIC Tue Mar 17 15:48:19 2015(r280181)
 +++ head/sys/amd64/conf/GENERIC Tue Mar 17 18:32:28 2015(r280182)
 @@ -216,7 +216,8 @@ device  bxe #
 Broadcom NetXtreme II BC
   devicede  # DEC/Intel DC21x4x
 (``Tulip'')
   deviceem  # Intel PRO/1000 Gigabit
 Ethernet Family
   deviceigb # Intel PRO/1000 PCIE
 Server Gigabit Family
 -device ixgbe   # Intel PRO/10GbE PCIE Ethernet
 Family
 +device ix  # Intel PRO/10GbE PCIE PF Ethernet
 +device ixv # Intel PRO/10GbE PCIE VF Ethernet
   deviceixl # Intel XL710 40Gbe PCIE
 Ethernet
   deviceixlv# Intel XL710 40Gbe VF
 PCIE Ethernet
   devicele  # AMD Am7900 LANCE and
 Am79C9xx PCnet

 Modified: head/sys/conf/NOTES
 
 ==
 --- head/sys/conf/NOTES Tue Mar 17 15:48:19 2015(r280181)
 +++ head/sys/conf/NOTES Tue Mar 17 18:32:28 2015(r280182)
 @@ -2100,7 +2100,8 @@ devicede  # DEC/Intel
 DC21x4x (``Tulip
   deviceem  # Intel Pro/1000 Gigabit Ethernet
   deviceigb # Intel Pro/1000 PCIE Gigabit
 Ethernet
   deviceixgb# Intel Pro/10Gbe PCI-X Ethernet
 -device ixgbe   # Intel Pro/10Gbe PCIE Ethernet
 +device ix  # Intel Pro/10Gbe PCIE Ethernet
 +device ixv # Intel Pro/10Gbe PCIE Ethernet VF
   devicele  # AMD Am7900 LANCE and Am79C9xx
 PCnet
   devicemxge# Myricom Myri-10G 10GbE NIC
   devicenxge# Neterion Xframe 10GbE
 Server/Storage Adapter

 Modified: head/sys/conf/files
 

Re: svn commit: r280182 - in head/sys: amd64/conf conf dev/ixgbe modules/ix modules/ixgbe modules/ixv

2015-03-17 Thread Jack Vogel
Am on it fix coming.



On Tue, Mar 17, 2015 at 12:03 PM, Gleb Smirnoff gleb...@freebsd.org wrote:

 On Tue, Mar 17, 2015 at 06:32:29PM +, Jack F Vogel wrote:
 J Author: jfv
 J Date: Tue Mar 17 18:32:28 2015
 J New Revision: 280182
 J URL: https://svnweb.freebsd.org/changeset/base/280182
 J
 J Log:
 J   Update to the Intel ixgbe driver:
 J  - Split the driver into independent pf and vf loadables. This is
 Jin preparation for SRIOV support which will be following shortly.
 JThis also allows us to keep a seperate revision control over the
 Jtwo parts, making for easier sustaining.
 J  - Make the TX/RX code a shared/seperated file, in the old code base
 Jthe ixv code would miss fixes that went into ixgbe, this model
 Jwill eliminate that problem.
 J  - The driver loadables will now match the device names, something
 that
 Jhas been requested for some time.
 J  - Rather than a modules/ixgbe there is now modules/ix and
 modules/ixv
 J  - It will also be possible to make your static kernel with only one
 Jor the other for streamlined installs, or both.
 J
 J   Enjoy!

 Build is broken:

 cd: /usr/src/head/sys/modules/ixgbe: No such file or directory

 --
 Totus tuus, Glebius.

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r277084 - in head/sys: dev/ixl modules/ixl modules/ixlv

2015-01-12 Thread Jack Vogel
Opps, missing chunk, fix coming.

Jack


On Mon, Jan 12, 2015 at 11:47 AM, Bjoern A. Zeeb b...@freebsd.org wrote:


  On 12 Jan 2015, at 18:43 , Jack F Vogel j...@freebsd.org wrote:
 
  Author: jfv
  Date: Mon Jan 12 18:43:34 2015
  New Revision: 277084
  URL: https://svnweb.freebsd.org/changeset/base/277084
 
  Log:
   Intel I40E driver updates:
if_ixl to version 1.3.0, if_ixlv to version 1.2.0
- Major change in both drivers is to add RSS support
- In ixl fix some interface speed related issues, dual
  speed was not changing correctly, KR/X media was not
  displaying correctly (this has a workaround until a
  more robust media handling is in place)
- Add a warning when using Dell NPAR and the speed is
  less than 10G
- Wrap a queue hung message in IXL_DEBUG, as it is non-fatal,
  and without tuning can display excessively
 
   MFC after: 1 week
 
  Modified:
   head/sys/dev/ixl/if_ixl.c
   head/sys/dev/ixl/if_ixlv.c
   head/sys/dev/ixl/ixl.h
   head/sys/dev/ixl/ixl_txrx.c

 There is no M_FLOWID in HEAD anymore.   Build failure.

 
 ==
  --- head/sys/dev/ixl/ixl_txrx.c   Mon Jan 12 18:38:09 2015
 (r277083)
  +++ head/sys/dev/ixl/ixl_txrx.c   Mon Jan 12 18:43:34 2015
 (r277084)
  @@ -66,8 +66,8 @@ ixl_mq_start(struct ifnet *ifp, struct m
struct tx_ring  *txr;
int err, i;
 
  - /* check if flowid is set */
  - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE)
  + /* Which queue to use */
  + if ((m-m_flags  M_FLOWID) != 0)
i = m-m_pkthdr.flowid % vsi-num_queues;
else
i = curcpu % vsi-num_queues;
  @@ -1089,8 +1089,8 @@ int
  ixl_init_rx_ring(struct ixl_queue *que)
  {
struct  rx_ring *rxr = que-rxr;
  - struct ixl_vsi  *vsi = que-vsi;
  #if defined(INET6) || defined(INET)
  + struct ixl_vsi  *vsi = que-vsi;
struct ifnet*ifp = vsi-ifp;
struct lro_ctrl *lro = rxr-lro;
  #endif
  @@ -1543,7 +1543,7 @@ ixl_rxeof(struct ixl_queue *que, int cou
if ((ifp-if_capenable  IFCAP_RXCSUM) != 0)
ixl_rx_checksum(sendmp, status, error,
 ptype);
sendmp-m_pkthdr.flowid = que-msix;
  - M_HASHTYPE_SET(sendmp, M_HASHTYPE_OPAQUE);
  + sendmp-m_flags |= M_FLOWID;
}
  next_desc:
bus_dmamap_sync(rxr-dma.tag, rxr-dma.map,
 

 --
 Bjoern A. Zeeb  Charles Haddon Spurgeon:
 Friendship is one of the sweetest joys of life.  Many might have failed
  beneath the bitterness of their trial  had they not found a friend.


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r275431 - in head/sys/dev: e1000 ixgbe

2014-12-02 Thread Jack Vogel
Just to make it clear, I am not opposed to what this code was trying to do,
in
fact I think its a pretty cool idea, but I think it can be implemented more
cleanly.

Eric and myself will be discussing the details.

Jack


On Tue, Dec 2, 2014 at 3:02 PM, Jack F Vogel j...@freebsd.org wrote:

 Author: jfv
 Date: Tue Dec  2 23:02:57 2014
 New Revision: 275431
 URL: https://svnweb.freebsd.org/changeset/base/275431

 Log:
   Revert r275136, it was not approved, it was sloppy, if a feature
   like this is needed please resubmit for Intel's approval.

 Modified:
   head/sys/dev/e1000/if_igb.c
   head/sys/dev/ixgbe/ixgbe.c

 Modified: head/sys/dev/e1000/if_igb.c

 ==
 --- head/sys/dev/e1000/if_igb.c Tue Dec  2 22:35:43 2014(r275430)
 +++ head/sys/dev/e1000/if_igb.c Tue Dec  2 23:02:57 2014(r275431)
 @@ -188,7 +188,6 @@ static char *igb_strings[] = {
  /*
   *  Function prototypes
   */
 -static int igb_per_unit_num_queues(SYSCTL_HANDLER_ARGS);
  static int igb_probe(device_t);
  static int igb_attach(device_t);
  static int igb_detach(device_t);
 @@ -494,11 +493,6 @@ igb_attach(device_t dev)
 OID_AUTO, nvm, CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
 igb_sysctl_nvm_info, I, NVM Information);

 -SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
 -SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 -   OID_AUTO, num_queues, CTLTYPE_INT | CTLFLAG_RD,
 -   adapter, 0, igb_per_unit_num_queues, I, Number
 of Queues);
 -
 igb_set_sysctl_value(adapter, enable_aim,
 Interrupt Moderation, adapter-enable_aim,
 igb_enable_aim);
 @@ -2837,7 +2831,6 @@ igb_setup_msix(struct adapter *adapter)
  {
 device_tdev = adapter-dev;
 int bar, want, queues, msgs, maxqueues;
 -   int n_queues;

 /* tuneable override */
 if (igb_enable_msix == 0)
 @@ -2865,18 +2858,11 @@ igb_setup_msix(struct adapter *adapter)
 goto msi;
 }

 -   n_queues = 0;
 -   /* try more specific tunable, then global, then finally default to
 boot time tunable if set. */
 -   if (device_getenv_int(dev, num_queues, n_queues) != 0) {
 -   device_printf(dev, using specific tunable num_queues=%d,
 n_queues);
 -   } else if (TUNABLE_INT_FETCH(hw.igb.num_queues, n_queues) != 0)
 {
 -   if (igb_num_queues != n_queues) {
 -   device_printf(dev, using global tunable
 hw.igb.num_queues=%d, n_queues);
 -   igb_num_queues = n_queues;
 -   }
 -   } else {
 -   n_queues = igb_num_queues;
 -   }
 +   queues = (mp_ncpus  (msgs-1)) ? (msgs-1) : mp_ncpus;
 +
 +   /* Override via tuneable */
 +   if (igb_num_queues != 0)
 +   queues = igb_num_queues;

  #ifdef RSS
 /* If we're doing RSS, clamp at the number of RSS buckets */
 @@ -2884,12 +2870,6 @@ igb_setup_msix(struct adapter *adapter)
 queues = rss_getnumbuckets();
  #endif

 -   if (n_queues != 0) {
 -   queues = n_queues;
 -   } else {
 -   /* Figure out a reasonable auto config value */
 -   queues = (mp_ncpus  (msgs-1)) ? (msgs-1) : mp_ncpus;
 -   }

 /* Sanity check based on HW */
 switch (adapter-hw.mac.type) {
 @@ -2912,17 +2892,10 @@ igb_setup_msix(struct adapter *adapter)
 maxqueues = 1;
 break;
 }
 -   if (queues  maxqueues) {
 -   device_printf(adapter-dev, requested %d queues, but max
 for this adapter is %d\n,
 -   queues, maxqueues);
 +
 +   /* Final clamp on the actual hardware capability */
 +   if (queues  maxqueues)
 queues = maxqueues;
 -   } else if (queues == 0) {
 -   queues = 1;
 -   } else if (queues  0) {
 -   device_printf(adapter-dev, requested %d queues, but min
 for this adapter is %d\n,
 -   queues, 1);
 -   queues = 1;
 -   }

 /*
 ** One vector (RX/TX pair) per queue
 @@ -6407,14 +6380,3 @@ igb_sysctl_eee(SYSCTL_HANDLER_ARGS)
 IGB_CORE_UNLOCK(adapter);
 return (0);
  }
 -
 -static int
 -igb_per_unit_num_queues(SYSCTL_HANDLER_ARGS)
 -{
 -   struct adapter  *adapter;
 -
 -   adapter = (struct adapter *) arg1;
 -
 -   return sysctl_handle_int(oidp, adapter-num_queues, 0, req);
 -}
 -

 Modified: head/sys/dev/ixgbe/ixgbe.c

 ==
 --- head/sys/dev/ixgbe/ixgbe.c  Tue Dec  2 22:35:43 2014(r275430)
 +++ head/sys/dev/ixgbe/ixgbe.c  Tue Dec  2 

Re: svn commit: r275136 - in head/sys: dev/e1000 dev/ixgbe kern sys

2014-12-01 Thread Jack Vogel
There is no mystery about who's drivers these are, and its not like it would
take a lot of effort to figure out ownership and ask us for review.

Remove this commit until I have had time to look it over!

Jack


On Mon, Dec 1, 2014 at 7:56 AM, Alfred Perlstein bri...@mu.org wrote:



  On Dec 1, 2014, at 7:49 AM, Hans Petter Selasky h...@selasky.org wrote:
 
  On 12/01/14 16:45, Alfred Perlstein wrote:
 
   Hi,
 
  It is quite early, actually:
 
  SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_FIRST, sysctl_register_all, 0);
 
  In some parts of the machine independent, MI, code you neee to keep
 the TUNABLE_FETCH'es, because its run before SI_SUB_KMEM !
 
  Then it will not work unless I move the global n_queues sysctl creation
 into the driver's mod load function.
 
  Is that ok?
 
  Are you asking me?

 In soviet russia no one is ever sure whom to ask for permission to proceed.

 (Also you have significant commits to the driver so it makes sense. )


 
  --HPS
 
 


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r275136 - in head/sys: dev/e1000 dev/ixgbe kern sys

2014-12-01 Thread Jack Vogel
Really, and did I say that I approved, because I do not recall the event?

Jack


On Mon, Dec 1, 2014 at 8:08 AM, Alfred Perlstein bri...@mu.org wrote:

 Jack you were asked.   Please see the review system.

 Sent from my iPhone

 On Dec 1, 2014, at 8:05 AM, Jack Vogel jfvo...@gmail.com wrote:

 There is no mystery about who's drivers these are, and its not like it
 would
 take a lot of effort to figure out ownership and ask us for review.

 Remove this commit until I have had time to look it over!

 Jack


 On Mon, Dec 1, 2014 at 7:56 AM, Alfred Perlstein bri...@mu.org wrote:



  On Dec 1, 2014, at 7:49 AM, Hans Petter Selasky h...@selasky.org
 wrote:
 
  On 12/01/14 16:45, Alfred Perlstein wrote:
 
   Hi,
 
  It is quite early, actually:
 
  SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_FIRST, sysctl_register_all, 0);
 
  In some parts of the machine independent, MI, code you neee to keep
 the TUNABLE_FETCH'es, because its run before SI_SUB_KMEM !
 
  Then it will not work unless I move the global n_queues sysctl
 creation into the driver's mod load function.
 
  Is that ok?
 
  Are you asking me?

 In soviet russia no one is ever sure whom to ask for permission to
 proceed.

 (Also you have significant commits to the driver so it makes sense. )


 
  --HPS
 
 



___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r275136 - in head/sys: dev/e1000 dev/ixgbe kern sys

2014-12-01 Thread Jack Vogel
Not taking it personally, in this case I see some style things I don't
like, and I'm not at all clear
why this is even necessary, what the old way of doing queue config was
missing for instance?

Thanks Steve,

Jack


On Mon, Dec 1, 2014 at 11:04 AM, Steven Hartland ste...@multiplay.co.uk
wrote:


 On 01/12/2014 16:46, Alfred Perlstein wrote:


  On Dec 1, 2014, at 8:37 AM, Hans Petter Selasky h...@selasky.org wrote:

 Hi,

 I think you maybe missed a point 

  On 12/01/14 17:31, Alfred Perlstein wrote:

 Yes that is why it is being done by hand in the probe routine. I think
 proper thing might be a way to sort out how to get tunables to run at a
 driver load event?  Is that possible?

 All sysctls are tried init when they are created, both so-called
 static and dynamic ones.

 If the sysctl is created inside the probe routine and has the tunable
 flag set, it will get init before the creation is complete, if present in
 the boot environment.

 If the sysctl is of a static kind, it will be created and initialized
 when SI_SUB_KMEM is executing!

 I totally understand this. It is in the phabricator review. :)

  As a more general comment, my personal preference when I ask for review
 is that at least one of the reviewers accepts the final revision before I
 commit, but preferably all that have taken part in the discussion. This
 often takes a bit longer and some times takes a little prodding but should
 be worth it in the long run.

 I know I commented on this one but I unfortunately didn't get chance to
 look after changes where made and hence never accepted the revision. Had I
 done so I would have caveat-ed it with it being accepted by Jack or other
 Intel delegate in his absence, so sorry about that Jack.

 No one should take this personally, as know this is still new to everyone,
 but it does raise the wider question of who should be counted as a
 reviewer from phabric and do we need some additional guidelines on this,
 or even better can it be automated?

 Regards
 Steve


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r270806 - head/sys/dev/ixl

2014-08-29 Thread Jack Vogel
I certainly agree that it would be a bit ridiculous to do 40G in a 32bit
environment :)

Jack



On Fri, Aug 29, 2014 at 10:14 AM, Konstantin Belousov kostik...@gmail.com
wrote:

 On Fri, Aug 29, 2014 at 12:40:01PM +, Bjoern A. Zeeb wrote:
  Author: bz
  Date: Fri Aug 29 12:40:01 2014
  New Revision: 270806
  URL: http://svnweb.freebsd.org/changeset/base/270806
 
  Log:
Properly handle prefetch only for amd64 and i386 as we do elsewhere.
 
In general theraven is right that we should factr this out and provide
a general and per-arch implementation that everything can use.
 
MFC after:  3 days
X-MFC with: r270755
 
  Modified:
head/sys/dev/ixl/i40e_osdep.h
 
  Modified: head/sys/dev/ixl/i40e_osdep.h
 
 ==
  --- head/sys/dev/ixl/i40e_osdep.h Fri Aug 29 11:18:54 2014
 (r270805)
  +++ head/sys/dev/ixl/i40e_osdep.h Fri Aug 29 12:40:01 2014
 (r270806)
  @@ -137,11 +137,15 @@ struct i40e_spinlock {
 
   #define le16_to_cpu
 
  +#if defined(__amd64__) || defined(i386)
   static __inline
   void prefetch(void *x)
   {
__asm volatile(prefetcht0 %0 :: m (*(unsigned long *)x));
   }
 This only fix the build failure, but the code is still somewhat wrong.

 Availability of the prefetch instruction depends on the presence of SSE.
 Althought it is probably impossible to find a machine where the intended
 hardware can operate and which does not support SSE _currently_, I am
 not sure that it is wise to hard-code SSE instructions in the i386
 kernel.

 Might be, a change of the compilation test from both amd64 and i386 to
 just amd64 is due.  I doubt that anybody would use 40Gb with 32bit OS,
 and even if somebody does, that the performace is at the stake in
 this case.

  +#else
  +#define  prefetch(x)
  +#endif
 
   struct i40e_osdep
   {

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r270806 - head/sys/dev/ixl

2014-08-29 Thread Jack Vogel
OH, and I just asked the team here, and found out we explicitly do NOT
support any 32 bit environment for this driver.

Jack



On Fri, Aug 29, 2014 at 10:49 AM, Jack Vogel jfvo...@gmail.com wrote:

 I certainly agree that it would be a bit ridiculous to do 40G in a 32bit
 environment :)

 Jack



 On Fri, Aug 29, 2014 at 10:14 AM, Konstantin Belousov kostik...@gmail.com
  wrote:

 On Fri, Aug 29, 2014 at 12:40:01PM +, Bjoern A. Zeeb wrote:
  Author: bz
  Date: Fri Aug 29 12:40:01 2014
  New Revision: 270806
  URL: http://svnweb.freebsd.org/changeset/base/270806
 
  Log:
Properly handle prefetch only for amd64 and i386 as we do elsewhere.
 
In general theraven is right that we should factr this out and provide
a general and per-arch implementation that everything can use.
 
MFC after:  3 days
X-MFC with: r270755
 
  Modified:
head/sys/dev/ixl/i40e_osdep.h
 
  Modified: head/sys/dev/ixl/i40e_osdep.h
 
 ==
  --- head/sys/dev/ixl/i40e_osdep.h Fri Aug 29 11:18:54 2014
 (r270805)
  +++ head/sys/dev/ixl/i40e_osdep.h Fri Aug 29 12:40:01 2014
 (r270806)
  @@ -137,11 +137,15 @@ struct i40e_spinlock {
 
   #define le16_to_cpu
 
  +#if defined(__amd64__) || defined(i386)
   static __inline
   void prefetch(void *x)
   {
__asm volatile(prefetcht0 %0 :: m (*(unsigned long *)x));
   }
 This only fix the build failure, but the code is still somewhat wrong.

 Availability of the prefetch instruction depends on the presence of SSE.
 Althought it is probably impossible to find a machine where the intended
 hardware can operate and which does not support SSE _currently_, I am
 not sure that it is wise to hard-code SSE instructions in the i386
 kernel.

 Might be, a change of the compilation test from both amd64 and i386 to
 just amd64 is due.  I doubt that anybody would use 40Gb with 32bit OS,
 and even if somebody does, that the performace is at the stake in
 this case.

  +#else
  +#define  prefetch(x)
  +#endif
 
   struct i40e_osdep
   {



___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r270631 - in stable/10/sys: conf dev/ixl modules/ixl modules/ixlv

2014-08-25 Thread Jack Vogel
Not yet, only the README, there will be a manual page coming soon I hope.

Jack



On Mon, Aug 25, 2014 at 3:19 PM, Glen Barber g...@freebsd.org wrote:

 On Mon, Aug 25, 2014 at 10:04:29PM +, Jack F Vogel wrote:
  Author: jfv
  Date: Mon Aug 25 22:04:29 2014
  New Revision: 270631
  URL: http://svnweb.freebsd.org/changeset/base/270631
 
  Log:
MFC of the Intel Base driver for the Intel XL710 Ethernet Controller
 Family
- It was decided to change the driver name to if_ixl for FreeBSD
- This release adds the VF Driver to the tree, it can be built into
  the kernel or as the if_ixlv module
- The VF driver is independent for the first time, this will be
  desireable when full SRIOV capability is added to the OS.
 
Submitted by:   jack.vo...@intel.com and eric.joy...@intel.com
 

 Is there a manual page for ixl to go along with this?

 Glen


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r266423 - in head/sys: conf dev/i40e modules/i40e

2014-05-20 Thread Jack Vogel
If you don't like the name there's this wonderful feature of ifconfig

ifconfig i40e0 name eth0 (or whatever pleases you...)

Oh and Bruce, I did run into the string length issue, so with this driver
the queues
are all named 'q%d', I might go back and change the earlier drivers.

I found the 'too long' strings caused some really weird behavior with
vmstat once
you had 32 queues, btw.

Jack



On Tue, May 20, 2014 at 8:49 AM, Bruce Evans b...@optusnet.com.au wrote:

 On Tue, 20 May 2014, Julian Elischer wrote:

  On 5/20/14, 11:14 PM, Julian Elischer wrote:

 On 5/20/14, 1:50 AM, Rui Paulo wrote:

 On 18 May 2014, at 18:41, Julian Elischer jul...@freebsd.org wrote:

  On 5/19/14, 9:21 AM, Jack F Vogel wrote:

 Author: jfv
 Date: Mon May 19 01:21:02 2014
 New Revision: 266423
 URL: http://svnweb.freebsd.org/changeset/base/266423

 Log:
This is the beta release of the driver for the new
Intel 40G Ethernet Controller XL710 Family. This is
the core driver, a VF driver called i40evf, will be
following soon. Questions or comments to myself or
my co-developer Eric Joyner. Cheers!

 love the name..

 Aesthetics aside, I think the name should be changed.  Network drivers
 always used [a-z] for name and [0-9] for unit.  Can you find an example
 where this is not true?


 I just meant the XL (Roman Numeral 40) part..


 sorry to have caused this fuss jsut because I like the use of the common
 XL name to (in this case) hint at 40.
 the device name in netstat could be ixlgNNN  (intel 40gig) even if the
 device is aimed at the 710 (and later 720 etc..)


 Then the correct name is xlN, but unfortunately ;) wpaul already used up
 most
 of the 2-letter namespace (xl went in 1998).  ixl would be OK.

 Bruce

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r259642 - head/sys/netinet

2013-12-20 Thread Jack Vogel
I agree with Gleb, ifdef 0 is silly, after all, that's why we have source
history, its
not like the offending code is gone forever :) So I guess its both of us
muttering Gleb :)

Jack



On Fri, Dec 20, 2013 at 9:05 AM, Adrian Chadd adr...@freebsd.org wrote:

 On 20 December 2013 00:44, Gleb Smirnoff gleb...@freebsd.org wrote:

  I didn't get to review of actual patch, but IMO it would be better
  just to remove the code, not ifdef 0 it. The code ifdefed has zero
  probability to be enabled in its current form. If we ever fix it, code
  would look very different.
 
  No reason to do followup commit, that was just me muttering.

 I figured it would be nicer in the short term to #if 0 it out whilst
 some other discussions went on, just to make it really obvious in the
 short term where the check was done. It's quite possible I'll
 eventually just trim it entirely out.

 Thanks,


 -a

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r247430 - in stable/8/sys: conf dev/e1000 modules/em modules/igb

2013-02-27 Thread Jack Vogel
Oh, that's odd, then HEAD should be broken too, do you have more detail?

Jack


On Wed, Feb 27, 2013 at 6:23 PM, Glen Barber g...@freebsd.org wrote:

 Jack,

 This commit seems to break the build for at least powerpc and sparc64.

 Glen

 On Thu, Feb 28, 2013 at 12:22:04AM +, Jack F Vogel wrote:
  Author: jfv
  Date: Thu Feb 28 00:22:04 2013
  New Revision: 247430
  URL: http://svnweb.freebsd.org/changeset/base/247430
 
  Log:
MFC of the E1000 drivers to STABLE/8, this includes the follow
 revisions
plus a few tweaks:
 196969,196970,211516,214646,215781,215789,215808,215910,223350,
 223482,223831,228281,228393,229939,231796,232238,234665,235256,
 236406,238148,238151,238214,238765,238770,238953,238981,239105,
 239109,239304,240518,240693,240968,241037,241856,241885,243570,
 243857,245334,246128,246482,247064
 
  Added:
stable/8/sys/dev/e1000/e1000_i210.c
   - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.c
stable/8/sys/dev/e1000/e1000_i210.h
   - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.h
  Modified:
stable/8/sys/conf/files
stable/8/sys/dev/e1000/e1000_82541.c
stable/8/sys/dev/e1000/e1000_82543.c
stable/8/sys/dev/e1000/e1000_82571.c
stable/8/sys/dev/e1000/e1000_82575.c
stable/8/sys/dev/e1000/e1000_82575.h
stable/8/sys/dev/e1000/e1000_api.c
stable/8/sys/dev/e1000/e1000_api.h
stable/8/sys/dev/e1000/e1000_defines.h
stable/8/sys/dev/e1000/e1000_hw.h
stable/8/sys/dev/e1000/e1000_ich8lan.c
stable/8/sys/dev/e1000/e1000_ich8lan.h
stable/8/sys/dev/e1000/e1000_mac.c
stable/8/sys/dev/e1000/e1000_mac.h
stable/8/sys/dev/e1000/e1000_manage.c
stable/8/sys/dev/e1000/e1000_manage.h
stable/8/sys/dev/e1000/e1000_nvm.c
stable/8/sys/dev/e1000/e1000_nvm.h
stable/8/sys/dev/e1000/e1000_osdep.h
stable/8/sys/dev/e1000/e1000_phy.c
stable/8/sys/dev/e1000/e1000_phy.h
stable/8/sys/dev/e1000/e1000_regs.h
stable/8/sys/dev/e1000/if_em.c   (contents, props changed)
stable/8/sys/dev/e1000/if_igb.c   (contents, props changed)
stable/8/sys/dev/e1000/if_igb.h
stable/8/sys/dev/e1000/if_lem.c
stable/8/sys/modules/em/Makefile
stable/8/sys/modules/igb/Makefile
  Directory Properties:
stable/8/sys/dev/e1000/   (props changed)
 
  Modified: stable/8/sys/conf/files
 
 ==
  --- stable/8/sys/conf/files   Thu Feb 28 00:18:56 2013(r247429)
  +++ stable/8/sys/conf/files   Thu Feb 28 00:22:04 2013(r247430)
  @@ -920,6 +920,8 @@ dev/e1000/e1000_82575.c   optional em | i
compile-with ${NORMAL_C} -I$S/dev/e1000
   dev/e1000/e1000_ich8lan.coptional em | igb \
compile-with ${NORMAL_C} -I$S/dev/e1000
  +dev/e1000/e1000_i210.c   optional em | igb \
  + compile-with ${NORMAL_C} -I$S/dev/e1000
   dev/e1000/e1000_api.coptional em | igb \
compile-with ${NORMAL_C} -I$S/dev/e1000
   dev/e1000/e1000_mac.coptional em | igb \
 
  Modified: stable/8/sys/dev/e1000/e1000_82541.c
 
 ==
  --- stable/8/sys/dev/e1000/e1000_82541.c  Thu Feb 28 00:18:56 2013
  (r247429)
  +++ stable/8/sys/dev/e1000/e1000_82541.c  Thu Feb 28 00:22:04 2013
  (r247430)
  @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st
 * of MAC speed/duplex configuration.  So we only need to
 * configure Collision Distance in the MAC.
 */
  - e1000_config_collision_dist_generic(hw);
  + mac-ops.config_collision_dist(hw);
 
/*
 * Configure Flow Control now that Auto-Neg has completed.
 
  Modified: stable/8/sys/dev/e1000/e1000_82543.c
 
 ==
  --- stable/8/sys/dev/e1000/e1000_82543.c  Thu Feb 28 00:18:56 2013
  (r247429)
  +++ stable/8/sys/dev/e1000/e1000_82543.c  Thu Feb 28 00:22:04 2013
  (r247430)
  @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543
DEBUGOUT(Valid link established!!!\n);
/* Config the MAC and PHY after link is up */
if (hw-mac.type == e1000_82544) {
  - e1000_config_collision_dist_generic(hw);
  + hw-mac.ops.config_collision_dist(hw);
} else {
ret_val = e1000_config_mac_to_phy_82543(hw);
if (ret_val)
  @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543(
/* Take the link out of reset */
ctrl = ~E1000_CTRL_LRST;
 
  - e1000_config_collision_dist_generic(hw);
  + hw-mac.ops.config_collision_dist(hw);
 
ret_val = e1000_commit_fc_settings_generic(hw);
if (ret_val)
  @@ -1259,7 +1259,7 @@ static s32 e1000_check_for_copper_link_8
 * settings.
 */
if (mac-type == 

Re: svn commit: r247430 - in stable/8/sys: conf dev/e1000 modules/em modules/igb

2013-02-27 Thread Jack Vogel
LOL, I would see the messages just as I sent this, never mind.

Jack


On Wed, Feb 27, 2013 at 9:39 PM, Jack Vogel jfvo...@gmail.com wrote:

 Oh, that's odd, then HEAD should be broken too, do you have more detail?

 Jack


 On Wed, Feb 27, 2013 at 6:23 PM, Glen Barber g...@freebsd.org wrote:

 Jack,

 This commit seems to break the build for at least powerpc and sparc64.

 Glen

 On Thu, Feb 28, 2013 at 12:22:04AM +, Jack F Vogel wrote:
  Author: jfv
  Date: Thu Feb 28 00:22:04 2013
  New Revision: 247430
  URL: http://svnweb.freebsd.org/changeset/base/247430
 
  Log:
MFC of the E1000 drivers to STABLE/8, this includes the follow
 revisions
plus a few tweaks:
 196969,196970,211516,214646,215781,215789,215808,215910,223350,
 223482,223831,228281,228393,229939,231796,232238,234665,235256,
 236406,238148,238151,238214,238765,238770,238953,238981,239105,
 239109,239304,240518,240693,240968,241037,241856,241885,243570,
 243857,245334,246128,246482,247064
 
  Added:
stable/8/sys/dev/e1000/e1000_i210.c
   - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.c
stable/8/sys/dev/e1000/e1000_i210.h
   - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.h
  Modified:
stable/8/sys/conf/files
stable/8/sys/dev/e1000/e1000_82541.c
stable/8/sys/dev/e1000/e1000_82543.c
stable/8/sys/dev/e1000/e1000_82571.c
stable/8/sys/dev/e1000/e1000_82575.c
stable/8/sys/dev/e1000/e1000_82575.h
stable/8/sys/dev/e1000/e1000_api.c
stable/8/sys/dev/e1000/e1000_api.h
stable/8/sys/dev/e1000/e1000_defines.h
stable/8/sys/dev/e1000/e1000_hw.h
stable/8/sys/dev/e1000/e1000_ich8lan.c
stable/8/sys/dev/e1000/e1000_ich8lan.h
stable/8/sys/dev/e1000/e1000_mac.c
stable/8/sys/dev/e1000/e1000_mac.h
stable/8/sys/dev/e1000/e1000_manage.c
stable/8/sys/dev/e1000/e1000_manage.h
stable/8/sys/dev/e1000/e1000_nvm.c
stable/8/sys/dev/e1000/e1000_nvm.h
stable/8/sys/dev/e1000/e1000_osdep.h
stable/8/sys/dev/e1000/e1000_phy.c
stable/8/sys/dev/e1000/e1000_phy.h
stable/8/sys/dev/e1000/e1000_regs.h
stable/8/sys/dev/e1000/if_em.c   (contents, props changed)
stable/8/sys/dev/e1000/if_igb.c   (contents, props changed)
stable/8/sys/dev/e1000/if_igb.h
stable/8/sys/dev/e1000/if_lem.c
stable/8/sys/modules/em/Makefile
stable/8/sys/modules/igb/Makefile
  Directory Properties:
stable/8/sys/dev/e1000/   (props changed)
 
  Modified: stable/8/sys/conf/files
 
 ==
  --- stable/8/sys/conf/files   Thu Feb 28 00:18:56 2013(r247429)
  +++ stable/8/sys/conf/files   Thu Feb 28 00:22:04 2013(r247430)
  @@ -920,6 +920,8 @@ dev/e1000/e1000_82575.c   optional em | i
compile-with ${NORMAL_C} -I$S/dev/e1000
   dev/e1000/e1000_ich8lan.coptional em | igb \
compile-with ${NORMAL_C} -I$S/dev/e1000
  +dev/e1000/e1000_i210.c   optional em | igb \
  + compile-with ${NORMAL_C} -I$S/dev/e1000
   dev/e1000/e1000_api.coptional em | igb \
compile-with ${NORMAL_C} -I$S/dev/e1000
   dev/e1000/e1000_mac.coptional em | igb \
 
  Modified: stable/8/sys/dev/e1000/e1000_82541.c
 
 ==
  --- stable/8/sys/dev/e1000/e1000_82541.c  Thu Feb 28 00:18:56 2013
(r247429)
  +++ stable/8/sys/dev/e1000/e1000_82541.c  Thu Feb 28 00:22:04 2013
(r247430)
  @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st
 * of MAC speed/duplex configuration.  So we only need to
 * configure Collision Distance in the MAC.
 */
  - e1000_config_collision_dist_generic(hw);
  + mac-ops.config_collision_dist(hw);
 
/*
 * Configure Flow Control now that Auto-Neg has completed.
 
  Modified: stable/8/sys/dev/e1000/e1000_82543.c
 
 ==
  --- stable/8/sys/dev/e1000/e1000_82543.c  Thu Feb 28 00:18:56 2013
(r247429)
  +++ stable/8/sys/dev/e1000/e1000_82543.c  Thu Feb 28 00:22:04 2013
(r247430)
  @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543
DEBUGOUT(Valid link established!!!\n);
/* Config the MAC and PHY after link is up */
if (hw-mac.type == e1000_82544) {
  - e1000_config_collision_dist_generic(hw);
  + hw-mac.ops.config_collision_dist(hw);
} else {
ret_val = e1000_config_mac_to_phy_82543(hw);
if (ret_val)
  @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543(
/* Take the link out of reset */
ctrl = ~E1000_CTRL_LRST;
 
  - e1000_config_collision_dist_generic(hw);
  + hw-mac.ops.config_collision_dist(hw);
 
ret_val

Re: svn commit: r247430 - in stable/8/sys: conf dev/e1000 modules/em modules/igb

2013-02-27 Thread Jack Vogel
I am checking with Luigi to see if an MFC of his code is a viable solution,
if not I
will change my core code. Stay tuned...

Jack


On Wed, Feb 27, 2013 at 9:41 PM, Jack Vogel jfvo...@gmail.com wrote:

 LOL, I would see the messages just as I sent this, never mind.

 Jack


 On Wed, Feb 27, 2013 at 9:39 PM, Jack Vogel jfvo...@gmail.com wrote:

 Oh, that's odd, then HEAD should be broken too, do you have more detail?

 Jack


 On Wed, Feb 27, 2013 at 6:23 PM, Glen Barber g...@freebsd.org wrote:

 Jack,

 This commit seems to break the build for at least powerpc and sparc64.

 Glen

 On Thu, Feb 28, 2013 at 12:22:04AM +, Jack F Vogel wrote:
  Author: jfv
  Date: Thu Feb 28 00:22:04 2013
  New Revision: 247430
  URL: http://svnweb.freebsd.org/changeset/base/247430
 
  Log:
MFC of the E1000 drivers to STABLE/8, this includes the follow
 revisions
plus a few tweaks:
 196969,196970,211516,214646,215781,215789,215808,215910,223350,
 223482,223831,228281,228393,229939,231796,232238,234665,235256,
 236406,238148,238151,238214,238765,238770,238953,238981,239105,
 239109,239304,240518,240693,240968,241037,241856,241885,243570,
 243857,245334,246128,246482,247064
 
  Added:
stable/8/sys/dev/e1000/e1000_i210.c
   - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.c
stable/8/sys/dev/e1000/e1000_i210.h
   - copied, changed from r238148, head/sys/dev/e1000/e1000_i210.h
  Modified:
stable/8/sys/conf/files
stable/8/sys/dev/e1000/e1000_82541.c
stable/8/sys/dev/e1000/e1000_82543.c
stable/8/sys/dev/e1000/e1000_82571.c
stable/8/sys/dev/e1000/e1000_82575.c
stable/8/sys/dev/e1000/e1000_82575.h
stable/8/sys/dev/e1000/e1000_api.c
stable/8/sys/dev/e1000/e1000_api.h
stable/8/sys/dev/e1000/e1000_defines.h
stable/8/sys/dev/e1000/e1000_hw.h
stable/8/sys/dev/e1000/e1000_ich8lan.c
stable/8/sys/dev/e1000/e1000_ich8lan.h
stable/8/sys/dev/e1000/e1000_mac.c
stable/8/sys/dev/e1000/e1000_mac.h
stable/8/sys/dev/e1000/e1000_manage.c
stable/8/sys/dev/e1000/e1000_manage.h
stable/8/sys/dev/e1000/e1000_nvm.c
stable/8/sys/dev/e1000/e1000_nvm.h
stable/8/sys/dev/e1000/e1000_osdep.h
stable/8/sys/dev/e1000/e1000_phy.c
stable/8/sys/dev/e1000/e1000_phy.h
stable/8/sys/dev/e1000/e1000_regs.h
stable/8/sys/dev/e1000/if_em.c   (contents, props changed)
stable/8/sys/dev/e1000/if_igb.c   (contents, props changed)
stable/8/sys/dev/e1000/if_igb.h
stable/8/sys/dev/e1000/if_lem.c
stable/8/sys/modules/em/Makefile
stable/8/sys/modules/igb/Makefile
  Directory Properties:
stable/8/sys/dev/e1000/   (props changed)
 
  Modified: stable/8/sys/conf/files
 
 ==
  --- stable/8/sys/conf/files   Thu Feb 28 00:18:56 2013(r247429)
  +++ stable/8/sys/conf/files   Thu Feb 28 00:22:04 2013(r247430)
  @@ -920,6 +920,8 @@ dev/e1000/e1000_82575.c   optional em | i
compile-with ${NORMAL_C} -I$S/dev/e1000
   dev/e1000/e1000_ich8lan.coptional em | igb \
compile-with ${NORMAL_C} -I$S/dev/e1000
  +dev/e1000/e1000_i210.c   optional em | igb \
  + compile-with ${NORMAL_C} -I$S/dev/e1000
   dev/e1000/e1000_api.coptional em | igb \
compile-with ${NORMAL_C} -I$S/dev/e1000
   dev/e1000/e1000_mac.coptional em | igb \
 
  Modified: stable/8/sys/dev/e1000/e1000_82541.c
 
 ==
  --- stable/8/sys/dev/e1000/e1000_82541.c  Thu Feb 28 00:18:56 2013
(r247429)
  +++ stable/8/sys/dev/e1000/e1000_82541.c  Thu Feb 28 00:22:04 2013
(r247430)
  @@ -642,7 +642,7 @@ static s32 e1000_check_for_link_82541(st
 * of MAC speed/duplex configuration.  So we only need to
 * configure Collision Distance in the MAC.
 */
  - e1000_config_collision_dist_generic(hw);
  + mac-ops.config_collision_dist(hw);
 
/*
 * Configure Flow Control now that Auto-Neg has completed.
 
  Modified: stable/8/sys/dev/e1000/e1000_82543.c
 
 ==
  --- stable/8/sys/dev/e1000/e1000_82543.c  Thu Feb 28 00:18:56 2013
(r247429)
  +++ stable/8/sys/dev/e1000/e1000_82543.c  Thu Feb 28 00:22:04 2013
(r247430)
  @@ -1126,7 +1126,7 @@ static s32 e1000_setup_copper_link_82543
DEBUGOUT(Valid link established!!!\n);
/* Config the MAC and PHY after link is up */
if (hw-mac.type == e1000_82544) {
  - e1000_config_collision_dist_generic(hw);
  + hw-mac.ops.config_collision_dist(hw);
} else {
ret_val = e1000_config_mac_to_phy_82543(hw);
if (ret_val)
  @@ -1160,7 +1160,7 @@ static s32 e1000_setup_fiber_link_82543(
/* Take

Re: svn commit: r247035 - head/sys/dev/ixgbe

2013-02-20 Thread Jack Vogel
OK, this change must be backed out. This was not run past me, and this is a
shared code
file, that means its code that we license in both GPL, BSD, and closed
source licensing,
and thus we CANNOT accept changes without special handling. Further, I do
not author
this code, its done by another team internally, and I simply accept it as a
component.

If someone feels a change needs to happen the way to handle it is to send
email to me
to discuss it, I need to have it reviewed internally by the full
development team, and a
special waiver from the author will be needed to handle the licensing.

So, please uncommit this.

Jack


On Wed, Feb 20, 2013 at 4:59 AM, Dag-Erling Smørgrav d...@freebsd.orgwrote:

 Author: des
 Date: Wed Feb 20 12:59:21 2013
 New Revision: 247035
 URL: http://svnweb.freebsd.org/changeset/base/247035

 Log:
   Reduce excessive nesting.

 Modified:
   head/sys/dev/ixgbe/ixgbe_phy.c

 Modified: head/sys/dev/ixgbe/ixgbe_phy.c

 ==
 --- head/sys/dev/ixgbe/ixgbe_phy.c  Wed Feb 20 12:40:26 2013
  (r247034)
 +++ head/sys/dev/ixgbe/ixgbe_phy.c  Wed Feb 20 12:59:21 2013
  (r247035)
 @@ -1194,25 +1194,23 @@ s32 ixgbe_identify_sfp_module_generic(st
 /* Make sure we're a supported PHY type */
 if (hw-phy.type == ixgbe_phy_sfp_intel) {
 status = IXGBE_SUCCESS;
 +   } else if (hw-allow_unsupported_sfp == TRUE) {
 +   EWARN(hw, WARNING: Intel (R) Network 
 +   Connections are quality tested 
 +   using Intel (R) Ethernet Optics.
 +Using untested modules is not 
 +   supported and may cause unstable
 +operation or damage to the 
 +   module or the adapter. Intel 
 +   Corporation is not responsible 
 +   for any harm caused by using 
 +   untested modules.\n, status);
 +   status = IXGBE_SUCCESS;
 } else {
 -   if (hw-allow_unsupported_sfp == TRUE) {
 -   EWARN(hw, WARNING: Intel (R)
 Network 
 - Connections are quality
 tested 
 - using Intel (R) Ethernet
 Optics.
 -  Using untested modules is
 not 
 - supported and may cause
 unstable
 -  operation or damage to the
 
 - module or the adapter.
 Intel 
 - Corporation is not
 responsible 
 - for any harm caused by
 using 
 - untested modules.\n,
 status);
 -   status = IXGBE_SUCCESS;
 -   } else {
 -   DEBUGOUT(SFP+ module not
 supported\n);
 -   hw-phy.type =
 -   ixgbe_phy_sfp_unsupported;
 -   status =
 IXGBE_ERR_SFP_NOT_SUPPORTED;
 -   }
 +   DEBUGOUT(SFP+ module not supported\n);
 +   hw-phy.type =
 +   ixgbe_phy_sfp_unsupported;
 +   status = IXGBE_ERR_SFP_NOT_SUPPORTED;
 }
 } else {
 status = IXGBE_SUCCESS;

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r247035 - head/sys/dev/ixgbe

2013-02-20 Thread Jack Vogel
No, I'm not confused, I am the owner of the driver, and keep the FreeBSD
code
and the Intel code in sync, any changes to the code should be run by me
first.

Jack


On Wed, Feb 20, 2013 at 10:57 AM, Dag-Erling Smørgrav d...@des.no wrote:

 Jack Vogel jfvo...@gmail.com writes:
  OK, this change must be backed out. This was not run past me, and this
  is a shared code file, that means its code that we license in both
  GPL, BSD, and closed source licensing, and thus we CANNOT accept
  changes without special handling. Further, I do not author this code,
  its done by another team internally, and I simply accept it as a
  component.

 I think you're confused.  I did not commit this to Intel's code
 repository.  I committed it to FreeBSD's code repository as a precursor
 to a slightly more extensive patch which I intend to commit once I've
 tested it more thoroughly.

 DES
 --
 Dag-Erling Smørgrav - d...@des.no

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r247035 - head/sys/dev/ixgbe

2013-02-20 Thread Jack Vogel
My attitude? And what part of courtesy were you missing, did I make comments
about you or your behavior. At this point I'd say you owe me an apology as
well
as the uncommit.

Jack

On Wed, Feb 20, 2013 at 11:07 AM, Dag-Erling Smørgrav d...@des.no wrote:

 Juli Mallett jmall...@freebsd.org writes:
  Please don't.  Many others have accepted/respected Jack's
  maintainership by letting him keep control of the in-tree driver as
  much as is possible, particularly outside of ixgbe.c.

 Jack claims to have a hard lock on the driver.  While not unheard of, it
 is somewhat unusual, and there is no documentation of it anywhere -
 neither in MAINTAINERS nor in the README or LICENSE files which
 accompany the driver.

 He also needs to work on his attitude.

 DES
 --
 Dag-Erling Smørgrav - d...@des.no

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r243714 - in head/sys/dev: ixgbe netmap

2012-12-01 Thread Jack Vogel
On Sat, Dec 1, 2012 at 12:40 AM, Andre Oppermann an...@freebsd.org wrote:

 On 30.11.2012 23:19, Jack F Vogel wrote:

 Author: jfv
 Date: Fri Nov 30 22:19:18 2012
 New Revision: 243714
 URL: 
 http://svnweb.freebsd.org/**changeset/base/243714http://svnweb.freebsd.org/changeset/base/243714

 Log:
First of a series of 11 patches leading to new ixgbe version 2.5.0
This removes the header split and supporting code from the driver.


 You did this because the datasheet says the header split feature is
 not supported and using it gives unpredictable results?


I'm not sure what the datasheet says, but yes there is a hardware issue
on some of the 10G adapters if using header split. I have left the code in
in a disabled state for a long time, thinking it would be there as example
code, but I think it best to remove it and simplify the code at this point.
Oh, and yes, results have always been mixed with the feature in my
experience anyway.

Regards,

Jack
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r238765 - head/sys/dev/e1000

2012-07-31 Thread Jack Vogel
Yes, I agree John, that was ugly, I'm already taking care of it with my
changes,
I'll send you a copy to check out.

Jack


On Tue, Jul 31, 2012 at 9:12 AM, John Baldwin j...@freebsd.org wrote:

 On Tuesday, July 31, 2012 11:16:07 am Garrett Cooper wrote:
  On Tue, Jul 31, 2012 at 8:13 AM, Andrey Zonov and...@zonov.org wrote:
   On 7/28/12 2:09 AM, Adrian Chadd wrote:
  
   Hi,
  
   Can you please revert this commit for now?
  
   * it has some netmap stuff in it that isn't related to the commit;
   * it's causing panics due to lock recursion;
  
  
   I can confirm panics with the latest HEAD running under ESX.
  
   _mtx_lock_sleep: recursed on non-recursive mutex em0 @
   /usr/src/sys/dev/e1000/if_lem.c:881
  
   Tracing pid 12 tid 100030 td 0xfe0002960480
   kdb_enter() at kdb_enter+0x3b
   panic() at panic+0x1d1
   _mtx_lock_sleep() at _mtx_lock_sleep+0x35f
   _mtx_lock_flags() at _mtx_lock_flags+0x111
   lem_start() at lem_start+0x34
   if_transmit() at if_transmit+0xd6
   ether_output_frame() at ether_output_frame+0x45
   ether_output() at ether_output+0x548
   arpintr() at arpintr+0x10c1
   netisr_dispatch_src() at netisr_dispatch_src+0x152
   ether_demux() at ether_demux+0x18d
   ether_nh_input() at ether_nh_input+0x290
   netisr_dispatch_src() at netisr_dispatch_src+0x152
   lem_intr() at lem_intr+0x3ba
   intr_event_execute_handlers() at intr_event_execute_handlers+0x6a
   ithread_loop() at ithread_loop+0xab
   fork_exit() at fork_exit+0x135
   fork_trampoline() at fork_trampoline+0xe
   --- trap 0, rip = 0, rsp = 0xff8000301cb0, rbp = 0 ---
 
 
 http://lists.freebsd.org/pipermail/freebsd-current/2012-July/035593.html

 I'd prefer you not add the 'locked' variable, but instead have the normal
 code
 path just return before the 'out' label.

 --
 John Baldwin

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r238765 - head/sys/dev/e1000

2012-07-31 Thread Jack Vogel
 @@
 return (ENXIO);
 }

-#ifdef EM_LEGACY_IRQ
-/* We do Legacy setup */
-if ((error = bus_setup_intr(dev, adapter-res[0],
-INTR_TYPE_NET | INTR_MPSAFE, NULL, lem_intr, adapter,
-adapter-tag[0])) != 0) {
-device_printf(dev, Failed to register interrupt handler);
-return (error);
+/* Do Legacy setup? */
+if (lem_use_legacy_irq) {
+if ((error = bus_setup_intr(dev, adapter-res[0],
+INTR_TYPE_NET | INTR_MPSAFE, NULL, lem_intr, adapter,
+adapter-tag[0])) != 0) {
+device_printf(dev,
+Failed to register interrupt handler);
+return (error);
+}
+return (0);
 }

-#else /* FAST_IRQ */
 /*
- * Try allocating a fast interrupt and the associated deferred
- * processing contexts.
+ * Use a Fast interrupt and the associated
+ * deferred processing contexts.
  */
 TASK_INIT(adapter-rxtx_task, 0, lem_handle_rxtx, adapter);
 TASK_INIT(adapter-link_task, 0, lem_handle_link, adapter);
@@ -2244,7 +2223,6 @@
 adapter-tq = NULL;
 return (error);
 }
-#endif  /* EM_LEGACY_IRQ */

 return (0);
 }
@@ -3302,20 +3280,6 @@
 E1000_WRITE_REG(adapter-hw, E1000_ITR, DEFAULT_ITR);
 }

-/*
-** When using MSIX interrupts we need to throttle
-** using the EITR register (82574 only)
-*/
-if (adapter-msix)
-for (int i = 0; i  4; i++)
-E1000_WRITE_REG(adapter-hw,
-E1000_EITR_82574(i), DEFAULT_ITR);
-
-/* Disable accelerated ackknowledge */
-if (adapter-hw.mac.type == e1000_82574)
-E1000_WRITE_REG(adapter-hw,
-E1000_RFCTL, E1000_RFCTL_ACK_DIS);
-
 /* Setup the Base and Length of the Rx Descriptor Ring */
 bus_addr = adapter-rxdma.dma_paddr;
 E1000_WRITE_REG(adapter-hw, E1000_RDLEN(0),
@@ -3835,10 +3799,6 @@
 struct e1000_hw *hw = adapter-hw;
 u32 ims_mask = IMS_ENABLE_MASK;

-if (adapter-msix) {
-E1000_WRITE_REG(hw, EM_EIAC, EM_MSIX_MASK);
-ims_mask |= EM_MSIX_MASK;
-}
 E1000_WRITE_REG(hw, E1000_IMS, ims_mask);
 }

@@ -3847,9 +3807,7 @@
 {
 struct e1000_hw *hw = adapter-hw;

-if (adapter-msix)
-E1000_WRITE_REG(hw, EM_EIAC, 0);
-E1000_WRITE_REG(adapter-hw, E1000_IMC, 0x);
+E1000_WRITE_REG(hw, E1000_IMC, 0x);
 }

 /*
@@ -4683,7 +4641,6 @@
 OID_AUTO, name, CTLTYPE_INT|CTLFLAG_RW, limit, value, description);
 }

-#ifndef EM_LEGACY_IRQ
 static void
 lem_add_rx_process_limit(struct adapter *adapter, const char *name,
 const char *description, int *limit, int value)
@@ -4693,4 +4650,3 @@
 SYSCTL_CHILDREN(device_get_sysctl_tree(adapter-dev)),
 OID_AUTO, name, CTLTYPE_INT|CTLFLAG_RW, limit, value, description);
 }
-#endif


On Tue, Jul 31, 2012 at 9:29 AM, Garrett Cooper yaneg...@gmail.com wrote:

 On Tue, Jul 31, 2012 at 9:20 AM, Jack Vogel jfvo...@gmail.com wrote:
  Yes, I agree John, that was ugly, I'm already taking care of it with my
  changes,
  I'll send you a copy to check out.

 Like so:

 --- //depot/user/gcooper/atf-head/src/sys/dev/e1000/if_lem.c
 2012-07-25 17:11:00.0 
 +++ /scratch/p4/user/gcooper/atf-head/src/sys/dev/e1000/if_lem.c
  2012-07-25 17:11:00.0 
 @@ -1320,9 +1320,10 @@
 lem_local_timer, adapter);
 goto out;
 }
 +   EM_CORE_UNLOCK(adapter);

 +   lem_rxeof(adapter, -1, NULL);
 EM_TX_LOCK(adapter);
 -   lem_rxeof(adapter, -1, NULL);
 lem_txeof(adapter);
 if (ifp-if_drv_flags  IFF_DRV_RUNNING 
 !IFQ_DRV_IS_EMPTY(ifp-if_snd))
 @@ -1330,8 +1331,8 @@
 EM_TX_UNLOCK(adapter);

  out:
 -   EM_CORE_UNLOCK(adapter);
 -   return;
 +   if (mtx_owned(adapter-core_mtx))
 +   EM_CORE_UNLOCK(adapter);
  }

  #else /* EM_FAST_IRQ, then fast interrupt routines only */

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org

Re: svn commit: r238765 - head/sys/dev/e1000

2012-07-31 Thread Jack Vogel
Right, that code got left in lem when i split it off from em by mistake,
just cleaning that up.

Will commit this then.

Jack


On Tue, Jul 31, 2012 at 11:09 AM, John Baldwin j...@freebsd.org wrote:

 On Tuesday, July 31, 2012 1:46:59 pm Jack Vogel wrote:
  No, like so:

 This looks good to me.  The 82574 is supported by em(4) and not lem(4) it
 seems, hence removing that?

 --
 John Baldwin

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r238765 - head/sys/dev/e1000

2012-07-30 Thread Jack Vogel
I have some changes that are needed anyway, I will change this to a
tuneable.

Jack


On Mon, Jul 30, 2012 at 11:45 AM, John Baldwin j...@freebsd.org wrote:

 On Wednesday, July 25, 2012 7:28:15 am Luigi Rizzo wrote:
  Author: luigi
  Date: Wed Jul 25 11:28:15 2012
  New Revision: 238765
  URL: http://svn.freebsd.org/changeset/base/238765
 
  Log:
Use legacy interrupts as a default. This gives up to 10% speedup
when used in qemu (and this driver is for non-PCIe cards,
so probably its largest use is in virtualized environments).
 
Approved by:Jack Vogel
MFC after:  3 days

 Why not make this a tunable or some such?  You could even have it only use
 the
 legacy handler under qemu easily enough.  There's no reason this has to be
 a
 compile-time option.  This is almost certainly slower on real hardware
 where
 this is important to work around dubious Intel Host-PCI bridges that
 result in
 aliased USB interrupts for every em(4) interrupt.

 --
 John Baldwin

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r236729 - head/sys/dev/ixgbe

2012-06-07 Thread Jack Vogel
Just because the Linux driver does something does not mean that FreeBSD
should,
this may be OK, but it isn't something automatic, and with a thing like
this you should
at least have asked me first... please next time?

Jack


On Thu, Jun 7, 2012 at 3:57 PM, Maksim Yevmenkin e...@freebsd.org wrote:

 Author: emax
 Date: Thu Jun  7 22:57:26 2012
 New Revision: 236729
 URL: http://svn.freebsd.org/changeset/base/236729

 Log:
  Correct typo(?) and actually set PTHRESH to 32 and not 16 as per Intel
  Linux driver 3.8.21.

  MFC after:1 week

 Modified:
  head/sys/dev/ixgbe/ixgbe.c

 Modified: head/sys/dev/ixgbe/ixgbe.c

 ==
 --- head/sys/dev/ixgbe/ixgbe.c  Thu Jun  7 22:49:50 2012(r236728)
 +++ head/sys/dev/ixgbe/ixgbe.c  Thu Jun  7 22:57:26 2012(r236729)
 @@ -1152,7 +1152,7 @@ ixgbe_init_locked(struct adapter *adapte
 * from the Intel linux driver 3.8.21.
 * Prefetching enables tx line rate even with 1 queue.
 */
 -   txdctl |= (16  0) | (1  8);
 +   txdctl |= (32  0) | (1  8);
IXGBE_WRITE_REG(hw, IXGBE_TXDCTL(i), txdctl);
}


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r235527 - stable/9/sys/dev/e1000

2012-05-17 Thread Jack Vogel
Cool, thanks Luigi!

Jack


On Thu, May 17, 2012 at 8:24 AM, Luigi Rizzo ri...@iet.unipi.it wrote:

 On Thu, May 17, 2012 at 03:51:14PM +0200, Luigi Rizzo wrote:
 ...
   Hi Jack,
  
   Some of the netmap-related changes in this merge don't work, at least
   not for the LINT kernels:

 should be fixed now - i have merged the netmap code from HEAD
 which was the cause of the LINT failure

 cheers
 luigi

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r223350 - head/sys/dev/e1000

2011-06-21 Thread Jack Vogel
LOL, the old adage is true, you just can't please all the people... :)

The way the code now is it assigns a default, but you could still have
a loader entry that would change it for all adapters if you wanted to,
but ok, if you prefer the older for this. What other globals do you
think should be retained?

Jack


On Tue, Jun 21, 2011 at 6:07 AM, John Baldwin j...@freebsd.org wrote:

 On Monday, June 20, 2011 6:59:29 pm Jack F Vogel wrote:
  Author: jfv
  Date: Mon Jun 20 22:59:29 2011
  New Revision: 223350
  URL: http://svn.freebsd.org/changeset/base/223350
 
  Log:
Eliminate some global tuneables in favor of adapter-specific,
particular flow control and dma coalesce. Also improve the
sysctl operation on those too.
 
Add IPv6 detection in the ioctl code, this was done for
ixgbe first, carrying that over.
 
Add resource ability to disable particular adapter.
 
Add HW TSO capability so vlans can make use of TSO

 The tunables are useful for setting defaults for all interfaces. :(

 I use hw.igb.rx_processing_limit=-1 in loader.conf at work so that we can
 ensure that all igb interfaces in a given system have that setting.   This
 is
 more scalable than having to set the right number of entries in
 /etc/sysctl.conf.local on different machines, etc, without spamming the
 console during boot with warnings about tweaking non-existing sysctls, etc.

 Please consider keeping the tunables where the tunables are used to set
 default settings for all adapters from the loader but per-device sysctls
 are
 used post-boot to provide runtime, per-device settings.

 --
 John Baldwin

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r223350 - head/sys/dev/e1000

2011-06-21 Thread Jack Vogel
There IS a global default for flow control, its just hardcoded.. :)

Flow control was something my validation group specifically ragged on me
about... and was the reason I changed to a per-adapter setting.

Let me think about it.

Jack


On Tue, Jun 21, 2011 at 9:17 AM, Guy Helmer
guy.hel...@palisadesystems.comwrote:

 On Jun 21, 2011, at 11:07 AM, Jack Vogel wrote:

 LOL, the old adage is true, you just can't please all the people... :)

 The way the code now is it assigns a default, but you could still have
 a loader entry that would change it for all adapters if you wanted to,
 but ok, if you prefer the older for this. What other globals do you
 think should be retained?


 I'd like to be able to set the global default for flow control.  I'd also
 appreciate a global default for disabling TCP checksum offload, but that's
 above and beyond what we had before :-)

 Jack


 On Tue, Jun 21, 2011 at 6:07 AM, John Baldwin j...@freebsd.org wrote:

 On Monday, June 20, 2011 6:59:29 pm Jack F Vogel wrote:
  Author: jfv
  Date: Mon Jun 20 22:59:29 2011
  New Revision: 223350
  URL: http://svn.freebsd.org/changeset/base/223350
 
  Log:
Eliminate some global tuneables in favor of adapter-specific,
particular flow control and dma coalesce. Also improve the
sysctl operation on those too.
 
Add IPv6 detection in the ioctl code, this was done for
ixgbe first, carrying that over.
 
Add resource ability to disable particular adapter.
 
Add HW TSO capability so vlans can make use of TSO

 The tunables are useful for setting defaults for all interfaces. :(

 I use hw.igb.rx_processing_limit=-1 in loader.conf at work so that we can
 ensure that all igb interfaces in a given system have that setting.   This
 is
 more scalable than having to set the right number of entries in
 /etc/sysctl.conf.local on different machines, etc, without spamming the
 console during boot with warnings about tweaking non-existing sysctls,
 etc.

 Please consider keeping the tunables where the tunables are used to set
 default settings for all adapters from the loader but per-device sysctls
 are
 used post-boot to provide runtime, per-device settings.

 --
 John Baldwin






 --
 *This message has been scanned by ComplianceSafe, powered by Palisade's
 PacketSure.*

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r222588 - head/sys/dev/ixgbe

2011-06-01 Thread Jack Vogel
Opps, will fix directly, forgot about a last minute change to ixv.c

Jack


On Wed, Jun 1, 2011 at 9:32 PM, Martin Wilke m...@freebsd.org wrote:

 that commit break the build ..

 -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs
 -fdiagnostics-show-option -nostdinc -I. -I/usr/src/sys
 -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include
 opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=100
 --param large-function-growth=1000 -fno-omit-frame-pointer -mno-sse
 -mcmodel=kernel -mno-red-zone -mno-mmx -msoft-float
 -fno-asynchronous-unwind-tables -ffreestanding -fstack-protector -Werror
 /usr/src/sys/dev/iwn/if_iwn.c
 cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -g -Wall
 -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
 -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign
 -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option
 -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL
 -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common
 -finline-limit=8000 --param inline-unit-growth=100 --param
 large-function-growth=1000 -fno-omit-frame-pointer -mno-sse -mcmodel=kernel
 -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables
 -ffreestanding -fstack-protector -Werror /usr/src/sys/dev/ixgbe/ixgbe.c
 -I/usr/src/sys/dev/ixgbe
 cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -g -Wall
 -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes
 -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign
 -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option
 -nostdinc -I. -I/usr/src/sys -I/usr/src/sys/contrib/altq -D_KERNEL
 -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common
 -finline-limit=8000 --param inline-unit-growth=100 --param
 large-function-growth=1000 -fno-omit-frame-pointer -mno-sse -mcmodel=kernel
 -mno-red-zone -mno-mmx -msoft-float -fno-asynchronous-unwind-tables
 -ffreestanding -fstack-protector -Werror /usr/src/sys/dev/ixgbe/ixv.c
 -I/usr/src/sys/dev/ixgbe
 cc1: warnings being treated as errors
 /usr/src/sys/dev/ixgbe/ixv.c: In function 'ixv_ioctl':
 /usr/src/sys/dev/ixgbe/ixv.c:700: warning: initialization from incompatible
 pointer type
 /usr/src/sys/dev/ixgbe/ixv.c:709: error: 'struct ifreq' has no member named
 'ifa_addr'
 /usr/src/sys/dev/ixgbe/ixv.c:713: error: 'struct ifreq' has no member named
 'ifa_addr'
 /usr/src/sys/dev/ixgbe/ixv.c:726: warning: passing argument 2 of
 'arp_ifinit' from incompatible pointer type
 *** Error code 1

 Stop in /usr/obj/usr/src/sys/GENERIC.
 *** Error code 1

 Stop in /usr/src.
 *** Error code 1



 On Thu, Jun 2, 2011 at 8:34 AM, Jack F Vogel j...@freebsd.org wrote:

 Author: jfv
 Date: Thu Jun  2 00:34:57 2011
 New Revision: 222588
 URL: http://svn.freebsd.org/changeset/base/222588

 Log:
  First off: update the driver README, the old one was horribly
  crusty, and this still isn't perfect, but its at least a bit
  more recent.

  Secondly, a few improvements to the driver from Andrew Boyer,
  support hint to allow devices to not attach, add VLAN_HWTSO
  capability so vlans can use TSO, fix in the interrupt handler
  to make sure the stack TX queue is processed. Oh, and also
  make sure IPv6 does not cause a re-init in the ioctl routine.
  Thanks for your efforts Andrew!

  Thanks to Claudio Jeker for noticing the ixgbe_xmit() routine
  was not correctly swapping the dma map from the first to the
  last descriptor in a multi-descriptor transmission, corrected
  this.

 Modified:
  head/sys/dev/ixgbe/LICENSE
  head/sys/dev/ixgbe/README
  head/sys/dev/ixgbe/ixgbe.c
  head/sys/dev/ixgbe/ixv.c

 Modified: head/sys/dev/ixgbe/LICENSE

 ==
 --- head/sys/dev/ixgbe/LICENSE  Wed Jun  1 22:56:02 2011(r222587)
 +++ head/sys/dev/ixgbe/LICENSE  Thu Jun  2 00:34:57 2011(r222588)
 @@ -1,6 +1,6 @@

  
 /**

 -  Copyright (c) 2001-2010, Intel Corporation
 +  Copyright (c) 2001-2011, Intel Corporation
   All rights reserved.

   Redistribution and use in source and binary forms, with or without

 Modified: head/sys/dev/ixgbe/README

 ==
 --- head/sys/dev/ixgbe/README   Wed Jun  1 22:56:02 2011(r222587)
 +++ head/sys/dev/ixgbe/README   Thu Jun  2 00:34:57 2011(r222588)
 @@ -1,8 +1,8 @@
 -FreeBSD Driver for 10 Gigabit PCI Express Server Adapters
 -=
 +FreeBSD Driver for Intel(R) Ethernet 10 Gigabit PCI Express Server
 Adapters

 +
  /*$FreeBSD$*/

 -May 14, 2008
 +November 12, 2010


  Contents
 @@ -11,15 +11,15 @@ Contents
  - Overview
  - Supported Adapters
  - Building and 

Re: svn commit: r221789 - in head/sys/dev: ahci ata ata/chipsets ichsmb ichwd sound/pci/hda

2011-05-11 Thread Jack Vogel
Hmmm, thanks for pointing that out, will check on Seth's email, clearly one
or the other is wrong.

Jack


On Wed, May 11, 2011 at 4:59 PM, Garrett Cooper yaneg...@gmail.com wrote:

 On May 11, 2011, at 4:31 PM, Jack F Vogel wrote:

  +#define HDA_INTEL_PPT1   HDA_MODEL_CONSTRUCT(INTEL, 0x1e20)

 Is this a typo?

  #define HDA_INTEL_82801F  HDA_MODEL_CONSTRUCT(INTEL, 0x2668)
  #define HDA_INTEL_63XXESB HDA_MODEL_CONSTRUCT(INTEL, 0x269a)
  #define HDA_INTEL_82801G  HDA_MODEL_CONSTRUCT(INTEL, 0x27d8)
  @@ -495,6 +496,7 @@ static const struct {
  } hdac_devices[] = {
{ HDA_INTEL_CPT, Intel Cougar Point,  0 },
{ HDA_INTEL_PATSBURG,Intel Patsburg,  0 },
  + { HDA_INTEL_PPT, Intel Panther Point, 0 },
{ HDA_INTEL_82801F,  Intel 82801F,0 },
{ HDA_INTEL_63XXESB, Intel 631x/632xESB,  0 },
{ HDA_INTEL_82801G,  Intel 82801G,0 },

 Thanks,
 -Garrett

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r219753 - head/sys/dev/e1000

2011-03-18 Thread Jack Vogel
The problem is that the shared code is delivered to me as a component. I
generally do try to filter it a little, but if I start diverging from the
internal
component files, then I just introduce a never-ending task for myself to do
that. It also is tested in house as a complete component, so every time I
would change something that introduces risks.

To both you and Yongari... its nice to compare how things are done with
Linux, but what you need to understand is that there are, oh, about 20
engineers with varying tasks that handle Linux. For FreeBSD there is
just me, so the only way I can accomplish as much is to creatively
leverage the work of others, or to consolidate tasks in some ways.

I know there are plenty of things to criticize, I apologize when I don't
get it quite the way you'd like, or I make work for others, I'll try to take
the feedback into account, I'm trying to do my best though.

Regards,

Jack


On Fri, Mar 18, 2011 at 12:15 PM, Juli Mallett jmall...@freebsd.org wrote:

 On Fri, Mar 18, 2011 at 11:54, Jack F Vogel j...@freebsd.org wrote:
  Author: jfv
  Date: Fri Mar 18 18:54:00 2011
  New Revision: 219753
  URL: http://svn.freebsd.org/changeset/base/219753
 
  Log:
   This delta updates the em driver to version 7.2.2 which has
   been undergoing test for some weeks. This improves the RX
   mbuf handling to avoid system hang due to depletion. Thanks
   to all those who have been testing the code, and to Beezar
   Liu for the design changes.

 I understand that the fundamental unit coming out of Intel is an
 atomic driver version, but it really, really, really would be nice to
 not fix functional and stylistic changes at such a fundamental level
 and with such a widely-used driver as these.  I understand that you
 have enough work already, but if it's at all possible to do these
 updates in a couple of passes, I would really appreciate it, and I
 know there are other people who have to mine the significant deltas
 from these updates who would appreciate it, too.  You could start with
 stylistic changes and then do a couple of functional changes and then
 update the driver version to reflect the Intel finished product, say.

 It's good that it's been undergoing a long period of test, but it
 would have been nice if the commit message had included more details
 on the functional changes.

 Some specific comments:

 It seems like the update to e1000_82575 (and other chip-specific bits)
 is totally independent of the other style changes and the depletion
 fix and that it would have been easy to do that separately.

  -   if (nvm-word_size == (1  15)) {
  +   if (nvm-word_size == (1  15))
 nvm-page_size = 128;
  -   }
  -

 Great that this is moving towards KNF.  Might be good to take a few
 minutes and fix all such statements now rather than doing them in
 pieces later in time.

  -#define E1000_DMACR_DMACTHR_MASK0x00FF /* DMA Coalescing
 Receive
  +#define E1000_DMACR_DMACTHR_MASK0x00FF /* DMA Coalescing Rx
  * Threshold */

 All of these changes could have easily been done separately since they
 are entirely stylistic.

  +/* Energy efficient ethernet - default to OFF */
  +static int eee_setting = 0;
  +TUNABLE_INT(hw.em.eee_setting, eee_setting);

 Would have been useful to see some mention of this in the commit message.

  +   struct e1000_hw *hw;
 int error = 0;
 
 INIT_DEBUGOUT(em_attach: begin);
 
 adapter = device_get_softc(dev);
 adapter-dev = adapter-osdep.dev = dev;
  +   hw = adapter-hw;

 [...]

  -   if ((adapter-hw.mac.type == e1000_ich8lan) ||
  -   (adapter-hw.mac.type == e1000_ich9lan) ||
  -   (adapter-hw.mac.type == e1000_ich10lan) ||
  -   (adapter-hw.mac.type == e1000_pchlan) ||
  -   (adapter-hw.mac.type == e1000_pch2lan)) {
  +   if ((hw-mac.type == e1000_ich8lan) ||
  +   (hw-mac.type == e1000_ich9lan) ||
  +   (hw-mac.type == e1000_ich10lan) ||
  +   (hw-mac.type == e1000_pchlan) ||
  +   (hw-mac.type == e1000_pch2lan)) {

 Like the brace changes elsewhere, this is not the first time this
 stylistic improvement has been made in the e1000 code base.  Perhaps
 it would be good to replace all uses of adapter-hw. with hw- and add
 the appropriate hw variables now.  It seems insignificant, but I
 assure you it is a source of conflicts for those of us who have to
 maintain local changes to e1000.  That's alright as a one time cost,
 and it would seem worthwhile to fix this universally since that's the
 direction this driver and the Linux driver seem to be going in.

  -   boolmore;
 
 
 if (ifp-if_drv_flags  IFF_DRV_RUNNING) {
  -   more = em_rxeof(rxr, adapter-rx_process_limit, NULL);
  -
  +   bool more = em_rxeof(rxr, adapter-rx_process_limit,
 NULL);

 This seems like a style regression, at least 

Re: svn commit: r218581 - head/sys/dev/e1000

2011-02-11 Thread Jack Vogel
Ya, I just saw that, I think I will Bjoern, only because its gonna be a
problem the next time
I check in shared code, I don't really even own the stuff, when my internal
build runs it just
filters the defines in the stuff according to my needs, but doesn't directly
change anything.

I was gonna send email around midnight last night and say I saw the
breakage, but I couldn't
fix it til this morning, you had good intentions anyway :)

Jack


On Fri, Feb 11, 2011 at 10:42 AM, Bjoern A. Zeeb b...@freebsd.org wrote:

 On Fri, 11 Feb 2011, Doug Barton wrote:

  On 02/11/2011 09:18, Jack F Vogel wrote:

 Modified: head/sys/dev/e1000/e1000_mac.h

 ==
 --- head/sys/dev/e1000/e1000_mac.h  Fri Feb 11 16:14:16 2011
 (r218580)
 +++ head/sys/dev/e1000/e1000_mac.h  Fri Feb 11 17:18:42 2011
 (r218581)
 @@ -70,6 +70,7 @@ s32  e1000_led_on_generic(struct e1000_h
  s32  e1000_led_off_generic(struct e1000_hw *hw);
  void e1000_update_mc_addr_list_generic(struct e1000_hw *hw,
 u8 *mc_addr_list, u32
 mc_addr_count);
 +s32  e1000_set_default_fc_generic(struct e1000_hw *hw);


 This is a redundant declaration, it's already defined in _api.h.
 Commenting this out allows the build to succeed, and if you receive this
 message it seems to be working fine. :)


 Yeah, I put it into _api.h this morning to unbreak the build.  Jack,
 you may want to revert parts of my commit and adjust to your local
 trees (mine had a style bug anyway;)

 That was the commit:
 http://svn.freebsd.org/changeset/base/218548

 /bz

 --
 Bjoern A. Zeeb You have to have visions!
 Stop bit received. Insert coin for new address family.

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r215922 - in stable/7/sys: conf dev/e1000 modules/em modules/igb

2010-11-26 Thread Jack Vogel
Working all day on my holidays... got tired and forgot the svn add, its
fixed.

Jack


On Fri, Nov 26, 2010 at 7:35 PM, Lawrence Stewart lstew...@freebsd.orgwrote:

 Hi Jack,

 On 11/27/10 12:09, Jack F Vogel wrote:
  Author: jfv
  Date: Sat Nov 27 01:09:54 2010
  New Revision: 215922
  URL: http://svn.freebsd.org/changeset/base/215922
 
  Log:
MFC: r214646, r215781, r215789, 215808
 Brings 7.4 e1000 drivers to the same level as 8.2
 
  Modified:
stable/7/sys/conf/files
stable/7/sys/dev/e1000/e1000_82571.c
stable/7/sys/dev/e1000/e1000_82571.h
stable/7/sys/dev/e1000/e1000_82575.c
stable/7/sys/dev/e1000/e1000_82575.h
stable/7/sys/dev/e1000/e1000_api.c
stable/7/sys/dev/e1000/e1000_api.h
stable/7/sys/dev/e1000/e1000_defines.h
stable/7/sys/dev/e1000/e1000_hw.h
stable/7/sys/dev/e1000/e1000_ich8lan.c
stable/7/sys/dev/e1000/e1000_ich8lan.h
stable/7/sys/dev/e1000/e1000_mac.c
stable/7/sys/dev/e1000/e1000_nvm.c
stable/7/sys/dev/e1000/e1000_nvm.h
stable/7/sys/dev/e1000/e1000_osdep.h
stable/7/sys/dev/e1000/e1000_phy.c
stable/7/sys/dev/e1000/e1000_phy.h
stable/7/sys/dev/e1000/e1000_regs.h
stable/7/sys/dev/e1000/if_em.c
stable/7/sys/dev/e1000/if_em.h
stable/7/sys/dev/e1000/if_igb.c
stable/7/sys/dev/e1000/if_igb.h
stable/7/sys/dev/e1000/if_lem.c
stable/7/sys/dev/e1000/if_lem.h
stable/7/sys/modules/em/Makefile
stable/7/sys/modules/igb/Makefile
  Directory Properties:
stable/7/   (props changed)

 I believe this has broken the GENERIC kernel build. Did you run a test
 make buildkernel before committing the MFC?

 Cheers,
 Lawrence

 [...]
 /usr/obj/work/svn/freebsd_mirror/stable/7/make.amd64/make -V CFILES -V
 SYSTEM_CFILES -V GEN_CFILES |  MKDEP_CPP=cc -E CC=cc xargs mkdep -a
 -f .newdep -O2 -frename-registers -pipe -fno-strict-aliasing  -std=c99
 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes
 -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wundef
 -Wno-pointer-sign -fformat-extensions -nostdinc  -I.
 -I/work/svn/freebsd_mirror/stable/7/sys
 -I/work/svn/freebsd_mirror/stable/7/sys/contrib/altq
 -I/work/svn/freebsd_mirror/stable/7/sys/contrib/ipfilter
 -I/work/svn/freebsd_mirror/stable/7/sys/contrib/pf
 -I/work/svn/freebsd_mirror/stable/7/sys/dev/ath
 -I/work/svn/freebsd_mirror/stable/7/sys/dev/ath/ath_hal
 -I/work/svn/freebsd_mirror/stable/7/sys/contrib/ngatm
 -I/work/svn/freebsd_mirror/stable/7/sys/dev/twa
 -I/work/svn/freebsd_mirror/stable/7/sys/gnu/fs/xfs/FreeBSD
 -I/work/svn/freebsd_mirror/stable/7/sys/gnu/fs/xfs/FreeBSD/support
 -I/work/svn/freebsd_mirror/stable/7/sys/gnu/fs/xfs
 -I/work/svn/freebsd_mirror/stable/7/sys/contrib/opensolaris/compat
 -I/work/svn/freebsd_mirror/stable/7/sys/dev/cxgb -D_KERNEL
 -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common
 -finline-limit=8000 --param inline-unit-growth=100 --param
 large-function-growth=1000  -mcmodel=kernel -mno-red-zone  -mfpmath=387
 -mno-sse -mno-sse2 -mno-mmx -mno-3dnow  -msoft-float
 -fno-asynchronous-unwind-tables -ffreestanding
 cc: /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_vf.c: No such
 file or directory
 cc: /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_mbx.c: No such
 file or directory
 In file included from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_api.h:38,
 from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/if_em.c:81:
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_hw.h:630:23:
 error: e1000_mbx.h: No such file or directory
 In file included from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_api.h:38,
 from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/if_lem.c:81:
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_hw.h:630:23:
 error: e1000_mbx.h: No such file or directory
 In file included from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_api.h:38,
 from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/if_igb.c:87:
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_hw.h:630:23:
 error: e1000_mbx.h: No such file or directory
 In file included from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_api.h:38,
 from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_80003es2lan.c:40:
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_hw.h:630:23:
 error: e1000_mbx.h: No such file or directory
 In file included from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_api.h:38,
 from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_82540.c:46:
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_hw.h:630:23:
 error: e1000_mbx.h: No such file or directory
 In file included from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_api.h:38,
 from
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_82541.c:44:
 /work/svn/freebsd_mirror/stable/7/sys/dev/e1000/e1000_hw.h:630:23:
 error: e1000_mbx.h: No such 

Re: svn commit: r214363 - head/sys/dev/e1000

2010-10-25 Thread Jack Vogel
Always forget a couple items when I list changes and since some people
are about such things let me add:

- Also add 3 tier mbuf cluster size, based on the MTU, so as you
increase
  beyond standard you go 4K, and once over that you get 9K clusters now.

- Add a sysctl to change the flow control setting, this came up while
debugging
  an issue with PCH hardware, and it had long been needed anyway.

- I added back the debug print routine that got removed with gnn's cool
  stats code, I just still find it helpful when I'm tracking down
problems so
  it seems worth keeping around to me :)

OK, I think that covers it all. Please give this code some testing, its what
I
would like to see in 8.2

Cheers,

Jack



On Mon, Oct 25, 2010 at 5:07 PM, Jack F Vogel j...@freebsd.org wrote:

 Author: jfv
 Date: Tue Oct 26 00:07:58 2010
 New Revision: 214363
 URL: http://svn.freebsd.org/changeset/base/214363

 Log:
  Bug fix delta to the em driver:
- Chasin down bogus watchdogs has led to an improved
  design to this handling, the hang decision takes
  place in the tx cleanup, with only a simple report
  check in local_timer. Our tests have shown no false
  watchdogs with this code.
- VLAN fixes from jhb, the shadow vfta should be per
  interface, but as global it was not. Thanks John.
- Bug fixes in the support for new PCH2 hardware.
- Thanks for all the help and feedback on the driver,
  changes to lem with be coming shortly as well.

 Modified:
  head/sys/dev/e1000/if_em.c
  head/sys/dev/e1000/if_em.h

 Modified: head/sys/dev/e1000/if_em.c

 ==
 --- head/sys/dev/e1000/if_em.c  Mon Oct 25 23:59:56 2010(r214362)
 +++ head/sys/dev/e1000/if_em.c  Tue Oct 26 00:07:58 2010(r214363)
 @@ -93,8 +93,7 @@ int   em_display_debug_stats = 0;
  /*
  *  Driver version:
  */
 -char em_driver_version[] = 7.0.8;
 -
 +char em_driver_version[] = 7.1.6;

  /*
  *  PCI Device ID Table
 @@ -170,6 +169,8 @@ static em_vendor_info_t em_vendor_info_a
{ 0x8086, E1000_DEV_ID_PCH_M_HV_LC, PCI_ANY_ID, PCI_ANY_ID, 0},
{ 0x8086, E1000_DEV_ID_PCH_D_HV_DM, PCI_ANY_ID, PCI_ANY_ID, 0},
{ 0x8086, E1000_DEV_ID_PCH_D_HV_DC, PCI_ANY_ID, PCI_ANY_ID, 0},
 +   { 0x8086, E1000_DEV_ID_PCH2_LV_LM,  PCI_ANY_ID, PCI_ANY_ID, 0},
 +   { 0x8086, E1000_DEV_ID_PCH2_LV_V,   PCI_ANY_ID, PCI_ANY_ID, 0},
/* required last entry */
{ 0, 0, 0, 0, 0}
  };
 @@ -256,6 +257,8 @@ static int  em_dma_malloc(struct adapter
  static voidem_dma_free(struct adapter *, struct em_dma_alloc *);
  static int em_sysctl_nvm_info(SYSCTL_HANDLER_ARGS);
  static voidem_print_nvm_info(struct adapter *);
 +static int em_sysctl_debug_info(SYSCTL_HANDLER_ARGS);
 +static voidem_print_debug_info(struct adapter *);
  static int em_is_valid_ether_addr(u8 *);
  static int em_sysctl_int_delay(SYSCTL_HANDLER_ARGS);
  static voidem_add_int_delay_sysctl(struct adapter *, const char *,
 @@ -282,6 +285,8 @@ static void em_handle_link(void *context

  static voidem_add_rx_process_limit(struct adapter *, const char *,
const char *, int *, int);
 +static voidem_set_flow_cntrl(struct adapter *, const char *,
 +   const char *, int *, int);

  static __inline void em_rx_discard(struct rx_ring *, int);

 @@ -359,14 +364,6 @@ TUNABLE_INT(hw.em.rx_process_limit, e
  static int em_fc_setting = e1000_fc_full;
  TUNABLE_INT(hw.em.fc_setting, em_fc_setting);

 -/*
 -** Shadow VFTA table, this is needed because
 -** the real vlan filter table gets cleared during
 -** a soft reset and the driver needs to be able
 -** to repopulate it.
 -*/
 -static u32 em_shadow_vfta[EM_VFTA_SIZE];
 -
  /* Global used in WOL setup with multiport cards */
  static int global_quad_port_a = 0;

 @@ -449,6 +446,11 @@ em_attach(device_t dev)
OID_AUTO, nvm, CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
em_sysctl_nvm_info, I, NVM Information);

 +   SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
 +   SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 +   OID_AUTO, debug, CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
 +   em_sysctl_debug_info, I, Debug Information);
 +
callout_init_mtx(adapter-timer, adapter-core_mtx, 0);

/* Determine hardware and mac info */
 @@ -468,9 +470,10 @@ em_attach(device_t dev)
** identified
*/
if ((adapter-hw.mac.type == e1000_ich8lan) ||
 -   (adapter-hw.mac.type == e1000_pchlan) ||
(adapter-hw.mac.type == e1000_ich9lan) ||
 -   (adapter-hw.mac.type == e1000_ich10lan)) {
 +   

Re: svn commit: r209611 - head/sys/dev/e1000

2010-06-30 Thread Jack Vogel
Yes, work is in progress to add it to ixgbe as well, it turned out to be a
bit messier
because the owners of the shared code did things a bit differently. I am
still designing
it so that its just a special case in the main driver, this is different
than Linux which made
both of them as seperate 'vf' driver.  Of course in Linux they actually have
the host side
support, ala PF, if the day ever comes that FreeBSD has such ability maybe
I'll have to
change it again... but not holding my breath.

I'd say the ixgbe changes might be ready in a few weeks.

Jack


On Wed, Jun 30, 2010 at 1:37 PM, Fabien Thomas fabien.tho...@netasq.comwrote:

 great!
 have you some plan to do it on ixgbe too ?

 fabien

 On 30 juin 2010, at 19:26, Jack F Vogel wrote:

  Author: jfv
  Date: Wed Jun 30 17:26:47 2010
  New Revision: 209611
  URL: http://svn.freebsd.org/changeset/base/209611
 
  Log:
   SR-IOV support added to igb
 
   What this provides is support for the 'virtual function'
   interface that a FreeBSD VM may be assigned from a host
   like KVM on Linux, or newer versions of Xen with such
   support.
 
   When the guest is set up with the capability, a special
   limited function 82576 PCI device is present in its virtual
   PCI space, so with this driver installed in the guest that
   device will be detected and function nearly like the bare
   metal, as it were.
 
   The interface is only allowed a single queue in this configuration
   however initial performance tests have looked very good.
 
   Enjoy!!
 
  Modified:
   head/sys/dev/e1000/if_igb.c
   head/sys/dev/e1000/if_igb.h
 
  Modified: head/sys/dev/e1000/if_igb.c
 
 ==
  --- head/sys/dev/e1000/if_igb.c   Wed Jun 30 17:20:33 2010
  (r209610)
  +++ head/sys/dev/e1000/if_igb.c   Wed Jun 30 17:26:47 2010
  (r209611)
  @@ -99,7 +99,7 @@ int igb_display_debug_stats = 0;
  /*
   *  Driver version:
   */
  -char igb_driver_version[] = version - 1.9.6;
  +char igb_driver_version[] = version - 2.0.1;
 
 
  /*
  @@ -128,6 +128,7 @@ static igb_vendor_info_t igb_vendor_info
PCI_ANY_ID, PCI_ANY_ID, 0},
{ 0x8086, E1000_DEV_ID_82576_QUAD_COPPER,
PCI_ANY_ID, PCI_ANY_ID, 0},
  + { 0x8086, E1000_DEV_ID_82576_VF,PCI_ANY_ID, PCI_ANY_ID, 0},
{ 0x8086, E1000_DEV_ID_82580_COPPER,PCI_ANY_ID, PCI_ANY_ID, 0},
{ 0x8086, E1000_DEV_ID_82580_FIBER, PCI_ANY_ID, PCI_ANY_ID, 0},
{ 0x8086, E1000_DEV_ID_82580_SERDES,PCI_ANY_ID, PCI_ANY_ID, 0},
  @@ -226,7 +227,11 @@ static void  igb_dma_free(struct adapter
  static intigb_sysctl_nvm_info(SYSCTL_HANDLER_ARGS);
  static void   igb_print_nvm_info(struct adapter *);
  static intigb_is_valid_ether_addr(u8 *);
  -static void igb_add_hw_stats(struct adapter *adapter);
  +static void igb_add_hw_stats(struct adapter *);
  +
  +static void  igb_vf_init_stats(struct adapter *);
  +static void  igb_update_vf_stats_counters(struct adapter *);
  +
  /* Management and WOL Support */
  static void   igb_init_manageability(struct adapter *);
  static void   igb_release_manageability(struct adapter *);
  @@ -494,6 +499,17 @@ igb_attach(device_t dev)
goto err_pci;
}
 
  + /* Allocate the appropriate stats memory */
  + if (adapter-hw.mac.type == e1000_vfadapt) {
  + adapter-stats =
  + (struct e1000_vf_stats *)malloc(sizeof \
  + (struct e1000_vf_stats), M_DEVBUF, M_NOWAIT | M_ZERO);
  + igb_vf_init_stats(adapter);
  + } else
  + adapter-stats =
  + (struct e1000_hw_stats *)malloc(sizeof \
  + (struct e1000_hw_stats), M_DEVBUF, M_NOWAIT | M_ZERO);
  +
/*
** Start from a known state, this is
** important in reading the nvm and
  @@ -1788,30 +1804,39 @@ static void
  igb_set_promisc(struct adapter *adapter)
  {
struct ifnet*ifp = adapter-ifp;
  - uint32_treg_rctl;
  + struct e1000_hw *hw = adapter-hw;
  + u32 reg;
 
  - reg_rctl = E1000_READ_REG(adapter-hw, E1000_RCTL);
  + if (hw-mac.type == e1000_vfadapt) {
  + e1000_promisc_set_vf(hw, e1000_promisc_enabled);
  + return;
  + }
 
  + reg = E1000_READ_REG(hw, E1000_RCTL);
if (ifp-if_flags  IFF_PROMISC) {
  - reg_rctl |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
  - E1000_WRITE_REG(adapter-hw, E1000_RCTL, reg_rctl);
  + reg |= (E1000_RCTL_UPE | E1000_RCTL_MPE);
  + E1000_WRITE_REG(hw, E1000_RCTL, reg);
} else if (ifp-if_flags  IFF_ALLMULTI) {
  - reg_rctl |= 

Re: svn commit: r209609 - head/sys/dev/ixgbe

2010-06-30 Thread Jack Vogel
It wont work as a delta, I figured just putting the new delta over it was
ok, but if you
think it should be reverted then by all means...

Jack


On Wed, Jun 30, 2010 at 2:39 PM, John Baldwin j...@freebsd.org wrote:

 On Wednesday 30 June 2010 12:28:28 pm Jack F Vogel wrote:
  Author: jfv
  Date: Wed Jun 30 16:28:28 2010
  New Revision: 209609
  URL: http://svn.freebsd.org/changeset/base/209609
 
  Log:
Left out header change in last delta - new member
in adapter so that advertise changes can be done
to one port without the other changing.

 Should 209607 be reverted now?

 --
 John Baldwin

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r209611 - head/sys/dev/e1000

2010-06-30 Thread Jack Vogel
On Wed, Jun 30, 2010 at 2:50 PM, Julian Elischer jul...@elischer.orgwrote:

 On 6/30/10 10:26 AM, Jack F Vogel wrote:

 Author: jfv
 Date: Wed Jun 30 17:26:47 2010
 New Revision: 209611
 URL: http://svn.freebsd.org/changeset/base/209611

 Log:
   SR-IOV support added to igb

   What this provides is support for the 'virtual function'
   interface that a FreeBSD VM may be assigned from a host
   like KVM on Linux, or newer versions of Xen with such
   support.

   When the guest is set up with the capability, a special
   limited function 82576 PCI device is present in its virtual
   PCI space, so with this driver installed in the guest that
   device will be detected and function nearly like the bare
   metal, as it were.

   The interface is only allowed a single queue in this configuration
   however initial performance tests have looked very good.

   Enjoy!!


 do these extra devices turn up in a standard ifconfig output?
 in other words, can we assign them to jails using vimage?


They only show up if configured in the PF host, for instance if using Linux
and KVM (I did develop and test
with Fedora 13) you must load the igb driver there specifying that you want
vf's created and how many.
Next in the management of the guest you need to assign one of these vf
devices to the guest. After you
do all that and load this igb driver then yes, it will look just like a
standard igbX device.

Not sure if I understand your question, did any of that help? If you mean
can FreeBSD make
multiple VF's and then manage them with jails, no, that would be to have PF
support, and to
do that I need SRIOV support in the kernel/pci subsystem.

Now, if someone were interested in actually doing that then I'd be happy to
implement the full
PF/VF capability the way Linux has, but that's a bigger lift. Just let me
know if we want to
go in that direction.

Jack
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r209622 - head/sys/dev/ixgbe

2010-06-30 Thread Jack Vogel
I went to a LOT of trouble setting up a mirror at home and just as I went to
commit
the change its updated.

While I understand the good intentions, please don't do this again. If I had
been
unresponsive for days or something I understand, but its been hours, and I
was
fixing it.

Jack


On Wed, Jun 30, 2010 at 10:03 PM, Kevin Lo ke...@freebsd.org wrote:

 Author: kevlo
 Date: Thu Jul  1 05:03:24 2010
 New Revision: 209622
 URL: http://svn.freebsd.org/changeset/base/209622

 Log:
  Fix build

 Modified:
  head/sys/dev/ixgbe/ixgbe.h

 Modified: head/sys/dev/ixgbe/ixgbe.h

 ==
 --- head/sys/dev/ixgbe/ixgbe.h  Thu Jul  1 03:48:45 2010(r209621)
 +++ head/sys/dev/ixgbe/ixgbe.h  Thu Jul  1 05:03:24 2010(r209622)
 @@ -382,7 +382,6 @@ struct adapter {
u32 link_speed;
boollink_up;
u32 linkvec;
 -   int advertise;

/* Mbuf cluster size */
u32 rx_mbuf_sz;

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r209241 - head/sys/dev/e1000

2010-06-16 Thread Jack Vogel
Awesome, look forward to checking this out, thanks much George!!

Jack


On Wed, Jun 16, 2010 at 10:36 AM, George V. Neville-Neil 
g...@freebsd.orgwrote:

 Author: gnn
 Date: Wed Jun 16 17:36:53 2010
 New Revision: 209241
 URL: http://svn.freebsd.org/changeset/base/209241

 Log:
  Move statistics into the sysctl tree making it easier to find
  and use them.
  Add previously hidden statistics, some of which include interrupt
  and host/card communication counters.

 Modified:
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/e1000/if_igb.h

 Modified: head/sys/dev/e1000/if_igb.c

 ==
 --- head/sys/dev/e1000/if_igb.c Wed Jun 16 16:52:35 2010(r209240)
 +++ head/sys/dev/e1000/if_igb.c Wed Jun 16 17:36:53 2010(r209241)
 @@ -212,7 +212,6 @@ static bool igb_tso_setup(struct tx_ring
  static voidigb_set_promisc(struct adapter *);
  static voidigb_disable_promisc(struct adapter *);
  static voidigb_set_multi(struct adapter *);
 -static voidigb_print_hw_stats(struct adapter *);
  static voidigb_update_link_status(struct adapter *);
  static voidigb_refresh_mbufs(struct rx_ring *, int);

 @@ -224,11 +223,10 @@ static intigb_xmit(struct tx_ring *, st
  static int igb_dma_malloc(struct adapter *, bus_size_t,
struct igb_dma_alloc *, int);
  static voidigb_dma_free(struct adapter *, struct igb_dma_alloc *);
 -static voidigb_print_debug_info(struct adapter *);
 +static int igb_sysctl_nvm_info(SYSCTL_HANDLER_ARGS);
  static voidigb_print_nvm_info(struct adapter *);
  static int igb_is_valid_ether_addr(u8 *);
 -static int igb_sysctl_stats(SYSCTL_HANDLER_ARGS);
 -static int igb_sysctl_debug_info(SYSCTL_HANDLER_ARGS);
 +static void igb_add_hw_stats(struct adapter *adapter);
  /* Management and WOL Support */
  static voidigb_init_manageability(struct adapter *);
  static voidigb_release_manageability(struct adapter *);
 @@ -411,13 +409,8 @@ igb_attach(device_t dev)
/* SYSCTL stuff */
SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 -   OID_AUTO, debug, CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
 -   igb_sysctl_debug_info, I, Debug Information);
 -
 -   SYSCTL_ADD_PROC(device_get_sysctl_ctx(dev),
 -   SYSCTL_CHILDREN(device_get_sysctl_tree(dev)),
 -   OID_AUTO, stats, CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
 -   igb_sysctl_stats, I, Statistics);
 +   OID_AUTO, nvm, CTLTYPE_INT|CTLFLAG_RW, adapter, 0,
 +   igb_sysctl_nvm_info, I, NVM Information);

SYSCTL_ADD_INT(device_get_sysctl_ctx(adapter-dev),
SYSCTL_CHILDREN(device_get_sysctl_tree(adapter-dev)),
 @@ -583,6 +576,8 @@ igb_attach(device_t dev)
adapter-vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig,
 igb_unregister_vlan, adapter, EVENTHANDLER_PRI_FIRST);

 +   igb_add_hw_stats(adapter);
 +
/* Tell the stack that the interface is not active */
adapter-ifp-if_drv_flags = ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);

 @@ -1881,7 +1876,6 @@ static void
  igb_local_timer(void *arg)
  {
struct adapter  *adapter = arg;
 -   struct ifnet*ifp = adapter-ifp;
device_tdev = adapter-dev;
struct tx_ring  *txr = adapter-tx_rings;

 @@ -1891,9 +1885,6 @@ igb_local_timer(void *arg)
igb_update_link_status(adapter);
igb_update_stats_counters(adapter);

 -   if (igb_display_debug_stats  ifp-if_drv_flags  IFF_DRV_RUNNING)
 -   igb_print_hw_stats(adapter);
 -
 /*
 ** Watchdog: check for time since any descriptor was cleaned
 */
 @@ -4741,8 +4732,10 @@ igb_update_stats_counters(struct adapter
/* For the 64-bit byte counters the low dword must be read first. */
/* Both registers clear on the read of the high dword */

 -   adapter-stats.gorc += E1000_READ_REG(adapter-hw, E1000_GORCH);
 -   adapter-stats.gotc += E1000_READ_REG(adapter-hw, E1000_GOTCH);
 +   adapter-stats.gorc += E1000_READ_REG(adapter-hw, E1000_GORCL) +
 + ((u64)E1000_READ_REG(adapter-hw, E1000_GORCH)  32);
 +   adapter-stats.gotc += E1000_READ_REG(adapter-hw, E1000_GOTCL) +
 + ((u64)E1000_READ_REG(adapter-hw, E1000_GOTCH)  32) ;

adapter-stats.rnbc += E1000_READ_REG(adapter-hw, E1000_RNBC);
adapter-stats.ruc += E1000_READ_REG(adapter-hw, E1000_RUC);
 @@ -4764,6 +4757,38 @@ igb_update_stats_counters(struct adapter
adapter-stats.mptc += E1000_READ_REG(adapter-hw, E1000_MPTC);
adapter-stats.bptc += E1000_READ_REG(adapter-hw, E1000_BPTC);

 +   /* Interrupt Counts */
 +
 +   adapter-stats.iac += E1000_READ_REG(adapter-hw, E1000_IAC);
 +   adapter-stats.icrxptc += E1000_READ_REG(adapter-hw,
 E1000_ICRXPTC);
 +   adapter-stats.icrxatc += E1000_READ_REG(adapter-hw,
 

Re: svn commit: r209068 - head/sys/dev/e1000

2010-06-15 Thread Jack Vogel
Ahhh, thanks for report John, will fix that asap.

Jack


On Tue, Jun 15, 2010 at 12:49 PM, John Baldwin j...@freebsd.org wrote:

 On Friday 11 June 2010 4:54:27 pm Jack F Vogel wrote:
  Author: jfv
  Date: Fri Jun 11 20:54:27 2010
  New Revision: 209068
  URL: http://svn.freebsd.org/changeset/base/209068
 
  Log:
Add a couple fixes from Michael Tuexen.
Remove unneeded rxtx handler, make que handler generic.
Do not allocate header mbufs in rx ring if not doing hdr split.
Release the lock in rxeof call to stack.
 
MFC for 8.1 asap

 This causes a panic with MSIX is disabled (boot with
 hw.pci.msix_enabled=0).
 The reason is that in the !MSIX case, the rxtx_task is queued to the
 adapter-tq queue, but in the MSIX case the task is queued to the per-queue
 que-tq queue.  igb_handle_que() assumes the MSIX case, it is not generic.

 --
 John Baldwin

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r209060 - head/sys/dev/ixgbe

2010-06-11 Thread Jack Vogel
HM, I put in a change in response to some people having problems with
mbuf resources,  it seemed to work ok, but now i'm kinda concerned. Does
this
happen every time you bring the device up?

In the routine 'ixgbe_setup_receive_ring()'  I changed a couple of
M_NOWAIT's
to M_WAITOK, thinking that it would be ok in this code, can you test it,
change
it back to M_NOWAIT, and see if this symptom goes away?

How many cores does the machine have, I'm guessing its big?

Jack


On Fri, Jun 11, 2010 at 12:44 PM, Bjoern A. Zeeb b...@freebsd.org wrote:

 On Fri, 11 Jun 2010, Jack F Vogel wrote:

  Author: jfv
 Date: Fri Jun 11 19:03:59 2010
 New Revision: 209060
 URL: http://svn.freebsd.org/changeset/base/209060

 Log:
  Remove a disable_queue from the beginning of the
  interrupt handler, automask handles it.
  Also, add in msix vector descriptions.

  MFC for 8.1 asap


 Hi Jack,

 I just tried a couple of days old HEAD before going to update to this one
 and found hundreds of the follwoing hanging the machine as the console
 stays
 busy for .. well don't know yet... load: 1.84  cmd: ifconfig 1386 [*ix0]
 399.98r 0.00u 0.07s 0% 1364k

 ...
 uma_zalloc_arg: zone mbuf_packet with the following non-sleepable locks
 held:
 exclusive sleep mutex ix0:rx(0) (ix0:rx(0)) r = 0 (0xff0001c25808)
 locked @ sys/modules/ixgbe/../../dev/ixgbe/ixgbe.c:3615
 exclusive sleep mutex ix0 (IXGBE Core Lock) r = 0 (0xff80110a73b8)
 locked @ sys/modules/ixgbe/../../dev/ixgbe/ixgbe.c:1197
 KDB: stack backtrace:
 db_trace_self_wrapper() at db_trace_self_wt_delta 15.e4dd9523a934dd00 too
 short rapper+0x2a
 kdb_backtrace() at kdb_backtrace+0x32
 _witness_debugger() at _witness_debugger+0x2b
 witness_warn() at witness_warn+0x314
 uma_zalloc_arg() at uma_zalloc_arg+0x3e
 ixgbe_init_locked() at ixgbe_init_locked+0x6cd
 ixgbe_init() at ixgbe_init+0x39
 ether_ioctl() at ether_ioctl+0x71
 ...


 This happened on:
foo.example.net# ifconfig ix0 up
 after kldload ixgbe.

 /bz



  Modified:
  head/sys/dev/ixgbe/ixgbe.c

 Modified: head/sys/dev/ixgbe/ixgbe.c

 ==
 --- head/sys/dev/ixgbe/ixgbe.c  Fri Jun 11 18:46:34 2010(r209059)
 +++ head/sys/dev/ixgbe/ixgbe.c  Fri Jun 11 19:03:59 2010(r209060)
 @@ -1365,7 +1365,6 @@ ixgbe_msix_que(void *arg)
boolmore_tx, more_rx;
u32 newitr = 0;

 -   ixgbe_disable_queue(adapter, que-msix);
++que-irqs;

more_rx = ixgbe_rxeof(que, adapter-rx_process_limit);
 @@ -2121,6 +2120,9 @@ ixgbe_allocate_msix(struct adapter *adap
device_printf(dev, Failed to register QUE
 handler);
return (error);
}
 +#if __FreeBSD_version = 800504
 +   bus_describe_intr(dev, que-res, que-tag, que %d, i);
 +#endif
que-msix = vector;
adapter-que_mask |= (u64)(1  que-msix);
/*
 @@ -2155,6 +2157,9 @@ ixgbe_allocate_msix(struct adapter *adap
device_printf(dev, Failed to register LINK handler);
return (error);
}
 +#if __FreeBSD_version = 800504
 +   bus_describe_intr(dev, adapter-res, adapter-tag, link);
 +#endif
adapter-linkvec = vector;
/* Tasklets for Link, SFP and Multispeed Fiber */
TASK_INIT(adapter-link_task, 0, ixgbe_handle_link, adapter);



___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r209060 - head/sys/dev/ixgbe

2010-06-11 Thread Jack Vogel
Odd though, because that code is in the driver on a system with 16 cores and
I'm
not hearing about any problem from my test engineer.

Jack


On Fri, Jun 11, 2010 at 1:13 PM, Bjoern A. Zeeb b...@freebsd.org wrote:

 On Fri, 11 Jun 2010, Jack Vogel wrote:

 Hi,


  HM, I put in a change in response to some people having problems with
 mbuf resources,  it seemed to work ok, but now i'm kinda concerned. Does
 this
 happen every time you bring the device up?

 In the routine 'ixgbe_setup_receive_ring()'  I changed a couple of
 M_NOWAIT's
 to M_WAITOK, thinking that it would be ok in this code, can you test it,
 change
 it back to M_NOWAIT, and see if this symptom goes away?


 Will do and let you know.

 I assume you mean the ones as part of r208762?



  How many cores does the machine have, I'm guessing its big?


 4

 After ~890 of those tires, locks, abd backtraces deadlkres killed it;)

 /bz

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r209060 - head/sys/dev/ixgbe

2010-06-11 Thread Jack Vogel
OK, that's kinda what I was guessing... Damn, guess I'll have to change it
back.

Thanks for letting me know.

Jack


On Fri, Jun 11, 2010 at 1:23 PM, Bjoern A. Zeeb b...@freebsd.org wrote:

 On Fri, 11 Jun 2010, Jack Vogel wrote:

  Odd though, because that code is in the driver on a system with 16 cores
 and
 I'm
 not hearing about any problem from my test engineer.


 So this makes it all go away:

 --- //depot/user/bz/vimage/src/sys/dev/ixgbe/ixgbe.c2010-06-09
 07:53:30.0 
 +++ /zoo/bz/p4/bz_vimage/src/sys/dev/ixgbe/ixgbe.c  2010-06-09
 07:53:30.0 
 --- /tmp/tmp.96356.27   2010-06-11 16:19:14.0 -0400
 +++ /zoo/bz/p4/bz_vimage/src/sys/dev/ixgbe/ixgbe.c  2010-06-11
 16:16:02.0 -0400
 @@ -3637,7 +3637,7 @@ ixgbe_setup_receive_ring(struct rx_ring
goto skip_head;

/* First the header */
 -   rxbuf-m_head = m_gethdr(M_WAITOK, MT_DATA);
 +   rxbuf-m_head = m_gethdr(M_DONTWAIT, MT_DATA);
if (rxbuf-m_head == NULL) {
error = ENOBUFS;
goto fail;
 @@ -3659,7 +3659,7 @@ ixgbe_setup_receive_ring(struct rx_ring

  skip_head:
/* Now the payload cluster */
 -   rxbuf-m_pack = m_getjcl(M_WAITOK, MT_DATA,
 +   rxbuf-m_pack = m_getjcl(M_DONTWAIT, MT_DATA,
M_PKTHDR, adapter-rx_mbuf_sz);
if (rxbuf-m_pack == NULL) {
error = ENOBUFS;


 Are they running with WITNESS enabled to see the locking warnings?

 /bz

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r209060 - head/sys/dev/ixgbe

2010-06-11 Thread Jack Vogel
On Fri, Jun 11, 2010 at 1:27 PM, Jack Vogel jfvo...@gmail.com wrote:


 On Fri, Jun 11, 2010 at 1:23 PM, Bjoern A. Zeeb b...@freebsd.org wrote:

 On Fri, 11 Jun 2010, Jack Vogel wrote:

  Odd though, because that code is in the driver on a system with 16 cores
 and
 I'm
 not hearing about any problem from my test engineer.


 So this makes it all go away:

 --- //depot/user/bz/vimage/src/sys/dev/ixgbe/ixgbe.c2010-06-09
 07:53:30.0 
 +++ /zoo/bz/p4/bz_vimage/src/sys/dev/ixgbe/ixgbe.c  2010-06-09
 07:53:30.0 
 --- /tmp/tmp.96356.27   2010-06-11 16:19:14.0 -0400
 +++ /zoo/bz/p4/bz_vimage/src/sys/dev/ixgbe/ixgbe.c  2010-06-11
 16:16:02.0 -0400
 @@ -3637,7 +3637,7 @@ ixgbe_setup_receive_ring(struct rx_ring
goto skip_head;

/* First the header */
 -   rxbuf-m_head = m_gethdr(M_WAITOK, MT_DATA);
 +   rxbuf-m_head = m_gethdr(M_DONTWAIT, MT_DATA);
if (rxbuf-m_head == NULL) {
error = ENOBUFS;
goto fail;
 @@ -3659,7 +3659,7 @@ ixgbe_setup_receive_ring(struct rx_ring

  skip_head:
/* Now the payload cluster */
 -   rxbuf-m_pack = m_getjcl(M_WAITOK, MT_DATA,
 +   rxbuf-m_pack = m_getjcl(M_DONTWAIT, MT_DATA,
M_PKTHDR, adapter-rx_mbuf_sz);
if (rxbuf-m_pack == NULL) {
error = ENOBUFS;


 Are they running with WITNESS enabled to see the locking warnings?



He's running with a recent version of STABLE/8 so probably does not have
WITNESS on.
So you think that causes the problem? I just went into the lab, he does have
the WAITOK
in the driver, and the system has 16 cores. So, I'm still not clear why you
see a problem
when he does not.

I will change it back to NOWAIT in any case.

Jack
___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r209068 - head/sys/dev/e1000

2010-06-11 Thread Jack Vogel
LOL, I'm sorry John, I actually did put them into my local source, I dont
know what happened, just not my day :(

Jack


On Fri, Jun 11, 2010 at 2:25 PM, John Baldwin j...@freebsd.org wrote:

 On Friday 11 June 2010 4:54:27 pm Jack F Vogel wrote:
  Author: jfv
  Date: Fri Jun 11 20:54:27 2010
  New Revision: 209068
  URL: http://svn.freebsd.org/changeset/base/209068
 
  Log:
Add a couple fixes from Michael Tuexen.
Remove unneeded rxtx handler, make que handler generic.
Do not allocate header mbufs in rx ring if not doing hdr split.
Release the lock in rxeof call to stack.
 
MFC for 8.1 asap

 You just removed the bus_describe_intr() calls again.  Can you _please_ put
 those into your tree so you don't keep losing them?

 --
 John Baldwin

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r206215 - in stable/8/sys/modules: em ixgbe

2010-04-05 Thread Jack Vogel
Its been without the if_ prefix for a couple years :) However if enough
people's sense of propriety is offended I suppose I could change it.

As for adding it to the modules/Makefile, the main reason it was not
was that the users of 10G were very small, but that is changing so
I suppose its time to add it.  Will take care of that soon.

Jack


On Mon, Apr 5, 2010 at 9:10 PM, John Hay j...@meraka.org.za wrote:

 Hi Jack,

 On Mon, Apr 05, 2010 at 09:43:23PM +, Jack F Vogel wrote:
  Author: jfv
  Date: Mon Apr  5 21:43:22 2010
  New Revision: 206215
  URL: http://svn.freebsd.org/changeset/base/206215
 
  Log:
Add missing module Makefile for ixgbe and em MFCs
 
  Modified:
stable/8/sys/modules/em/Makefile
stable/8/sys/modules/ixgbe/Makefile

 I notice that in ixgbe/Makefile KMOD is ixgbe. Should it not be if_ixgbe?
 Most other network drivers have if_ in front. It is not because of this
 commit because it is like that in current too. I also see ixgbe is not
 listed in modules/Makefile, so it will not be built automatically with
 the rest. Any reason not to add it?

 Thanks

 John
 --
 John Hay -- j...@meraka.csir.co.za / j...@freebsd.org

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r205904 - head/sys/dev/ixgbe

2010-03-30 Thread Jack Vogel
Mad dash fixes always are a bad idea, lol. Thanks, correcting it.

Jack


On Tue, Mar 30, 2010 at 12:34 PM, Koop Mast k...@freebsd.org wrote:

 On Tue, 2010-03-30 at 19:09 +, Jack F Vogel wrote:

  Modified:
head/sys/dev/ixgbe/ixgbe.c
head/sys/dev/ixgbe/ixgbe.h
 
  Modified: head/sys/dev/ixgbe/ixgbe.c
 
 ==
  --- head/sys/dev/ixgbe/ixgbe.cTue Mar 30 19:08:05 2010
  (r205903)
  +++ head/sys/dev/ixgbe/ixgbe.cTue Mar 30 19:09:18 2010
  (r205904)
  @@ -1,6 +1,6 @@
 
  
 /**
 
  -  Copyright (c) 2001-2010, Intel Corporation
  +  Copyright (c) 2001-2009, Intel Corporation
   ^^
 Going back in time...

 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
  @@ -46,7 +46,7 @@ int ixgbe_display_debug_stat
   /*
*  Driver version
*/
  -char ixgbe_driver_version[] = 2.1.6;
  +char ixgbe_driver_version[] = 2.1.7;
 
   ^^
 with a newer version? Curious :)

 -Koop


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r200268 - head/sys/dev/e1000

2009-12-14 Thread Jack Vogel
Fixed in the commit today. Test again please.

Jack


On Sun, Dec 13, 2009 at 8:49 PM, Lawrence Stewart lstew...@freebsd.orgwrote:

 [picking a recent e1000 commit]

 Hi Jack,

 I'm getting the following panic on head r200376 on my HP DC7800 work
 desktop:

 mtx_lock() of spin mutex dev_spec-swflag_mutex @
 /usr/src/sys/dev/e1000/e1000_ich8lan.c:651

 I don't experience the panic with an 8.0-RELEASE kernel.

 Anything obviously wrong with that line of code as far as you're concerned,
 or do I need to dig some more detail out? Debugging with this system is
 painful, hence the initial hand transcribed minimal detail, but if you need
 more info I'll try figure out how to get you what you need.

 Cheers,
 Lawrence

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r200523 - head/sys/dev/e1000

2009-12-14 Thread Jack Vogel
Well, its a unique lock in the shared code, and I was already naming the
other
em locks, if there is some big loss in my doing that I don't have any big
emotional
investment in them being that way :)

Jack


On Mon, Dec 14, 2009 at 11:31 AM, John Baldwin j...@freebsd.org wrote:

 On Monday 14 December 2009 1:43:18 pm Jack F Vogel wrote:
  Author: jfv
  Date: Mon Dec 14 18:43:18 2009
  New Revision: 200523
  URL: http://svn.freebsd.org/changeset/base/200523
 
  Log:
Remove the MTX_SPIN flag to the shared code MUTEX
as it was causing a panic, also took the opportunity
to rename the lock for clarity.
 
  Modified:
head/sys/dev/e1000/e1000_osdep.h
 
  Modified: head/sys/dev/e1000/e1000_osdep.h
 

 ==
  --- head/sys/dev/e1000/e1000_osdep.h  Mon Dec 14 18:27:34 2009
  (r200522)
  +++ head/sys/dev/e1000/e1000_osdep.h  Mon Dec 14 18:43:18 2009
  (r200523)
  @@ -82,8 +82,7 @@
   /* Mutex used in the shared code */
   #define E1000_MUTEX struct mtx
   #define E1000_MUTEX_INIT(mutex) mtx_init((mutex), #mutex, \
  -MTX_NETWORK_LOCK, \
  -MTX_DEF | MTX_SPIN)
  +E1000 Shared Lock, MTX_DEF)
   #define E1000_MUTEX_DESTROY(mutex)  mtx_destroy(mutex)
   #define E1000_MUTEX_LOCK(mutex) mtx_lock(mutex)
   #define E1000_MUTEX_TRYLOCK(mutex)  mtx_trylock(mutex)

 Hmm, most NIC drivers use MTX_NETWORK_LOCK so that WITNESS will report LORs
 that happen if any two NIC drivers locks cross (e.g. if one driver leaked
 a
 lock while passing a packet up the stack that was forwarded to another
 interface).  Not sure if that is relevant to this particular lock though.

 --
 John Baldwin

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r196387 - in stable/8/sys: . dev/e1000

2009-08-19 Thread Jack Vogel
Thanks for doing this for me Xin.

Jack


On Wed, Aug 19, 2009 at 11:08 AM, Xin LI delp...@freebsd.org wrote:

 Author: delphij
 Date: Wed Aug 19 18:08:50 2009
 New Revision: 196387
 URL: http://svn.freebsd.org/changeset/base/196387

 Log:
  MFC r196386:

  Temporarily enhance em(4) and igb(4) hack to take account for IFF_NOARP.
  Without this changeset there will be no way to prevent these NICs from
  sending ARP, which is harmful in server farms that is configured as
  Direct Server Return behind a load balancer.

  A better fix would remove the whole hack completely but it would be
  later than 8.0-RELEASE.

  Reviewed by:  jfv, yongari
  Approved by:  re (kib)

 Modified:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/e1000/if_em.c
  stable/8/sys/dev/e1000/if_igb.c

 Modified: stable/8/sys/dev/e1000/if_em.c

 ==
 --- stable/8/sys/dev/e1000/if_em.c  Wed Aug 19 17:59:41 2009
  (r196386)
 +++ stable/8/sys/dev/e1000/if_em.c  Wed Aug 19 18:08:50 2009
  (r196387)
 @@ -1204,7 +1204,8 @@ em_ioctl(struct ifnet *ifp, u_long comma
em_init_locked(adapter);
EM_CORE_UNLOCK(adapter);
}
 -   arp_ifinit(ifp, ifa);
 +   if (!(ifp-if_flags  IFF_NOARP))
 +   arp_ifinit(ifp, ifa);
} else
  #endif
error = ether_ioctl(ifp, command, data);

 Modified: stable/8/sys/dev/e1000/if_igb.c

 ==
 --- stable/8/sys/dev/e1000/if_igb.c Wed Aug 19 17:59:41 2009
  (r196386)
 +++ stable/8/sys/dev/e1000/if_igb.c Wed Aug 19 18:08:50 2009
  (r196387)
 @@ -952,7 +952,8 @@ igb_ioctl(struct ifnet *ifp, u_long comm
igb_init_locked(adapter);
IGB_CORE_UNLOCK(adapter);
}
 -   arp_ifinit(ifp, ifa);
 +   if (!(ifp-if_flags  IFF_NOARP))
 +   arp_ifinit(ifp, ifa);
} else
  #endif
error = ether_ioctl(ifp, command, data);

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r194925 - head/sys/dev/e1000

2009-06-25 Thread Jack Vogel
Oh, hmmm, wasn't aware of that, I'll take a look at it today.

Thanks John,

Jack


On Thu, Jun 25, 2009 at 5:21 AM, John Baldwin j...@freebsd.org wrote:

 On Wednesday 24 June 2009 6:16:02 pm Jack F Vogel wrote:
  Author: jfv
  Date: Wed Jun 24 22:16:02 2009
  New Revision: 194925
  URL: http://svn.freebsd.org/changeset/base/194925
 
  Log:
need to make intr_bind call architecture specific for
global builds (failing sun4v lint build)

 You should be able to use BUS_BIND_INTR() instead which is not
 machine-dependent.  It accepts the IRQ resource directly as well which is a
 bit cleaner.

 --
 John Baldwin

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r191566 - head/sys/dev/e1000

2009-04-27 Thread Jack Vogel
DUH, thanks for catching it quickly, the build breaking would have sooner or
later though :)

Jack


On Mon, Apr 27, 2009 at 11:33 AM, Andreas Tobler andreast-l...@fgznet.chwrote:

 Jack F Vogel wrote:

 Author: jfv
 Date: Mon Apr 27 17:22:14 2009
 New Revision: 191566
 URL: http://svn.freebsd.org/changeset/base/191566

 Log:
  Thanks for Michael Tuexen for tracking down a path where
  the watchdog timer was not being rearmed in txeof, and also
  a missing case in the new code.
MFC after:2 weeks

 Modified:
  head/sys/dev/e1000/if_em.c

 Modified: head/sys/dev/e1000/if_em.c

 ==
 --- head/sys/dev/e1000/if_em.c  Mon Apr 27 16:57:19 2009(r191565)
 +++ head/sys/dev/e1000/if_em.c  Mon Apr 27 17:22:14 2009(r191566)
 @@ -1013,12 +1013,15 @@ em_transmit_locked(struct ifnet *ifp, st
if (ADAPTER_RING_EMPTY(adapter) 
(adapter-num_tx_desc_avail  EM_TX_OP_THRESHOLD)) {
if (em_xmit(adapter, m)) {
 -   if (m  (error = drbr_enqueue(ifp, adapter-br,
 m)) != 0) {
 +   if (m  (error = drbr_enqueue(ifp, adapter-br,
 m)) != 0)
return (error);
 -   }
 -   } else{
 -   /* Send a copy of the frame to the BPF listener */
 +   } else {
 +   /*
 +   ** Send a copy of the frame to the BPF
 +   ** listener and set the watchdog on.
 +   */
ETHER_BPF_MTAP(ifp, m);
 +   addapter-watchdog_timer = EM_TX_TIMEOUT;


 [deuterium_fbsd:sys/dev/e1000] andreast% svn diff  if_em.c
 Index: if_em.c
 ===
 --- if_em.c (revision 191575)
 +++ if_em.c (working copy)
 @@ -1021,7 +1021,7 @@
** listener and set the watchdog on.
*/
ETHER_BPF_MTAP(ifp, m);
 -   addapter-watchdog_timer = EM_TX_TIMEOUT;
 +   adapter-watchdog_timer = EM_TX_TIMEOUT;
}
} else if ((error = drbr_enqueue(ifp, adapter-br, m)) != 0)
return (error);


 Should fix the build.

 Andreas


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r191065 - head/sys/dev/e1000

2009-04-14 Thread Jack Vogel
LOL, er I meant Randall Stewert,  must be thinking of old films, sorry
Randall :)

On Tue, Apr 14, 2009 at 10:14 AM, Jack F Vogel j...@freebsd.org wrote:

 Author: jfv
 Date: Tue Apr 14 17:14:35 2009
 New Revision: 191065
 URL: http://svn.freebsd.org/changeset/base/191065

 Log:
  Thanks to Michael Tuexen and Randall Scott for providing a
  few important bug fixes found while they were doing SCTP
  development, and that I somehow lost during the scramble.

  Thanks guys!!

 Modified:
  head/sys/dev/e1000/if_igb.c

 Modified: head/sys/dev/e1000/if_igb.c

 ==
 --- head/sys/dev/e1000/if_igb.c Tue Apr 14 16:48:49 2009(r191064)
 +++ head/sys/dev/e1000/if_igb.c Tue Apr 14 17:14:35 2009(r191065)
 @@ -94,7 +94,7 @@ int   igb_display_debug_stats = 0;
  /*
  *  Driver version:
  */
 -char igb_driver_version[] = version - 1.5.2;
 +char igb_driver_version[] = version - 1.5.3;


  /*
 @@ -4002,7 +4002,7 @@ igb_rxeof(struct rx_ring *rxr, int count
accept_frame = 1;
hlen = plen = len_adj = 0;
sendmp = mh = mp = NULL;
 -   ptype = (u16)cur-wb.lower.lo_dword.data;
 +   ptype = (u16)(cur-wb.lower.lo_dword.data  4);

/* Sync the buffers */
bus_dmamap_sync(rxr-rxtag, rxr-rx_buffers[i].map,
 @@ -4103,16 +4103,16 @@ igb_rxeof(struct rx_ring *rxr, int count
rxr-lmp = mh-m_next;
}
} else {
 -   /* Chain mbuf's together */
 -   mh-m_flags = ~M_PKTHDR;
 -   rxr-lmp-m_next = mh;
 -   rxr-lmp = rxr-lmp-m_next;
 -   rxr-fmp-m_pkthdr.len += mh-m_len;
/* Adjust for CRC frag */
if (len_adj) {
rxr-lmp-m_len -= len_adj;
rxr-fmp-m_pkthdr.len -= len_adj;
}
 +   /* Chain mbuf's together */
 +   mh-m_flags = ~M_PKTHDR;
 +   rxr-lmp-m_next = mh;
 +   rxr-lmp = rxr-lmp-m_next;
 +   rxr-fmp-m_pkthdr.len += mh-m_len;
}

if (eop) {
 @@ -4256,7 +4256,7 @@ igb_rx_checksum(u32 staterr, struct mbuf
  #endif
/* Did it pass? */
if (!(errors  E1000_RXD_ERR_TCPE)) {
 -   mp-m_pkthdr.csum_flags = type;
 +   mp-m_pkthdr.csum_flags |= type;
if (!sctp)
mp-m_pkthdr.csum_data = htons(0x);
}

___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r191065 - head/sys/dev/e1000

2009-04-14 Thread Jack Vogel
2 SCTP specific bugs, one is a missing shift to correctly identify SCTP type
in the
descriptor, the second was incorrectly assigning rather than 'or-ing' the
csum_flags,
leading to the inability to do other types of offload downstream.

The third bug was more subtle, the code to detect a CRC fragment in rxeof
was
being done at the wrong point, resulting in a crash/panic.

Jack


On Tue, Apr 14, 2009 at 10:34 AM, Sam Leffler s...@freebsd.org wrote:

 Jack F Vogel wrote:

 Author: jfv
 Date: Tue Apr 14 17:14:35 2009
 New Revision: 191065
 URL: http://svn.freebsd.org/changeset/base/191065

 Log:
  Thanks to Michael Tuexen and Randall Scott for providing a
  few important bug fixes found while they were doing SCTP
  development, and that I somehow lost during the scramble.
Thanks guys!!



 Attribution is great but perhaps you could say what bugs were fixed?

   Sam


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org


Re: svn commit: r190872 - head/sys/dev/e1000

2009-04-13 Thread Jack Vogel
There is quite a bit of shared code changes to support alternate mac
addressing, if
you look at the diffs you'll notice in attach I inserted a reset, and then
also moved
where hardware init is called, this is because the shared code now requires
RAR(0)
to have a valid address in it when it does setup, reset causes that, but
init_hardware
will zero the RAR array out.

I have no idea what your environment is, but it sounds like it may be
related.

If you have a driver that works, you could try taking the new if_em.* and
drop
them in, see if that solves it. But right now my guess is this issue is in
the shared
code and not the core.

Let me know what you find,

Jack


On Sun, Apr 12, 2009 at 10:08 PM, Mike Silbersack si...@silby.com wrote:


 Jack, either this or some other recent change to the em driver caused it to
 stop working correctly on the e1000 virtual device inside VMware ESX.
 Unfortunately, I have not updated my 8.x VMs recently, so I don't know when
 this broke.

 I got the message about an invalid MAC address.  I modified
 em_is_valid_ether_addr to always return True, but it looks like the effect
 of that was to cause the driver to load, but give the NIC a MAC of
 00:00:00:00:00:00.  However, if I manually set a MAC after that, the virtual
 NIC IS functional.  So I think the sole problem may just be that the code
 which reads the MAC is incompatible with the ESX emulation.

 Do you want me to try a kernel from immediately before this change to
 confirm that this was the cause of the problem?

 Mike Silby Silbersack


 On Fri, 10 Apr 2009, Jack F Vogel wrote:

  Author: jfv
 Date: Fri Apr 10 00:05:46 2009
 New Revision: 190872
 URL: http://svn.freebsd.org/changeset/base/190872

 Log:
  This delta syncs the em and igb drivers with Intel,
  adds header split and SCTP support into the igb driver.
  Various small improvements and fixes.


___
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org