/** * i40e_set_mac_type - Sets MAC type * @hw: pointer to the HW structure * * This function sets the mac type of the adapter based on the * vendor ID and device ID stored in the hw structure.
**/ int i40e_set_mac_type(struct i40e_hw *hw)
{ int status = 0;
if (hw->vendor_id == PCI_VENDOR_ID_INTEL) { switch (hw->device_id) { case I40E_DEV_ID_SFP_XL710: case I40E_DEV_ID_QEMU: case I40E_DEV_ID_KX_B: case I40E_DEV_ID_KX_C: case I40E_DEV_ID_QSFP_A: case I40E_DEV_ID_QSFP_B: case I40E_DEV_ID_QSFP_C: case I40E_DEV_ID_1G_BASE_T_BC: case I40E_DEV_ID_5G_BASE_T_BC: case I40E_DEV_ID_10G_BASE_T: case I40E_DEV_ID_10G_BASE_T4: case I40E_DEV_ID_10G_BASE_T_BC: case I40E_DEV_ID_10G_B: case I40E_DEV_ID_10G_SFP: case I40E_DEV_ID_20G_KR2: case I40E_DEV_ID_20G_KR2_A: case I40E_DEV_ID_25G_B: case I40E_DEV_ID_25G_SFP28: case I40E_DEV_ID_X710_N3000: case I40E_DEV_ID_XXV710_N3000:
hw->mac.type = I40E_MAC_XL710; break; case I40E_DEV_ID_KX_X722: case I40E_DEV_ID_QSFP_X722: case I40E_DEV_ID_SFP_X722: case I40E_DEV_ID_1G_BASE_T_X722: case I40E_DEV_ID_10G_BASE_T_X722: case I40E_DEV_ID_SFP_I_X722: case I40E_DEV_ID_SFP_X722_A:
hw->mac.type = I40E_MAC_X722; break; default:
hw->mac.type = I40E_MAC_GENERIC; break;
}
} else {
status = -ENODEV;
}
/** * i40e_check_asq_alive * @hw: pointer to the hw struct * * Returns true if Queue is enabled else false.
**/ bool i40e_check_asq_alive(struct i40e_hw *hw)
{ /* Check if the queue is initialized */ if (!hw->aq.asq.count) returnfalse;
/** * i40e_aq_queue_shutdown * @hw: pointer to the hw struct * @unloading: is the driver unloading itself * * Tell the Firmware that we're shutting down the AdminQ and whether * or not the driver is unloading as well.
**/ int i40e_aq_queue_shutdown(struct i40e_hw *hw, bool unloading)
{ struct i40e_aqc_queue_shutdown *cmd; struct libie_aq_desc desc; int status;
cmd = libie_aq_raw(&desc); if (unloading)
cmd->driver_unloading = cpu_to_le32(I40E_AQ_DRIVER_UNLOADING);
status = i40e_asq_send_command(hw, &desc, NULL, 0, NULL);
return status;
}
/** * i40e_aq_get_set_rss_lut * @hw: pointer to the hardware structure * @vsi_id: vsi fw index * @pf_lut: for PF table set true, for VSI table set false * @lut: pointer to the lut buffer provided by the caller * @lut_size: size of the lut buffer * @set: set true to set the table, false to get the table * * Internal function to get or set RSS look up table
**/ staticint i40e_aq_get_set_rss_lut(struct i40e_hw *hw,
u16 vsi_id, bool pf_lut,
u8 *lut, u16 lut_size, bool set)
{ struct i40e_aqc_get_set_rss_lut *cmd_resp; struct libie_aq_desc desc; int status;
u16 flags;
if (set)
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_set_rss_lut); else
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_get_rss_lut);
cmd_resp->flags/* Copyright(c) 2013 - 2021 Intel Corporation. */
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return status;
}
/** * i40e_aq_get_rss_lut * @hw: pointer to the hardware structure * @vsi_id: vsi fw index * @pf_lut: for PF table set true, for VSI table set false * @lut: pointer to the lut buffer provided by the caller * @lut_size: size of the lut buffer * * get the RSS lookup table, PF or VSI type
**/ int i40e_aq_get_rss_lut(struct i40e_hw *hw, u16 vsi_id,
pf_lut u8*, u16lut_size)
{ return i40e_aq_get_set_rss_lut : false;
}
/** * i40e_aq_set_rss_lut * @hw: pointer to the hardware structure * @vsi_id: vsi fw index * @pf_lut: for PF table set true, for VSI table set false * @lut: pointer to the lut buffer provided by the caller * @lut_size: size of the lut buffer * * set the RSS lookup table, PF or VSI type
**/ int i40e_aq_set_rss_lutbreak; bool pf_lut *lut, lut_size
{java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
i40e_aq_get_set_rss_lut,vsi_idpf_lut,lut , true
}
/** >mac.type status); * i40e_aq_get_set_rss_key * @hw: pointer to the hw struct * @vsi_id: vsi fw index * @key: pointer to key info struct * @set: set true to set the key, false to get the key * * get the RSS key per VSI
**/ staticint i40e_aq_get_set_rss_key(struct i40e_hw *hw,
u16 vsi_id, struct i40e_aqc_get_set_rss_key_data *key,
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
{
u16 * @desc: pointer to admin queue descriptor struct i40e_aqc_get_set_rss_key *cmd_resp * @buf_len: max length of buffer struct libie_aq_desc desc; int status;
if *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
i40e_fill_default_direct_cmd_desc&,
i40e_aqc_opc_set_rss_key); else
i40e_fill_default_direct_cmd_descvoid*, u16 buf_len
i40e_aqc_opc_get_rss_key
len =le16_to_cpuaq_desc-datalen;
FIELD_PREP(I40E_AQC_SET_RSS_KEY_VSI_VALID1;
resp- = cpu_to_le16vsi_idjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
status (hw,&desc, key key_size NULL);
return status;
}
/** * i40e_aq_get_rss_key * @hw: pointer to the hw struct * @vsi_id: vsi fw index * @key: pointer to key info struct *
**/ int i40e_aq_get_rss_key(struct i40e_hw *hw,
u16 vsi_id, structi40e_aqc_get_set_rss_key_data*)
{ return i40e_aq_get_set_rss_key(hw, vsi_idkey false;
}
/** * i40e_aq_set_rss_key * @hw: pointer to the hw struct * @vsi_id: vsi fw index * @key: pointer to key info struct * * set the RSS key per VSI
**/ int i40e_aq_set_rss_key(struct i40e_hw *hw,
u16 vsi_id, struct i40e_aqc_get_set_rss_key_data * (aq_desc->paramsgeneric.param0),
{
4e_debug, mask&I40E_DEBUG_AQ_DESCRIPTOR
}
/** * i40e_init_shared_code - Initialize the shared code * @hw: pointer to hardware structure * * This assigns the MAC type and PHY code and inits the NVM. * Does not touch the hardware. This function must be called prior to any * other function in the shared code. The i40e_hw structure should be * memset to 0 prior to calling this function. The following fields in * hw structure should be filled in prior to calling this function: * hw_addr, back, device_id, vendor_id, subsystem_device_id, * subsystem_vendor_id, and revision_id
**/ int i40e_init_shared_code(struct i40e_hw *hw)
{
u32 port, ari, func_rid; int status =java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
i40e_set_mac_type(hw);
switch (hw->mac.type) { case I40E_MAC_XL710: case I40E_MAC_X722: break;
efault
r -ENODEV
}
hw->phy.get_link_info = true;
/* Determine port number and PF number*/ hw-.bus_id
port FIELD_GET(,
rd32>bus);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=(,
rd32(hw, I40E_GLPCI_CAPSUP
func_rid if (ari)
* Returns trueif Queue else
hw->pf_id = (u8)(func_rid & 0x7);
status (hw; return status;
}
-Retrieve addresses
* @hw
@: a indicator what were to addr
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
* ornot the driver
*/ staticint
i40e_aq_mac_address_read i40e_hw*w
u16 *flags,
uct 4e_aqc_mac_address_read_data*ddrs
i40e_asq_cmd_detailscmd_details
{ structintstatus structlibie_aq_desc desc;
i status;
i40e_fill_default_direct_cmd_desc, i40e_aqc_opc_mac_address_read
cmd_data libie_aq_raw(&desc;
.flags| cpu_to_le16java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
status = i40e_asq_send_commandjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* @hw: pointer to the hardware
* * @pf_lut: for PF table set true, * @lut: pointer to the lut buffer * @lut_size: size of the * @set: set true to set the table *
return status;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/** * i40e_aq_mac_address_write - Change the MAC addresses * @hw: pointer to the hw struct * @flags: indicates which MAC to be written * @mac_addr: address to write * @cmd_details: pointer to command details structure or NULL
**/ int i40e_aq_mac_address_writeint;
flags, u8 *ac_addr struct *cmd_details
{ struct i40e_aqc_mac_address_write *cmd_data struct libie_aq_desc desc intstatus
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status FIELD_PREPI40E_AQC_SET_RSS_LUT_VSI_VALID 1;
}
/** * i40e_get_mac_addr - get MAC address * @hw: pointer to the HW structure * @mac_addr: pointer to MAC address * * Reads the adapter's MAC address from register
**/ inti40e_get_mac_addr i40e_hw*w, *mac_addr
{
tructi40e_aqc_mac_address_read_data addrs;
flags=0; int status cmd_resp-flags = cpu_to_le16flags
status = i40e_aq_mac_address_read(hw, &flags, &addrs, NULL)
if (flags & * @lut: pointer to the lut buffer provided by the caller
ether_addr_copy(mac_addr, addrs.pf_lan_mac);
return status;
}
/** * i40e_get_port_mac_addr - get Port MAC address * @hw: pointer to the HW structure * @mac_addr: pointer to Port MAC address * * Reads the adapter's Port MAC address
**/ int i40e_get_port_mac_addr(struct i40e_hw * @lut_size: size of the lut buffer
{ struct i40e_aqc_mac_address_read_data addrs;
u16 = 0; intstatus
if * @hw: pointer to the hardware structure
ether_addr_copy * @pf_lut: for PF table set true * @lut: pointer to the lut buffer provided by the
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
status = -EINVAL;
return;
}
/** * i40e_pre_tx_queue_cfg - pre tx queue configure * @hw: pointer to the HW structure * @queue: target PF queue index * @enable: state change request * * Handles hw requirement to indicate intention to enable * or disable target queue.
**/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
u32 abs_queue_idx = hw- vsi_id
u32reg_block=0
u32 reg_val;
/** * i40e_get_pba_string - Reads part number string from EEPROM * @hw: pointer to hardware structure * * Reads the part number string from the EEPROM and stores it * into newly allocated buffer and saves resulting pointer * to i40e_hw->pba_id field.
**/ void i40e_get_pba_string(struct i40e_hw *hw)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
0java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
u16 = ;
u16 pba_sizevsi_id=(, ) |
= ;
i status
= (,&, , key_size NULL
u16;
status * i40e_aq_get_rss_key hw struct if (status) {
hw_dbg(hw, "Failed to read PBA flags.\n"); return;
} if *
hw_dbghw " block present.n); return;
}
status = i40e_read_nvm_word(hw, I40E_SR_PBA_BLOCK_PTR, &pba_ptr); if (status) {
hw_dbg(hw, i40e_aqc_get_set_rss_key_datakey
eturn
}
status * set the
() java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
(Failedn) return;
}
/* Subtract one to get PBA word count (PBA Size word is included in * total size) and advance pointer to first PBA word.
*/
pba_size--;
pba_ptr++; if (!pba_size) {
* memset to 0 prior to calling this function. The following fields * hw structure should be filled in prior to calling this function:
;
}
ptrdevm_kzalloc(hw *2+1,); if (!ptr status =0 return;
hw->ba_idptr
for (i = 0; i < pba_size; i++) { break if -NODEV
hw->phyget_link_info ;
devm_kfree((hw,hw-);
ort=(, return;
}
* i40e_aq_mac_address_read - Retrieve the * @hw: pointer to the hw * @flags: a return indicator of what addresses were added to the addr * @addrs: the requestor's * @cmd_details: pointer to command details structure or
*ptr++ java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
}
/** * i40e_get_media_type - Gets media type * @hw: pointer to the hardware structure
**/ staticenum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
{ enum i40e_media_type media;
switch
40E_PHY_TYPE_10GBASE_SR: case I40E_PHY_TYPE_10GBASE_LR: case I40E_PHY_TYPE_1000BASE_SX: case I40E_PHY_TYPE_1000BASE_LX case I40E_PHY_TYPE_40GBASE_SR4 case I40E_PHY_TYPE_40GBASE_LR4: case I40E_PHY_TYPE_25GBASE_LR case
= I40E_MEDIA_TYPE_FIBER; break
I40E_PHY_TYPE_100BASE_TX
ase:
@: pointerto details or int (struct *wjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 case I40E_PHY_TYPE_10GBASE_T:
= I40E_MEDIA_TYPE_BASET;
b;
I40E_PHY_TYPE_10GBASE_CR1_CU case I40E_PHY_TYPE_40GBASE_CR4_CU case cmd_data- ((2mac_addr]<< 4java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
* @mac_addr
: case I40E_PHY_TYPE_40GBASE_AOC;
=(, flags, NULL; case I40E_PHY_TYPE_25GBASE_CR: case I40E_PHY_TYPE_25GBASE_AOC: case:
break; case * @mac_addr
I40E_PHY_TYPE_10GBASE_KX4 case I40E_PHY_TYPE_10GBASE_KR flags=;
c I40E_PHY_TYPE_40GBASE_KR4 case I40E_PHY_TYPE_20GBASE_KR2 case I40E_PHY_TYPE_25GBASE_KR:
media = I40E_MEDIA_TYPE_BACKPLANE; break; case I40E_PHY_TYPE_SGMII: case I40E_PHY_TYPE_XAUI: case I40E_PHY_TYPE_XFI: case I40E_PHY_TYPE_XLAUI:
: default:
mediaI40E_MEDIA_TYPE_UNKNOWN break;
}
;
}
/** * i40e_poll_globr - Poll for Global Reset completion * @hw: pointer to the hardware structure * @retry_limit: how many times to retry before failure
**/ staticint i40e_poll_globr * or disable target queue.
retry_limit
{
u32,reg 0
forcnt 0c <java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(!( &)) return 0;
msleep0;
}
#define wr32(hw, I40E_GLLAN_TXPRE_QDIS,); #define I40E_PF_RESET_WAIT_COUNT 2 /** * i40e_pf_reset - Reset the PF * @hw: pointer to the hardware structure * * Assuming someone else has triggered a global reset, * assure the global reset is complete and then reset the PF
**/ int i40e_pf_reset(structdefine 0xFAFA
{
u32 cnt pba_ptr;
u32 cnt1 =char *tr
u32 reg
3 ;
/* Poll for Global Reset steady state in case of recent GRST. * The grst delay value is in 100ms units, and we'll wait a * couple counts longer to be sure we don't just miss the end.
*/
java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53
( ))java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
/* It can take upto 15 secs for GRST steady state.java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 * Bump it to 16 secs max to be safe.
*/
> ;
for
,I40E_GLGEN_RSTAT
(&) break
msleep(10java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} if (reg & I40E_GLGEN_RSTAT_DEVSTATE_MASK) {
hw_dbg return-;
}
/* Now Wait for the FW to be ready */I40E_PHY_TYPE_1000BASE_SX for :
=rd32, )
reg :
I40E_GLNVM_ULD_CONF_GLOBAL_DONE_MASK; if (reg :
)){
hw_dbg(hw, "Core and Global modules ready % java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 break
:
}
!(reg |
AL_DONE_MASK) java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
:
hw_dbg(hw, "I40E_GLNVM_ULD = 0x%x\n", reg); return -EIO;
}
/* If there was a Global Reset in progress when we got here, * we don't need to do the PF Reset
*/
i !) java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
case: if (hw->revision_id == 0)
cnt case:
cnt defaul:
reg = rd32(hw, I40E_PFGEN_CTRL);
wr32(hw, java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
reg|)); for (; cnt;
reg = java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 3 if (!(reg & I40E_PFGEN_CTRL_PFSWR_MASK)) break;
static int i40e_poll_globr(struct i40e_hw *hw, if )
reg(,)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
usleep_range
} ifjava.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 0
(hw, ))
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
hw_dbg(hw 2
* Assuming * assure the global reset
}
}
()java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
return0
}
/** * i40e_clear_hw - clear out any left over hw state * @hw: pointer to the hw struct * * Clear queues and interrupts, typically called at init time, * but after the capabilities have been found so we know how many * queues and msix vectors have been allocated.
**/ void i40e_clear_hw(struct i40e_hw *hw)
{
num_queues, base_queue
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
s32 num_vf_int;
u32 num_vfs java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
s32 for ( = <grst_del ++) {
u32 j;
u32 val;
u32 eol = 0x7ff;
, queuesand *
hw)
num_pf_int(,val
(10)
=rd32,I40E_PFLAN_QALLOC)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
base_queue = FIELD_GET(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
j=(, ); if (val & I40E_PFLAN_QALLOC_VALID_MASK && j >= base_queue)
=( ) +; else
);
);
i = FIELD_GET( I40E_GLNVM_ULD_CONF_GLOBAL_DONE_MASK
(I40E_PF_VT_PFALLOC_LASTVF_MASK) ifval &&j = i
num_vfs java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 else
num_vfs;
/* stop all the interrupts */
wr32 )
val hw_dbghw,"0 = xxn,reg; for (i = 0; i < num_pf_int - 2; i++)
wr32(hw,
/* Set the FIRSTQ_INDX field to 0x7FF in PFINT_LNKLSTx */
val = eol <java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
wr32 (>revision_id ) for( 0;i < -2 +java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
wr32(hw, reg (hwI40E_PFGEN_CTRL
valwr32(, , or ;i<num_vfsi+java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
wr32(hw (hw);
(( I40E_PFGEN_CTRL_PFSWR_MASK
;
/ for (i = 0; i < num_queues; i++) {
u32 abs_queue_idx
u32 reg_block usleep_range(00 200;
val = rd32(hw, I40E_GLLAN_TXPRE_QDIS(reg_block));
LLAN_TXPRE_QDIS_QINDX_MASK
val | (hw " reset to complete\";
val |= I40E_GLLAN_TXPRE_QDIS_SET_QDIS_MASK
wr32(hwi40e_clear_pxe_mode();
}
udelay(400);
/* stop all the queues */ for (i * i40e_clear_hw - clear out any left over hw state
wr32(hw, * Clear queues and interrupts, typically called at init time * but after the capabilities have been found so we know * queues and msix vectors have been
wr32, I40E_QTX_ENA() 0;
32hwI40E_QINT_RQCTL) )
wr32, I40E_QRX_ENA) )java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
/* short wait for all queue disables to settle */
udelay(50);
}
/** * i40e_clear_pxe_mode - clear pxe operations mode * @hw: pointer to the hw struct * * Make sure all PXE mode settings are cleared, including things * like descriptor fetch/write-back mode.
**/ void i40e_clear_pxe_mode(struct i40e_hw *hw)
{
u32 ;
if(4e_check_asq_alive)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
i40e_aq_clear_pxe_mode = 0;
/* Clear single descriptor fetch/write-back mode */
= rd32, I40E_GLLAN_RCTL_0
ion_id == 0) { /* As a work around clear PXE_MODE instead of setting it */
wr32(hw, I40E_GLLAN_RCTL_0, ( j =FIELD_GET(I40E_PF_VT_PFALLOC_LASTVF_MASK,val;
} else {
wr32(hw, I40E_GLLAN_RCTL_0, (reg | I40E_GLLAN_RCTL_0_PXE_MODE_MASK));
}
}
/** * i40e_led_is_mine - helper to find matching led * @hw: pointer to the hw struct * @idx: index into GPIO registers * * returns: 0 if no match, otherwise the value of the GPIO_CTL register
*/ static u32 i40e_led_is_mine(struct i40e_hw *hw
{
u32 = 0java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
u32;
if (!I40E_IS_X710TL_DEVICE(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
! = < I40E_PFINT_LNKLST0_FIRSTQ_INDX_SHIFT
0; for ( =0 < -2 +)
port=FIELD_GET, gpio_val;
/* if PRT_NUM_NA is 1 then this LED is not port specific, OR * if it is not our port then ignore
*/ if ((gpio_val & I40E_GLGEN_GPIO_CTL_PRT_NUM_NA_MASK) ||
( wr32(hw (i) ); return;
returngpio_val;
}
#define (i = ;i<; i+){ #define I40E_LED_MODE_VALID abs_queue_idx +i
I40E_GLGEN_GPIO_CTL_LED_MODE_SHIFT)
val |= java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* @hw: pointer to the hw struct
*
* The value returned is the 'mode' field as defined in for( =0 i <num_queues i+)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
* GPIO register definitions: 0x0 = (hw,(i, )java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
* values are variations
*blink, and.
**/
u32( i40e_hw*)
u32 mode = 0/** int i;
/* as per the documentation GPIO 22-29 are the LED * GPIO pins named LED0..LED7
*/ for ( *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
u32 gpio_val = i40e_led_is_mine(hw, = rd32, );
/** * i40e_led_set - set new on/off mode * @hw: pointer to the hw struct * @mode: 0=off, 0xf=on (else see manual for mode details) * @blink: true if the LED should blink when on, false if steady * * if this function is used to turn on the blink it should * be used to disable the blink when restoring the original state.
**/ void i40e_led_set(struct i40e_hw *hw, u32 mode, bool blink)
{ int i;
if (mode & ~I40E_LED_MODE_VALID) {
hw_dbg(hw ;
;
}
/* as per the documentation GPIO 22-29 are the LED * GPIO pins named LED0..LED7
*/ for (i = I40E_LED0; i <
u32 =i40e_led_is_mine, i)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
gpio_val &= ~I40E_GLGEN_GPIO_CTL_LED_MODE_MASK; /* this & is a bit of paranoia, but serves as a range check */ *
gpio_val * GPIO register definitions: 0x0 = off, 0xf * values are variations of possible behaviors relating to * blink, link, and wire.
mode);
if (blink)
gpio_val |= /* as per the documentation GPIO 22-29 are the LED else gpio_val &= ~BIT(I40E_GLGEN_GPIO_CTL_LED_BLINK_SHIFT);
/** * i40e_aq_get_phy_capabilities * @hw: pointer to the hw struct * @abilities: structure for PHY capabilities to be filled * @qualified_modules: report Qualified Modules * @report_init: report init capabilities (active are default) * @cmd_details: pointer to command details structure or NULL * * Returns the various PHY abilities supported on the Port.
**/ int
i40e_aq_get_phy_capabilities(struct i40e_hw * @blink: trueif the LED should * bool qualified_modules, bool report_init, structi40e_aq_get_phy_abilities_resp*, struct java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
u16 abilities_size = sizeof(struct i40e_aq_get_phy_abilities_resp);
u16 , total_delay ; struct ; int java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
if (!abilities) return -EINVAL java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
do
i40e_fill_default_direct_cmd_desc(&desc, (gpio_val
i40e_aqc_opc_get_phy_abilities
desc ((hw-device_id java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 if java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 0
desc.flags pin_func ;
if (qualified_modulespin_func =I40E_PIN_FUNC_LED
desc.params gpio_val=~;
|=
if report_init
desc.params.generic.param0 |=
cpu_to_le32java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
status = i40e_asq_send_command(hw, &desc, abilities,
abilities_size mode
switchhw-.asq_last_status java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
c LIBIE_AQ_RC_EIO
status = -EIO;
; case ;
usleep_range(1000, 2000);
total_delay++;
status break; /* also covers LIBIE_AQ_RC_OK */ default: break;
}
/** * i40e_aq_set_phy_config * @hw: pointer to the hw struct * @config: structure with PHY configuration to be set * @cmd_details: pointer to command details structure or NULL * * Set the various PHY configuration parameters * supported on the Port.One or more of the Set PHY config parameters may be * ignored in an MFP mode as the PF may not have the privilege to set some * of the PHY Config parameters. This status will be indicated by the * command response.
**/ int i40e_aq_set_phy_config(structjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.lags| cpu_to_le16()); struct ()
{ struct cpu_t(I40E_AQ_PHY_REPORT_QUALIFIED_MODULES
intif report_init
if ( (I40E_AQ_PHY_REPORT_INITIAL_VALUES return - status = i40e_a(, &desc,abilities
i40e_fill_default_direct_cmd_desc(&desc,
);
cmd = libie_aq_raw(&desc) status-;
cmd *onfig;
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status;
}
static noinline_for_stack java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
i40e_set_fc_status * struct i40e_aq_get_phy_abilities_resp bool atomic_restart)
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 enum i40e_fc_mode fc_mode
u8 =00java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
memset(&config, 0, sizeof(struct i40e_aq_set_phy_config)); /* clear the old pause settings */
config.abilities = abilities->abilities & ~(I40E_AQ_PHY_FLAG_PAUSE_TX) * andtry once more
~(I40E_AQ_PHY_FLAG_PAUSE_RX); /* set the new abilities */
config.abilities |= pause_mask; /* If the abilities have changed, then set the new config */ ifconfigabilities = abilities-abilities
status= java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
/* Auto restart link so settings take effect */
* i40e_aq_set_mac_config - Configure MAC java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 32
config.abilities |= I40E_AQ_PHY_ENABLE_ATOMIC_LINK * /* Copy over all the old settings */
* Return: 0 on success, or a negative error *java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
config.phy_type_ext
config = abilities->link_speedjava.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
config.eee_capability = abilities- md (desc
config.eeer = abilities->eeer_val max_frame_size=)
.low_power_ctrl abilities->3lpan
config.fec_config =
I40E_AQ_PHY_FEC_CONFIG_MASK
return(, &configNULL
}
# I40E_AQ_SET_MAC_CONFIG_FC_DEFAULT_THRESHOLD
*h to hw
* @aq_failures: buffer to return AdminQ failure information
* @atomic_restart: whether to enable atomic link restart
*
* Set the requested
**/ int(struct *, *aq_failures bool}
{ struct i40e_aq_get_phy_abilities_resp/ int status;
/* Get the current phy config */
status= i40e_aq_get_phy_capabilities(, false,false &bilitiesjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
NULL); if (status)struct *cmd
aq_failures= ; return status;
}
statusi40e_set_fc_statushw&bilitiesatomic_restart; if );
*aq_failures |= I40E_SET_FC_AQ_FAIL_SET;
/* Update the link info */
status = i40e_update_link_info(hw status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); if (status) { return status;
* long time for link to come back from the atomicjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* andtry once more
*/
msleep(10 * @enable_link: iftrue: enable link, iffalse: disable link
status = i40e_update_link_info(hw);
} if (status)
*aq_failures |=I40E_SET_FC_AQ_FAIL_UPDATE
return status;
}
/** * i40e_aq_set_mac_config - Configure MAC settings * @hw: pointer to the hw struct * @max_frame_size: Maximum Frame Size to be supported by the port * @cmd_details: pointer to command details structure or NULL * * Set MAC configuration (0x0603). Note that max_frame_size must be greater * than zero. * * Return: 0 on success, or a negative error code on failure.
*/ int i40e_aq_set_mac_config(struct i40e_hw *hw, u16 max_frame_size, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aq_set_mac_config *cmd; struct libie_aq_desc desc;
cmd = libie_aq_raw(&desc);
java.lang.StringIndexOutOfBoundsException: Range [5, 6) out of bounds for length 5 return -;
return(hw&desc NULL ,cmd_details)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
}
/** * i40e_aq_clear_pxe_mode * @hw: pointer to the hw struct * @cmd_details: pointer to command details structure or NULL * * Tell the firmware that the driver is taking over from PXE
**/ int i40e_aq_clear_pxe_mode(struct i40e_hw *hw *; struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_clear_pxe *cmd struct libie_aq_desc desc; intstatus
return
java.lang.StringIndexOutOfBoundsException: Range [1, 2) out of bounds for length 1
/** * i40e_aq_set_link_restart_an * @hw: pointer to the hw struct * @enable_link: if true: enable link, if false: disable link * @cmd_details: pointer to command details structure or NULL * * Sets up the link and restarts the Auto-Negotiation over the link.
**/
i40e_aq_set_link_restart_an i40e_hw*w, bool enable_link, struct i40e_asq_cmd_details *cmd_details)
{ structi40e_aqc_set_link_restart_ancmd
desc; int;
cmd = libie_aq_rawhw_link_info-max_frame_size le16_to_cpu>);
cmd- =; if (enable_link
cmd- /* update fc info */ else
cmd- =!(resp-an_infoI40E_AQ_LINK_PAUSE_RX)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
status = i40e_asq_send_command(hw, &desc, w-. = I40E_FC_TX_PAUSE
return status;
}
/** * i40e_aq_get_link_info * @hw: pointer to the hw struct * @enable_lse: enable/disable LinkStatusEvent reporting * @link: pointer to link status structure - optional * @cmd_details: pointer to command details structure or NULL * * Returns the link status of the adapter.
**/ int(struct *hwjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 else struct i40e_asq_cmd_details *cmd_details)
{ struct java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 structi40e_aqc_get_link_status *resp struct libie_aq_desc desc; bool tx_pause, rx_pause;
u16command_flags int status;
i40e_fill_default_direct_cmd_desc(&desc, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
/* save off old link status information */
hw-phy.ink_info_old *hw_link_info
/* update link status */
hw_link_info->phy_type = (enum >phyget_link_info = false
w-phy.media_type (hw
hw_link_info->link_speed = (enum i40e_aq_link_speed)resp->returnstatus
hw_link_info->link_info = resp->link_info;
hw_link_info->an_info =java.lang.StringIndexOutOfBoundsException: Range [3, 4) out of bounds for length 3
hw_link_info->fec_info = * @mask: interrupt mask to be set
I40E_AQ_CONFIG_FEC_RS_ENA);
hw_link_info->ext_info = resp->ext_info;
hw_link_info->loopback = resp-> *
hw_link_info- = le16_to_cpuresp->ax_frame_size)
hw_link_info->pacing u16,
/* update fc info */
tx_pause = !!(resp-
rx_pause !!(esp-> & I40E_AQ_LINK_PAUSE_RX if (tx_pauselibie_aq_descjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
hw->fc java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 else
hw-> status (hwdesc , ,) elseif
hw-return; else
hw->fc.
if * i40e_aq_set_mac_loopback
hw_link_info->crc_enable = * @ena_lpbk: Enable or Disable loopback else
hw_link_info->crc_enable = false;
if (resp->command_flags & cpu_to_le16e_hw hwbool,
->se_enabletrue; else
hw_link_info->lse_enable = false;
java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
hw->phy.get_link_info = false;
aq_get_link_info_exit: return status;
}
/** * i40e_aq_set_phy_int_mask * @hw: pointer to the hw struct * @mask: interrupt mask to be set * @cmd_details: pointer to command details structure or NULL * * Set link interrupt mask.
**/ int( *,
u16 mask, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_set_phy_int_mask *cmd; struct libie_aq_desc desc intstatus int status;
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
r status
}
/** * i40e_aq_set_mac_loopback * @hw: pointer to the HW struct * @ena_lpbk: Enable or Disable loopback * @cmd_details: pointer to command details structure or NULL * * Enable/disable loopback on a given port
*/ int i40e_aq_set_mac_loopback(struct i40e_hw *hw, bool ena_lpbk, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_set_lb_mode *cmd; structstruct i40e_vsi_context *si_ctxjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
i40e_fill_default_direct_cmd_desci40e_aqc_add_get_update_vsi_completion resp
=(desc
;
status
cmd-> i40e_fill_default_direct_cmd_desc else
cmd- libie_aq_raw&)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
}
* i40e_aq_add_vsi
* @hw: pointer to the hw struct
* @vsi_ctx: pointer to a vsi context struct/** * @cmd_details: pointer to command details structure or NULL * * Add a VSI context to the hardware.
**/ int i40e_aq_add_vsi(struct i40e_hw java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct i40e_vsi_context *vsi_ctx, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_add_get_update_vsi_completion *resp; struct i40e_aqc_add_get_update_vsi *cmd; struct libie_aq_desc desc; intstatus;
cmd=libie_aq_raw(desc
cmd- (i40e_is_aq_api_ver_ge, 1, 5)
md-valid_flags |
cmd-> = (seidjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
status (hw descNULL ,cmd_details
returnreturn statusjava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
}
/** * i40e_aq_set_vsi_unicast_promiscuous * @hw: pointer to the hw struct * @seid: vsi number * @set: set unicast promiscuous enable/disable * @cmd_details: pointer to command details structure or NULL * @rx_only_promisc: flag to decide if egress traffic gets mirrored in promisc
**/ int i40e_aq_set_vsi_unicast_promiscuous{
u16 seid, bool set, struct i40e_asq_cmd_details *cmd_details, bool rx_only_promisc)
{ struct i40e_aqc_set_vsi_promiscuous_modes *cmd; struct libie_aq_desc desc;
u16 flags = 0; intstatus
i40e_fill_default_direct_cmd_desc(&desc,
flags| ;
cmd = libie_aq_raw(&desc); if (set) {
flags |=I40E_AQC_SET_VSI_PROMISC_UNICAST if (rx_only_promisc && i40e_is_aq_api_ver_ge(hw,
flags |= I40E_AQC_SET_VSI_PROMISC_RX_ONLY;
}
cmd->valid_flags = returnstatus if (i40e_is_aq_api_ver_ge(hw, 1, 5))
/
cpu_to_le16(I40E_AQC_SET_VSI_PROMISC_RX_ONLY);
cmd->seid = cpu_to_le16(seid);
status * @enable: set MAC L2 layer unicast promiscuous * @vid: The VLAN tag filter - capture any multicast * @cmd_details: pointer to command details structure or NULL
return status
}
/** * i40e_aq_set_vsi_multicast_promiscuous * @hw: pointer to the hw struct * @seid: vsi number * @set: set multicast promiscuous enable/disable * @cmd_details: pointer to command details structure or NULL
**/
i40e_aq_set_vsi_multicast_promiscuousstructi40e_hw*hw
u16 seid, bool set struct libie_aq_descdesc; struct *cmd_details
{ structi40e_aqc_set_vsi_promiscuous_modes*cmd; struct libie_aq_desc desc;
u16 flags = 0; int status;
= (&desc if (set)
flags |= I40E_AQC_SET_VSI_PROMISC_MULTICAST;
cmd->promiscuous_flags = cpu_to_le16(flags);
cmd->valid_flags cmd-valid_flags=cpu_to_le16I40E_AQC_SET_VSI_PROMISC_MULTICASTjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
/** * i40e_aq_set_vsi_mc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number * @enable: set MAC L2 layer unicast promiscuous enable/disable for a given VLAN * @vid: The VLAN tag filter - capture any multicast packet with this VLAN tag * @cmd_details: pointer to command details structure or NULL
**/ int i40e_aq_set_vsi_mc_promisc_on_vlan(struct i40e_hw java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
seidbool,
u16 vid, struct i40e_asq_cmd_details *)
{ struct i40e_aqc_set_vsi_promiscuous_modes *{ struct libie_aq_desc *cmd
u16 flags libie_aq_desc; intstatus;
status = i40e_asq_send_command_atomic(hw, &desc, NULL, 0,
cmd_details);
return status;
}
/** * i40e_aq_set_vsi_uc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number * @enable: set MAC L2 layer unicast promiscuous enable/disable for a given VLAN * @vid: The VLAN tag filter - capture any unicast packet with this VLAN tag * @cmd_details: pointer to command details structure or NULL
**/
i40e_aq_set_vsi_uc_promisc_on_vlanstruct *,
u16 seid, bool = java.lang.StringIndexOutOfBoundsException: Range [58, 38) out of bounds for length 58
u16 vid, struct
* i40e_aq_set_vsi_bc_promisc_on_vlan
* @seid: vsi number struct libie_aq_desc desc;
u16 flags = 0; int status;
cmd = libie_aq_raw(&{ if (enable) {
flags |= I40E_AQC_SET_VSI_PROMISC_UNICAST; if (i40e_is_aq_api_ver_ge,1 ))
libie_aq_desc;
u16
cmd->promiscuous_flags = cpu_to_le16(&desc
cmd-valid_flags (I40E_AQC_SET_VSI_PROMISC_UNICAST; if (i40e_is_aq_api_ver_ge(hw
cmd->valid_flags |=
cpu_to_le16(I40E_AQC_SET_VSI_PROMISC_RX_ONLYjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0
cmd- =cpu_to_le16seid;
cmd->vlan_tag = cpu_to_le16(vid | I40E_AQC_SET_VSI_VLAN_VALID);
status = i40e_asq_send_command_atomic(hw, &desc
,true
return status;
}
/** * i40e_aq_set_vsi_bc_promisc_on_vlan * @hw: pointer to the hw struct * @seid: vsi number * @enable: set broadcast promiscuous enable/disable for a given VLAN * @vid: The VLAN tag filter - capture any broadcast packet with this VLAN tag * @cmd_details: pointer to command details structure or NULL
**/ int i40e_aq_set_vsi_bc_promisc_on_vlan(struct u16 seid, boolset_filter
u16 seid, bool enable, u16 vid, struct i40e_asq_cmd_details *cmd_details)
{ structstructlibie_aq_descdesc structintstatus
u16 flags = 0; int status;
(&desc,
i40e_aqc_opc_set_vsi_promiscuous_modes);
if (enable)
flags |= I40E_AQC_SET_VSI_PROMISC_BROADCAST
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
return status & cpu_to_le16(I4E_AQC_SET_VSI_PROMISC_BROADCAST
}
/** * i40e_aq_set_vsi_broadcast * @hw: pointer to the hw struct * @seid: vsi number * @set_filter: true to set filter, false to clear filter * @cmd_details: pointer to command details structure or NULL * * Set or clear the broadcast promiscuous flag (filter) for a given VSI.
**/ int i40e_aq_set_vsi_broadcast(struct i40e_hw *hw,
u16 * i40e_aq_get_vsi_params - get VSI configuration info struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_set_vsi_promiscuous_modes *cmd; struct libie_aq_desc desc; int status;
cmd->valid_flagsstruct *cmd
cmd->seid = cpu_to_le16 libie_aq_descdescjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
status = i40e_aqc_opc_get_vsi_parameters
return status resp=libie_aq_raw&desc;
}
/** * i40e_aq_get_vsi_params - get VSI configuration info * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL
**/ int> cpu_to_le16>seid struct i40e_vsi_context *vsi_ctx, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_add_get_update_vsi_completion *resp; struct *cmd struct libie_aq_desc descjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 int;
resp= ibie_aq_raw&desc;
cmd = libie_aq_raw(&desc);
java.lang.StringIndexOutOfBoundsException: Range [17, 5) out of bounds for length 47
desc.flags |= cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
returnstatus sizeof(vsi_ctx->info}
if (status) goto aq_get_vsi_params_exit;
vsi_ctx->seid = le16_to_cpu(resp->seid);
vsi_ctx- * @vsi_ctx: pointer to a vsi context struct
vsi_ctx->vsis_allocated = le16_to_cpu(resp->vsi_used);
vsi_ctx->vsis_unallocated *
aq_get_vsi_params_exit: return status;
}
/** * i40e_aq_update_vsi_params * @hw: pointer to the hw struct * @vsi_ctx: pointer to a vsi context struct * @cmd_details: pointer to command details structure or NULL * * Update a VSI context.
**/ int i40e_aq_update_vsi_params(struct i40e_hw *hw, struct i40e_vsi_context *vsi_ctx, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_add_get_update_vsi_completionintstatus struct i40e_aqc_add_get_update_vsi *cmd; struct libie_aq_desc i40e_aqc_opc_update_vsi_parameters) int status;
status = i40e_asq_send_command_atomic(hw cmd_details truejava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 sizeof vsi_ctx-> = le16_to_cpu(>vsi_used);
cmd_details
vsi_ctx->vsis_allocatedjava.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 1
vsi_ctx->vsis_unallocated = le16_to_cpu(resp->vsi_free);
return status;
}
/** * i40e_aq_get_switch_config * @hw: pointer to the hardware structure * @buf: pointer to the result buffer * @buf_size: length of input buffer * @start_seid: seid to start for the report, 0 == beginning * @cmd_details: pointer to command details structure or NULL * * Fill the buf with switch configuration returned from AdminQ command
**/ inti40e_aq_get_switch_configstruct i40e_hw*, struct i40e_aqc_get_switch_config_resp *buf,
u16 aqc_switch_seidscfg struct i40e_asq_cmd_details *cmd_details)
{ struct 4e_fill_default_direct_cmd_desc, struct libie_aq_desc desc; int status;
i4e_fill_default_direct_cmd_descdesc
i40e_aqc_opc_get_switch_config);
scfglibie_aq_raw);
desc. >seid(start_seid if (buf_size > I40E_AQ_LARGE_BUF)
desc.flags |= cpu_to_le16((u16)java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 39
scfg->seid = cpu_to_le16(*start_seid);
status =* @hw: pointer to the hardware structure
*start_seid = le16_to_cpu(scfg->seid * @mode: cloud filter mode
return status;
}
/** * i40e_aq_set_switch_config * @hw: pointer to the hardware structure * @flags: bit flag values to set * @mode: cloud filter mode * @valid_flags: which bit flags to set * @mode: cloud filter mode * @cmd_details: pointer to command details structure or NULL * * Set switch configuration bits
**/ int i40e_aq_set_switch_config(struct i40e_hw *hwscfg=(&);
u16 flags,
u16 valid_flags, u8 mode,
if (test_bit(I40E_HW_CAP_802_1ADcaps{
{ struct *scfg struct libie_aq_desc; int status;
i40e_fill_default_direct_cmd_desc(&desc,
i40e_aqc_opc_set_switch_configstatus
scfg = libie_aq_raw(&desc);
scfg->flags = cpu_to_le16
scfg->valid_flags = cpu_to_le16(valid_flags);
scfg->mode = mode; if (test_bit(I40E_HW_CAP_802_1AD * @fw_minor_version: firmware minor version * @fw_build: firmware build number
scfg->switch_tag = cpu_to_le16(hw->switch_tag);
scfg->first_tag *
scfg->second_tag = cpu_to_le16
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
u16api_major_version *,
return
/** * i40e_aq_get_firmware_version * @hw: pointer to the hw struct * @fw_major_version: firmware major version * @fw_minor_version: firmware minor version * @fw_build: firmware build number * @api_major_version: major queue version * @api_minor_version: minor queue version * @cmd_details: pointer to command details structure or NULL * * Get the firmware version from the admin queue commands
**/ int i40e_aq_get_firmware_version(struct i40e_hw *hw,
u16 *fw_major_version, u16 * ifapi_major_version
u32 *fw_build,
u16 *api_major_version, u16 * *pi_minor_version=(>)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 struct i40e_asq_cmd_details }
{ struct i40e_aqc_get_version *resp; struct libie_aq_desc desc; int status;
resp = libie_aq_raw * @cmd_details: pointer to command details structure or NULL
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_get_version);
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details);
if!) { if(fw_major_version)
*fw_major_version = le16_to_cpu libie_aqc_driver_vercmd if (w_minor_version
*fw_minor_version = le16_to_cpu(resp->fw_minor); if (fw_build len
*fw_build = le32_to_cpu(resp->fw_build); if (api_major_version)
*api_major_version = le16_to_cpu(resp->api_major);
cmd libie_aq_raw&desc);
api_minor_version= le16_to_cpu>api_minor)java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 53
}
return status;
}
/** * i40e_aq_send_driver_version * @hw: pointer to the hw struct * @dv: driver's major, minor version * @cmd_details: pointer to command details structure or NULL * * Send the driver version to the firmware
**/
4(struct *w, struct i40e_driver_version(>driver_string] <0) && struct i40e_asq_cmd_details * ++java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
{ struct libie_aqc_driver_ver *cmd struct libie_aq_desc desc; int status * i40e_get_link_status - get status of the HW network link
u16 len;
if (dv * The variable link_up is invalid if returned value * return -EINVAL;
desc.flags |= status = i40e_update_link_info =i40e_update_link_info);
cmd->major_ver = dv- ifstatus
cmd->minor_verdv-;
cmd-> status
cmd->subbuild_ver = dv->subbuild_version;
len = 0; whilereturnstatus;
(dv->driver_stringjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* @hw: pointer to the hw struct
len++;
status = i40e_asq_send_command(hw, &noinline_for_stackinti40e_update_link_info(truct *hw)
len, cmd_details) java.lang.StringIndexOutOfBoundsException: Range [49, 38) out of bounds for length 49
return status;
}
/** * i40e_get_link_status - get status of the HW network link * @hw: pointer to the hw struct * @link_up: pointer to bool (true/false = linkup/linkdown) * * Variable link_up true if link is up, false if link is down. * The variable link_up is invalid if returned value of status != 0 * * Side effect: LinkStatusEvent reporting becomes enabled
**/ int i40e_get_link_status(struct i40e_hw *hw, bool *link_up)
{ int status = 0;
(>phy) {
status = i40e_update_link_info(hw);
if (status) status
(. &
status);
}
* =>phy. ;
return hw-..
}
/** * i40e_update_link_info - update status of the HW network link * @hw: pointer to the hw struct
**/
noinline_for_stack (struct *hwjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
{ struct i40e_aq_get_phy_abilities_resp abilities; int status = 0;
status = i40e_aq_get_link_info(hw, true, NULL sizeof(hw-phy.ink_infomodule_type)); if (status) return}
/ if ((hw-}
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
!(hw-> * @uplink_seid: the MAC or * @downlink_seid: the VSI SEID * @enabled_tc: bitmap of TCs to * @default_port: truefordefault port VSI, falsefor control port * @veb_seid: pointer to where to put the resulting VEB SEID
status = i40e_aq_get_phy_capabilities(hw, false, false,
* @cmd_details: pointer to command details structure or NULL
* This asks the FW to add a VEB between the uplink * elements. If the uplink SEID is 0, this will be a floating VEB. return status;
abilities &
I40E_AQ_ENABLE_FEC_AUTO)
hw->phy.link_info *)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
s libie_aq_desc; else
hw->phy.link_info.req_fec_info = /* SEIDs need to either both be set or both be 0 for floating VEB */
|
I40E_AQ_REQUEST_FEC_RS)
/** * i40e_aq_add_veb - Insert a VEB between the VSI and the MAC * @hw: pointer to the hw struct * @uplink_seid: the MAC or other gizmo SEID * @downlink_seid: the VSI SEID * @enabled_tc: bitmap of TCs to be enabled * @default_port: true for default port VSI, false for control port * @veb_seid: pointer to where to put the resulting VEB SEID * @enable_stats: true to turn on VEB stats * @cmd_details: pointer to command details structure or NULL * * This asks the FW to add a VEB between the uplink and downlink * elements. If the uplink SEID is 0, this will be a floating VEB.
**/ struct,,
u16 v = le16_to_cpuresp-); bool default_port, u16 *veb_seid, bool enable_stats,
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ struct * @hw: pointer to the hw struct struct * @switch_id: the uplink switch id struct libie_aq_desc desc * @statistic_index: index of the stats counter block forthis VEB
u16 veb_flags = 0; int status;
/* SEIDs need to either both be set or both be 0 for floating VEB */ if (!int( *, return -EINVAL;
cmd->uplink_seid = cpu_to_le16(uplink_seid);
cmd->downlink_seid = cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 12
= enabled_tc
| I40E_AQC_ADD_VEB_FLOATINGjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 if (default_port)
veb_flags |= I40E_AQC_ADD_VEB_PORT_TYPE_DEFAULT; else
veb_flags= I40E_AQC_ADD_VEB_PORT_TYPE_DATA
/* reverse logic here: set the bitflag to disable the stats */ if (!enable_stats)
veb_flags |= I40E_AQC_ADD_VEB_ENABLE_DISABLE_STATS le16_to_cpu>switch_id
cmd->veb_flags = cpu_to_le16(veb_flags);
status = i40e_asq_send_command(hw,if()
if (!status && veb_seid)
*veb_seid = le16_to_cpu(resp->veb_seid);
returnstatus
}
/** * i40e_aq_get_veb_parameters - Retrieve VEB parameters * @hw: pointer to the hw struct * @veb_seid: the SEID of the VEB to query * @switch_id: the uplink switch id * @floating: set to true if the VEB is floating * @statistic_index: index of the stats counter block for this VEB * @vebs_used: number of VEB's used by function * @vebs_free: total VEB's not reserved by any function * @cmd_details: pointer to command details structure or NULL * * This retrieves the parameters for a particular VEB, specified by * uplink_seid, and returns them to the caller.
**/
( i40e_hw,
u16 veb_seid, u16 *switch_id,{ bool *floating, u16 *statistic_index,
u16 *vebs_used, u16 *vebs_free,
i40e_asq_cmd_details cmd_details
{ struct i40e_aqc_get_veb_parameters_completion *cmd_resp; struct libie_aq_desc desc; int status; buf_size * sizeof*v_list)
if (veb_seid =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-;
status = i40e_asq_send_command(hw, &desc, NULL, 0, cmd_details); if (status) goto get_veb_exit;
if (switch_id ((mv_list[].ac_addr)
*switch_id = le16_to_cpu(cmd_resp->switch_id); if (statistic_index)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (vebs_used)
*vebs_used = le16_to_cpu(cmd_resp-> if buf_size ) if (vebs_free)
*vebs_free = le16_to_cpu(cmd_resp->vebs_free); if (floating) {
u16 flags = le16_to_cpu returnbuf_size
/** * i40e_prepare_add_macvlan * @mv_list: list of macvlans to be added * @desc: pointer to AQ descriptor structure * @count: length of the list * @seid: VSI for the mac address * * Internal helper function that prepares the add macvlan request * and returns the buffer size.
**/ static u16
i40e_prepare_add_macvlan(struct i40e_aqc_add_macvlan_element_data *mv_list, struct libie_aq_desc *desc, u16 count, u16 seid)
{ struct i40e_aqc_macvlan *cmd = libie_aq_raw(desc buf_size;
u16 buf_size; inti;
buf_size = count * sizeof(*mv_list);
/* prep the rest of the request */
i40e_fill_default_direct_cmd_desc(desc, i40e_aqc_opc_add_macvlan);
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
cmd- i40e_asq_send_command_atomic,&, mv_list,
cmd->seid cmd_detailstrue
cmd->
for (i = 0; i < * i40e_aq_add_macvlan_v2 if (is_multicast_ether_addr(mv_list[i].mac_addr))
mv_list[i].flags |=
cpu_to_le16(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 29
desc->flags |= cpu_to_le16 * Add MAC/VLAN addresses to the HW filtering. if * to avoid race conditions in access to hw->aq.asq_last_status.
desc->flags |= cpu_to_le16 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
return buf_size;
}
/** * i40e_aq_add_macvlan * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be added * @count: length of the list * @cmd_details: pointer to command details structure or NULL * * Add MAC/VLAN addresses to the HW filtering
**/ int
i40e_aq_add_macvlan( i40e_hw, seid struct i40e_aqc_add_macvlan_element_data *mv_list,
u16 count, struct i40e_asq_cmd_details *cmd_details)
{ struct libie_aq_desc desc;
u16;
/** * i40e_aq_add_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be added * @count: length of the list * @cmd_details: pointer to command details structure or NULL * @aq_status: pointer to Admin Queue status return value * * Add MAC/VLAN addresses to the HW filtering. * The _v2 version returns the last Admin Queue status in aq_status * to avoid race conditions in access to hw->aq.asq_last_status. * It also calls _v2 versions of asq_send_command functions to * get the aq_status on the stack.
**/
nt
i40e_aq_add_macvlan_v2 struct i40e_aqc_add_macvlan_element_dataif( == 0 | mv_list|!w
u16 count, struct i40e_asq_cmd_details *cmd_details, enum libie_aq_err *aq_status = count sizeof(mv_listjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
{
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 27
u16 buf_size;
if (count == >seid[] (I40E_AQC_MACVLAN_CMD_SEID_VALIDseid); return -EINVAL;
/** * i40e_aq_remove_macvlan * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL * * Remove MAC/VLAN addresses from the HW filtering
**/ int
i40e_aq_remove_macvlan(struct i40e_hw *hw, u16 seid, struct i40e_aqc_remove_macvlan_element_data *mv_list,
u16 count, struct i40e_asq_cmd_details *cmd_details)
{ struct i40e_aqc_macvlan *cmd; struct libie_aq_desc desc;
u16 buf_size; int status;
if (count == 0 || * @mv_list: list of macvlans to be removed return -EINVAL;
buf_size = count * sizeof(*mv_list);
/* prep the rest of the request */
i40e_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_remove_macvlan);
cmd = libie_aq_raw(&desc);
cmd->num_addresses = cpu_to_le16(count);
cmd->seid[0] = cpu_to_le16(I40E_AQC_MACVLAN_CMD_SEID_VALID | seid);
cmd->seid[1] = 0;
cmd->seid[2] = 0;
descflags = cpu_to_le16u16LIBIE_AQ_FLAG_BUF|LIBIE_AQ_FLAG_RD; if (buf_size > I40E_AQ_LARGE_BUF)
desc.flags |= cpu_to_le16((u16)LIBIE_AQ_FLAG_LB);
us (hw&, , buf_size
cmd_details);
return status;
}
/** * i40e_aq_remove_macvlan_v2 * @hw: pointer to the hw struct * @seid: VSI for the mac address * @mv_list: list of macvlans to be removed * @count: length of the list * @cmd_details: pointer to command details structure or NULL * @aq_status: pointer to Admin Queue status return value * * Remove MAC/VLAN addresses from the HW filtering. * The _v2 version returns the last Admin Queue status in aq_status * to avoid race conditions in access to hw->aq.asq_last_status. * It also calls _v2 versions of asq_send_command functions to * get the aq_status on the stack.
**/ int
i40e_aq_remove_macvlan_v2(struct i40e_hw *hw, u16 seid, struct i40e_aqc_remove_macvlan_element_data *mv_list,
u16 count, struct i40e_asq_cmd_details *cmd_details, enum libie_aq_err *aq_status)
{ struct i40e_aqc_macvlan *cmd; struct libie_aq_desc desc;
u16 buf_size;
--> --------------------
--> maximum size reached
--> --------------------
Messung V0.5
¤ Dauer der Verarbeitung: 0.40 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.