mirror of https://gitee.com/openkylin/linux.git
ixgbevf: Adds function to set PSRTYPE register
This patch creates a new function to set PSRTYPE. This function helps lay the ground work for eventual multi queue support. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
This commit is contained in:
parent
2e0103810c
commit
1bb9c6390e
|
@ -1082,6 +1082,21 @@ static void ixgbevf_configure_srrctl(struct ixgbevf_adapter *adapter, int index)
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_VFSRRCTL(index), srrctl);
|
IXGBE_WRITE_REG(hw, IXGBE_VFSRRCTL(index), srrctl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ixgbevf_setup_psrtype(struct ixgbevf_adapter *adapter)
|
||||||
|
{
|
||||||
|
struct ixgbe_hw *hw = &adapter->hw;
|
||||||
|
|
||||||
|
/* PSRTYPE must be initialized in 82599 */
|
||||||
|
u32 psrtype = IXGBE_PSRTYPE_TCPHDR | IXGBE_PSRTYPE_UDPHDR |
|
||||||
|
IXGBE_PSRTYPE_IPV4HDR | IXGBE_PSRTYPE_IPV6HDR |
|
||||||
|
IXGBE_PSRTYPE_L2HDR;
|
||||||
|
|
||||||
|
if (adapter->num_rx_queues > 1)
|
||||||
|
psrtype |= 1 << 29;
|
||||||
|
|
||||||
|
IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, psrtype);
|
||||||
|
}
|
||||||
|
|
||||||
static void ixgbevf_set_rx_buffer_len(struct ixgbevf_adapter *adapter)
|
static void ixgbevf_set_rx_buffer_len(struct ixgbevf_adapter *adapter)
|
||||||
{
|
{
|
||||||
struct ixgbe_hw *hw = &adapter->hw;
|
struct ixgbe_hw *hw = &adapter->hw;
|
||||||
|
@ -1129,8 +1144,7 @@ static void ixgbevf_configure_rx(struct ixgbevf_adapter *adapter)
|
||||||
int i, j;
|
int i, j;
|
||||||
u32 rdlen;
|
u32 rdlen;
|
||||||
|
|
||||||
/* PSRTYPE must be initialized in 82599 */
|
ixgbevf_setup_psrtype(adapter);
|
||||||
IXGBE_WRITE_REG(hw, IXGBE_VFPSRTYPE, 0);
|
|
||||||
|
|
||||||
/* set_rx_buffer_len must be called before ring initialization */
|
/* set_rx_buffer_len must be called before ring initialization */
|
||||||
ixgbevf_set_rx_buffer_len(adapter);
|
ixgbevf_set_rx_buffer_len(adapter);
|
||||||
|
|
Loading…
Reference in New Issue