Lines Matching refs:fsp
7093 struct ethtool_rx_flow_spec *fsp) in niu_get_ip4fs_from_tcam_key() argument
7099 fsp->h_u.tcp_ip4_spec.ip4src = cpu_to_be32(tmp); in niu_get_ip4fs_from_tcam_key()
7102 fsp->h_u.tcp_ip4_spec.ip4dst = cpu_to_be32(tmp); in niu_get_ip4fs_from_tcam_key()
7105 fsp->m_u.tcp_ip4_spec.ip4src = cpu_to_be32(tmp); in niu_get_ip4fs_from_tcam_key()
7108 fsp->m_u.tcp_ip4_spec.ip4dst = cpu_to_be32(tmp); in niu_get_ip4fs_from_tcam_key()
7110 fsp->h_u.tcp_ip4_spec.tos = (tp->key[2] & TCAM_V4KEY2_TOS) >> in niu_get_ip4fs_from_tcam_key()
7112 fsp->m_u.tcp_ip4_spec.tos = (tp->key_mask[2] & TCAM_V4KEY2_TOS) >> in niu_get_ip4fs_from_tcam_key()
7115 switch (fsp->flow_type) { in niu_get_ip4fs_from_tcam_key()
7121 fsp->h_u.tcp_ip4_spec.psrc = cpu_to_be16(prt); in niu_get_ip4fs_from_tcam_key()
7125 fsp->h_u.tcp_ip4_spec.pdst = cpu_to_be16(prt); in niu_get_ip4fs_from_tcam_key()
7129 fsp->m_u.tcp_ip4_spec.psrc = cpu_to_be16(prt); in niu_get_ip4fs_from_tcam_key()
7133 fsp->m_u.tcp_ip4_spec.pdst = cpu_to_be16(prt); in niu_get_ip4fs_from_tcam_key()
7139 fsp->h_u.ah_ip4_spec.spi = cpu_to_be32(tmp); in niu_get_ip4fs_from_tcam_key()
7143 fsp->m_u.ah_ip4_spec.spi = cpu_to_be32(tmp); in niu_get_ip4fs_from_tcam_key()
7148 fsp->h_u.usr_ip4_spec.l4_4_bytes = cpu_to_be32(tmp); in niu_get_ip4fs_from_tcam_key()
7152 fsp->m_u.usr_ip4_spec.l4_4_bytes = cpu_to_be32(tmp); in niu_get_ip4fs_from_tcam_key()
7154 fsp->h_u.usr_ip4_spec.proto = in niu_get_ip4fs_from_tcam_key()
7157 fsp->m_u.usr_ip4_spec.proto = in niu_get_ip4fs_from_tcam_key()
7161 fsp->h_u.usr_ip4_spec.ip_ver = ETH_RX_NFC_IP4; in niu_get_ip4fs_from_tcam_key()
7173 struct ethtool_rx_flow_spec *fsp = &nfc->fs; in niu_get_ethtool_tcam_entry() local
7190 ret = niu_class_to_ethflow(class, &fsp->flow_type); in niu_get_ethtool_tcam_entry()
7197 if (fsp->flow_type == AH_V4_FLOW || fsp->flow_type == AH_V6_FLOW) { in niu_get_ethtool_tcam_entry()
7201 if (fsp->flow_type == AH_V4_FLOW) in niu_get_ethtool_tcam_entry()
7202 fsp->flow_type = ESP_V4_FLOW; in niu_get_ethtool_tcam_entry()
7204 fsp->flow_type = ESP_V6_FLOW; in niu_get_ethtool_tcam_entry()
7208 switch (fsp->flow_type) { in niu_get_ethtool_tcam_entry()
7214 niu_get_ip4fs_from_tcam_key(tp, fsp); in niu_get_ethtool_tcam_entry()
7225 niu_get_ip4fs_from_tcam_key(tp, fsp); in niu_get_ethtool_tcam_entry()
7236 fsp->ring_cookie = RX_CLS_FLOW_DISC; in niu_get_ethtool_tcam_entry()
7238 fsp->ring_cookie = (tp->assoc_data & TCAM_ASSOCDATA_OFFSET) >> in niu_get_ethtool_tcam_entry()
7359 static void niu_get_tcamkey_from_ip4fs(struct ethtool_rx_flow_spec *fsp, in niu_get_tcamkey_from_ip4fs() argument
7367 sip = be32_to_cpu(fsp->h_u.tcp_ip4_spec.ip4src); in niu_get_tcamkey_from_ip4fs()
7368 sipm = be32_to_cpu(fsp->m_u.tcp_ip4_spec.ip4src); in niu_get_tcamkey_from_ip4fs()
7369 dip = be32_to_cpu(fsp->h_u.tcp_ip4_spec.ip4dst); in niu_get_tcamkey_from_ip4fs()
7370 dipm = be32_to_cpu(fsp->m_u.tcp_ip4_spec.ip4dst); in niu_get_tcamkey_from_ip4fs()
7383 tp->key[2] |= ((u64)fsp->h_u.tcp_ip4_spec.tos << in niu_get_tcamkey_from_ip4fs()
7385 tp->key_mask[2] |= ((u64)fsp->m_u.tcp_ip4_spec.tos << in niu_get_tcamkey_from_ip4fs()
7387 switch (fsp->flow_type) { in niu_get_tcamkey_from_ip4fs()
7391 sport = be16_to_cpu(fsp->h_u.tcp_ip4_spec.psrc); in niu_get_tcamkey_from_ip4fs()
7392 spm = be16_to_cpu(fsp->m_u.tcp_ip4_spec.psrc); in niu_get_tcamkey_from_ip4fs()
7393 dport = be16_to_cpu(fsp->h_u.tcp_ip4_spec.pdst); in niu_get_tcamkey_from_ip4fs()
7394 dpm = be16_to_cpu(fsp->m_u.tcp_ip4_spec.pdst); in niu_get_tcamkey_from_ip4fs()
7398 niu_ethflow_to_l3proto(fsp->flow_type, &pid); in niu_get_tcamkey_from_ip4fs()
7402 spi = be32_to_cpu(fsp->h_u.ah_ip4_spec.spi); in niu_get_tcamkey_from_ip4fs()
7403 spim = be32_to_cpu(fsp->m_u.ah_ip4_spec.spi); in niu_get_tcamkey_from_ip4fs()
7407 niu_ethflow_to_l3proto(fsp->flow_type, &pid); in niu_get_tcamkey_from_ip4fs()
7410 spi = be32_to_cpu(fsp->h_u.usr_ip4_spec.l4_4_bytes); in niu_get_tcamkey_from_ip4fs()
7411 spim = be32_to_cpu(fsp->m_u.usr_ip4_spec.l4_4_bytes); in niu_get_tcamkey_from_ip4fs()
7415 pid = fsp->h_u.usr_ip4_spec.proto; in niu_get_tcamkey_from_ip4fs()
7432 struct ethtool_rx_flow_spec *fsp = &nfc->fs; in niu_add_ethtool_tcam_entry() local
7446 if (fsp->flow_type == IP_USER_FLOW) { in niu_add_ethtool_tcam_entry()
7449 struct ethtool_usrip4_spec *uspec = &fsp->h_u.usr_ip4_spec; in niu_add_ethtool_tcam_entry()
7450 struct ethtool_usrip4_spec *umask = &fsp->m_u.usr_ip4_spec; in niu_add_ethtool_tcam_entry()
7509 if (!niu_ethflow_to_class(fsp->flow_type, &class)) { in niu_add_ethtool_tcam_entry()
7522 switch (fsp->flow_type) { in niu_add_ethtool_tcam_entry()
7528 niu_get_tcamkey_from_ip4fs(fsp, tp, l2_rdc_table, class); in niu_add_ethtool_tcam_entry()
7537 parent->index, __func__, fsp->flow_type); in niu_add_ethtool_tcam_entry()
7541 niu_get_tcamkey_from_ip4fs(fsp, tp, l2_rdc_table, class); in niu_add_ethtool_tcam_entry()
7545 parent->index, __func__, fsp->flow_type); in niu_add_ethtool_tcam_entry()
7551 if (fsp->ring_cookie == RX_CLS_FLOW_DISC) { in niu_add_ethtool_tcam_entry()
7554 if (fsp->ring_cookie >= np->num_rx_rings) { in niu_add_ethtool_tcam_entry()
7557 (long long)fsp->ring_cookie); in niu_add_ethtool_tcam_entry()
7562 (fsp->ring_cookie << in niu_add_ethtool_tcam_entry()