17 Replies Latest reply on Aug 2, 2015 6:37 PM by xiaoleshen

    Problem about Intel 82599 10 GbE Controller, help....

    ZhengXiang-CHN Green Belt

       

       

       

      Hi Everyone:
      Purpose:
      Regularly,we use optical module that kind of using two pairs of fiber, one for tx, and one for rx. But in some case, we need to use only one fiber,and the transmit in only one direction, that is from one optical`s tx to the other`s rx.
      Here is my problem , when I remove one fiber, the network adapter turn to the status down,and i think it is because of the Negotiation failed。
      So,I look up the 82599 DataSheet, and find this:
      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      3.7.4.6 Forcing Link Up
      Forcing link up can be accomplished by software by setting the AUTOC.FLU bit to 1b,
      which forces the MAC to the appropriate MAC link speed as defined by the AUTOC.LMS
      field and the appropriate protocol as defined by the AUTOC.10G_PMA_PMD_PARALLEL,
      AUTOC2.10G_PMA_PMD_Serial and AUTOC.1G_PMA_PMD bits. The Force-Link-Up mode
      enables loopback operation (when HLREG0.LPBK is set to 1b) by setting the link_up
      indication regardless of the XGXS/PCS_1G/KR_locked status. Link indication in register
      LINKS should be ignored when in this mode.
      -------------------------------------------------------------------------------------------------------------------------------------------------

      That means,in my case,i should set the AUTOC.FLU(AutoNegotiation Force Link UP)register to bit 1, and set  AUTOC.1G_PMA_PMD in speed 1000M,
      Or, set AUTOC.10G_PMA_PMD_PARALLEL, AUTOC2.10G_PMA_PMD_Serial in speed 10G.

      Problem:
      1)With the 1000M speed, i set the AUTOC.FLU=1, AUTOC.LMS=000(1 GbE link , no backplane auto-negotiation), and AUTOC.1G_PMA_PMD = 0(SFI PMA/PMD); and it works ok(I use one for tx, and one for rx);
      2)But with the 10G speed,i try set these registers,but it does not work.
      I set these register by result of the AutoNegotiation, in my case , the 10G negotiation result is :
      10G:
      3231539204 - AUTOC , that means , the LMS = 011 (10 GbE serial link), the 10G_PMA_PMD_PARALLEL = 00(XAUI PMA/PMD)
      655360     - AUTOC2, that means, the AUTOC2.10G_PMA_PMD_Serial = 10(SFI)
      So, in my case, I set the AUTOC.FLU=1, AUTOC.LMS=011, the 10G_PMA_PMD_PARALLEL = 00, the AUTOC2.10G_PMA_PMD_Serial = 10, it works failed.
      also, i set the AUTOC.FLU=1, AUTOC.LMS=011 (10GbE, without AutoNegotiation, but this is the parallel link0), the 10G_PMA_PMD_PARALLEL = 00, the AUTOC2.10G_PMA_PMD_Serial = 10, it works failed.

      And other values combination of these register i tryed , and it works failed too, So, maybe someone can help me with this problem?


      In Chinese:
      -------------------------------------------------
      大家好,请教一个问题:
      通常我们使用光纤的时候,使用的光模块都是使用2根光纤的,一个用于收,一个用于发,为了同时实现收发,都是同时使用2根的。
      但是在某些应用场景下,我们需要使用1根光纤来连接两个光模块,以实现传输的单向性,比如如下的这种场景:

      摘自网络上:
      ”通常普通光模块(非单纤双向光模块哦)必须是插两根光纤才可以UP,可以正常通信,那为啥还有只是用一根光纤的场景呢?
      两根光纤主要是一根只负责发送报文,一根只负责接收报文,有人会问如果只查一根光纤,那就代表本端设备就仅仅只能接收报文,或者仅仅是发送报文,这哪满足报文交互通信呢?但的确是有这样的场景,下面就列举一个和网络安全相关的场景哈
      网络中存在分析服务器,负责将用户的流量进行分析、记录和处理。如果服务器不仅可以接收报文,还可以对外发送报文,将造成分析报文外传,降低了数据的安全性。交换机和分析服务器只通过一根光纤连接,达到服务器只接收报文,交换机只发送报文。当然还需要由命令single-fiber enable配置个单纤通信功能。这样接口就可以UP,可以通信啦。“

       

      当我将其中一根光纤拔掉的时候,两端的网卡均会down掉,我怀疑这个是因为底层链路自动协商失败的原因,所以我就去查找了82599的芯片手册,并发现了如下的一段:
      ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      3.7.4.6 Forcing Link Up
      Forcing link up can be accomplished by software by setting the AUTOC.FLU bit to 1b,
      which forces the MAC to the appropriate MAC link speed as defined by the AUTOC.LMS
      field and the appropriate protocol as defined by the AUTOC.10G_PMA_PMD_PARALLEL,
      AUTOC2.10G_PMA_PMD_Serial and AUTOC.1G_PMA_PMD bits. The Force-Link-Up mode
      enables loopback operation (when HLREG0.LPBK is set to 1b) by setting the link_up
      indication regardless of the XGXS/PCS_1G/KR_locked status. Link indication in register
      LINKS should be ignored when in this mode.
      -------------------------------------------------------------------------------------------------------------------------------------------------

      根据这段说明,当把AUTOC寄存器的FLU位置1的时候,可以保证网卡的link status为UP的,并且这个时候网卡的连接速度由AUTOC.LMS、AUTOC.10G_PMA_PMD_PARALLEL、AUTOC2.10G_PMA_PMD_Serial and AUTOC.1G_PMA_PMD 寄存器来
      控制,很明显 AUTOC.1G_PMA_PMD 用于配置 速度为1G的时候,并且我试验了一下可以成功,此时我设置了AUTOC.FLU=1, AUTOC.LMS=000(1 GbE link , no backplane auto-negotiation), and AUTOC.1G_PMA_PMD = 0(SFI PMA/PMD);

      而当配置为10G速度时,就出现了问题:
      由于不是很明显数据手册上BX4/SFI/Parallel link/Serial Link这些词的意思,我根据网卡自动协商为10G时的配置来指导我接下来要配置的寄存器,以下是我自动协商时两个寄存器的配置
      3231539204 - AUTOC , that means , the LMS = 011 (10 GbE serial link), the 10G_PMA_PMD_PARALLEL = 00(XAUI PMA/PMD)
      655360     - AUTOC2, that means, the AUTOC2.10G_PMA_PMD_Serial = 10(SFI)

      所以我配置 AUTOC.FLU=1, AUTOC.LMS=011(10G的Serial link), the 10G_PMA_PMD_PARALLEL = 00, the AUTOC2.10G_PMA_PMD_Serial = 10(SFI, 自动协商也是这个结果),但是并没有成功(我一端发送,一端接收);

      我又进行了其他的组合,发现也没有生效,实在没有头绪了,请社区里面各位大神帮忙指点一下,不胜感激!

       

      Thanks a lot !!!