• Jacob Keller's avatar
    i40e: implement support for flexible word payload · 0e588de1
    Jacob Keller authored
    Add support for flexible payloads passed via ethtool user-def field.
    This support is somewhat limited due to hardware design. The input set
    can only be programmed once per filter type, and the flexible offset is
    part of this filter input set. This means that the user cannot program
    both a regular and a flexible filter at the same time for a given flow
    type. Additionally, the user may not program two flexible filters of the
    same flow type with different offsets, although they are allowed to
    configure different values at that offset location.
    
    We support a single flexible word (2byte) value per protocol type, and
    we handle the FLX_PIT register using a list of flexible entries so that
    each flow type may be configured separately.
    
    Due to hardware implementation, the flexible data is offset from the
    start of the packet payload, and thus may not be in part of the header
    data. For this reason, the offset provided by the user defined data is
    interpreted as a byte offset from the start of the matching payload.
    Previous implementations have tried to represent the offset as from the
    start of the frame, but this is not feasible because header sizes may
    change due to options.
    
    Change-Id: 36ed27995e97de63f9aea5ade5778ff038d6f811
    Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
    0e588de1
i40e_txrx.c 85.8 KB