return err;
}
+static int hw_atl2_tc_ptp_set(struct aq_hw_s *self)
+{
+ /* Init TC2 for PTP_TX */
+ hw_atl_tpb_tx_pkt_buff_size_per_tc_set(self, HW_ATL2_PTP_TXBUF_SIZE,
+ AQ_HW_PTP_TC);
+
+ /* Init TC2 for PTP_RX */
+ hw_atl_rpb_rx_pkt_buff_size_per_tc_set(self, HW_ATL2_PTP_RXBUF_SIZE,
+ AQ_HW_PTP_TC);
+
+ /* No flow control for PTP */
+ hw_atl_rpb_rx_xoff_en_per_tc_set(self, 0U, AQ_HW_PTP_TC);
+
+ hw_atl2_tpb_tps_highest_priority_tc_set(self, AQ_HW_PTP_TC);
+
+ return aq_hw_err_from_flags(self);
+}
+
static int hw_atl2_hw_queue_to_tc_map_set(struct aq_hw_s *self)
{
struct aq_nic_cfg_s *cfg = self->aq_nic_cfg;
unsigned int prio = 0U;
u32 tc = 0U;
+ if (cfg->is_ptp) {
+ tx_buff_size -= HW_ATL2_PTP_TXBUF_SIZE;
+ rx_buff_size -= HW_ATL2_PTP_RXBUF_SIZE;
+ }
+
/* TPS Descriptor rate init */
hw_atl_tps_tx_pkt_shed_desc_rate_curr_time_res_set(self, 0x0U);
hw_atl_tps_tx_pkt_shed_desc_rate_lim_set(self, 0xA);
hw_atl_b0_set_fc(self, self->aq_nic_cfg->fc.req, tc);
}
+ if (cfg->is_ptp)
+ hw_atl2_tc_ptp_set(self);
+
/* QoS 802.1p priority -> TC mapping */
for (prio = 0; prio < 8; ++prio)
hw_atl_rpf_rpb_user_priority_tc_map_set(self, prio,
u8 *indirection_table = rss_params->indirection_table;
const u32 num_tcs = aq_hw_num_tcs(self);
u32 rpf_redir2_enable;
- int tc;
- int i;
+ u32 queue;
+ u32 tc;
+ u32 i;
rpf_redir2_enable = num_tcs > 4 ? 1 : 0;
for (i = HW_ATL2_RSS_REDIRECTION_MAX; i--;) {
for (tc = 0; tc != num_tcs; tc++) {
- hw_atl2_new_rpf_rss_redir_set(self, tc, i,
- tc *
- aq_hw_q_per_tc(self) +
- indirection_table[i]);
+ queue = tc * aq_hw_q_per_tc(self) +
+ indirection_table[i];
+ hw_atl2_new_rpf_rss_redir_set(self, tc, i, queue);
}
}
hw_atl2_tpb_tx_buf_clk_gate_en_set(self, 0U);
+ if (hw_atl2_phi_ext_tag_get(self)) {
+ hw_atl2_tdm_tx_data_read_req_limit_set(self, 0x7F);
+ hw_atl2_tdm_tx_desc_read_req_limit_set(self, 0x0F);
+ }
+
return aq_hw_err_from_flags(self);
}
+/* Initialise new rx filters
+ * L2 promisc OFF
+ * VLAN promisc OFF
+ *
+ * User priority to TC
+ */
static void hw_atl2_hw_init_new_rx_filters(struct aq_hw_s *self)
{
u8 *prio_tc_map = self->aq_nic_cfg->prio_tc_map;