[dpdk-dev] problem with continual link status down events

2016-09-01 Thread Coulson, Ken
I am seeing a problem with link state change using interrupts using a Broadwell
with on-board 10G-BaseT LAN ports (0x15AD) running DPDK 16.04.  There is an Ixia
connected to the two 10G ports and both are initially up.  One of the
connections is brought down via the Ixia and the software gets a single down
event through the callback installed with rte_eth_dev_callback_register() and
enabling lsc in the rte_eth_conf structure.  The connection is then re-enabled
and a single up event is received as expected.  However on the other 10G port
when the connection is brought down sporadic down events are continually
received at a frequency ranging from about 1 seconds to 20 seconds.
I do not see the problem with the two 1G ports.  The problem has been
seen on two different Broadwell boxes.

I'm looking for information from others that have seen anything like this 
problem.

Ken Coulson
Software Engineer with Ciena


[dpdk-dev] Question about driver/controller MTU enforcement with MTU less than jumbo frame size

2017-05-09 Thread Coulson, Ken
Is it possible to have an MTU enforced on rx that is less than jumbo size 
frames?
>From the DPDK driver code snippet for ixgbe if MTU < 1518 then the jumbo_frame 
>control bit in the chip is set to 0.
The controller manual says the maximum frame size is only meaningful when the 
jumbo_frame control bit is 1.
Does it work to leave jumbo_frame set to 1 but set max frame size to something 
smaller than the jumbo size of 1518?

>From 82559 10 GbE Controller manual, section 8.2.3.22.13, page 669, Max Frame 
>Size:

   This field defines the maximum frame size in bytes units from Ethernet MAC
   addresses up to inclusive the CRC.  Frames received that are larger than this
   value are dropped.  This field is meaningful when jumbo frames are enabled
   (HLREG0.JUMBOEN = 1b).  When jumbo frames are not enabled the 82599 uses a
   hardwired value of 1518 for this field.  The MFS does not include the 4 
bytes of
   the VLAN header. Packets with VLAN header can be as large as MFS + 4. When
   double VLAN is enabled, the device adds 8 to the MFS for any packets.  This
   value has no effect on transmit frames; it is the responsibility of software 
to
   limit the size of transmit frames.

10G driver dpdk/drivers/net/ixgbe/ixgbe_ethdev.c:

   ixgbe_dev_mtu_set(struct rte_ethd_dev *dev, uint16_t mtu)
  uint32_t frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN;  /* + 18 */
  ETHER_MAX_LEN = 1518

  /* switch to jumbo mode if needed */
  if (frame_size > ETHER_MAX_LEN) {
 dev->data->dev_conf.rxmode.jumbo_frame = 1;
 hlreg0 |= IXGBE_HLREG0_JUMBOEN;
  } else {
 dev->data->dev_conf.rxmode.jumbo_frame = 0;
 hlreg0 &= ~IXGBE_HLREG0_JUMBOEN;
  }
  IXGBE_WRITE_REG(hw, IXGBE_HLREG0, hlreg0);

  /* update max frame size */
  dev->data->dev_conf.rxmode.max_rx_pkt_len = frame_size;

  maxfrs = IXGBE_READ_REG(hw, IXGBE_MAXFRS);
  maxfrs &= 0x;
  maxfrs |= (dev->data->dev_conf.rxmode.max_rx_pkt_len << 16);
  IXGBE_WRITE_REG(hw, IXGBE_MAXFRS, maxfrs);

Ken Coulson
Software Engineer
509-242-9273
Ciena