*/
static const u32 ice_ptypes_mac_ofos[] = {
0xFDC00846, 0xBFBF7F7E, 0xF70001DF, 0xFEFDFDFB,
- 0x0000077E, 0x00000000, 0x00000000, 0x00000000,
- 0x00400000, 0x03FFF000, 0x7FFFFFE0, 0x00000000,
+ 0x0000077E, 0x000003FF, 0x00000000, 0x00000000,
+ 0x00400000, 0x03FFF000, 0xFFFFFFE0, 0x00000307,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
* include IPV4 other PTYPEs
*/
static const u32 ice_ptypes_ipv4_ofos[] = {
- 0x1DC00000, 0x04000800, 0x00000000, 0x00000000,
+ 0x1DC00000, 0x24000800, 0x00000000, 0x00000000,
0x00000000, 0x00000155, 0x00000000, 0x00000000,
0x00000000, 0x000FC000, 0x000002A0, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
* IPV4 other PTYPEs
*/
static const u32 ice_ptypes_ipv4_ofos_all[] = {
- 0x1DC00000, 0x04000800, 0x00000000, 0x00000000,
+ 0x1DC00000, 0x24000800, 0x00000000, 0x00000000,
0x00000000, 0x00000155, 0x00000000, 0x00000000,
0x00000000, 0x000FC000, 0x83E0FAA0, 0x00000101,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
};
/* Packet types for packets with an Outer/First/Single IPv4 header - no L4 */
-static const u32 ice_ipv4_ofos_no_l4[] = {
+static const u32 ice_ptypes_ipv4_ofos_no_l4[] = {
0x10C00000, 0x04000800, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x000cc000, 0x000002A0, 0x00000000,
};
/* Packet types for packets with an Innermost/Last IPv4 header - no L4 */
-static const u32 ice_ipv4_il_no_l4[] = {
+static const u32 ice_ptypes_ipv4_il_no_l4[] = {
0x60000000, 0x18043008, 0x80000002, 0x6010c021,
0x00000008, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00139800, 0x00000000,
};
/* Packet types for packets with an Outer/First/Single IPv6 header - no L4 */
-static const u32 ice_ipv6_ofos_no_l4[] = {
+static const u32 ice_ptypes_ipv6_ofos_no_l4[] = {
0x00000000, 0x00000000, 0x43000000, 0x10002000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x02300000, 0x00000540, 0x00000000,
};
/* Packet types for packets with an Innermost/Last IPv6 header - no L4 */
-static const u32 ice_ipv6_il_no_l4[] = {
+static const u32 ice_ptypes_ipv6_il_no_l4[] = {
0x00000000, 0x02180430, 0x0000010c, 0x086010c0,
0x00000430, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x4e600000, 0x00000000,
/* Packet types for packets with an Innermost/Last MAC header */
static const u32 ice_ptypes_mac_il[] = {
- 0x00000000, 0x00000000, 0x00000000, 0x00000000,
+ 0x00000000, 0x20000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
ICE_FLOW_PTYPE_MAX);
} else if ((hdrs & ICE_FLOW_SEG_HDR_IPV4) &&
!(hdrs & ICE_FLOW_SEG_HDRS_L4_MASK_NO_OTHER)) {
- src = !i ? (const ice_bitmap_t *)ice_ipv4_ofos_no_l4 :
- (const ice_bitmap_t *)ice_ipv4_il_no_l4;
+ src = !i ? (const ice_bitmap_t *)ice_ptypes_ipv4_ofos_no_l4 :
+ (const ice_bitmap_t *)ice_ptypes_ipv4_il_no_l4;
ice_and_bitmap(params->ptypes, params->ptypes, src,
ICE_FLOW_PTYPE_MAX);
} else if (hdrs & ICE_FLOW_SEG_HDR_IPV4) {
ICE_FLOW_PTYPE_MAX);
} else if ((hdrs & ICE_FLOW_SEG_HDR_IPV6) &&
!(hdrs & ICE_FLOW_SEG_HDRS_L4_MASK_NO_OTHER)) {
- src = !i ? (const ice_bitmap_t *)ice_ipv6_ofos_no_l4 :
- (const ice_bitmap_t *)ice_ipv6_il_no_l4;
+ src = !i ? (const ice_bitmap_t *)ice_ptypes_ipv6_ofos_no_l4 :
+ (const ice_bitmap_t *)ice_ptypes_ipv6_il_no_l4;
ice_and_bitmap(params->ptypes, params->ptypes, src,
ICE_FLOW_PTYPE_MAX);
} else if (hdrs & ICE_FLOW_SEG_HDR_IPV6) {
*/
if (fld == ICE_FLOW_FIELD_IDX_IPV4_TTL)
sib = ICE_FLOW_FIELD_IDX_IPV4_PROT;
- else if (fld == ICE_FLOW_FIELD_IDX_IPV4_PROT)
+ else
sib = ICE_FLOW_FIELD_IDX_IPV4_TTL;
/* If the sibling field is also included, that field's
*/
if (fld == ICE_FLOW_FIELD_IDX_IPV6_TTL)
sib = ICE_FLOW_FIELD_IDX_IPV6_PROT;
- else if (fld == ICE_FLOW_FIELD_IDX_IPV6_PROT)
+ else
sib = ICE_FLOW_FIELD_IDX_IPV6_TTL;
/* If the sibling field is also included, that field's
/* Clear scenario for this PF */
buf.pf_scenario_num[hw->pf_id] = ICE_ACL_INVALID_SCEN;
- status = ice_prgm_acl_prof_extrt(hw, prof_id, &buf, NULL);
+ status = ice_prgm_acl_prof_xtrct(hw, prof_id, &buf, NULL);
return status;
}
/* Update the current PF */
buf.pf_scenario_num[hw->pf_id] = (u8)prof->cfg.scen->id;
- status = ice_prgm_acl_prof_extrt(hw, prof_id, &buf, NULL);
+ status = ice_prgm_acl_prof_xtrct(hw, prof_id, &buf, NULL);
return status;
}
* Assumption: the caller has acquired the lock to the profile list
* and the software VSI handle has been validated
*/
-static enum ice_status
+enum ice_status
ice_flow_assoc_prof(struct ice_hw *hw, enum ice_block blk,
struct ice_flow_prof *prof, u16 vsi_handle)
{
e->acts = (struct ice_flow_action *)
ice_memdup(hw, acts, acts_cnt * sizeof(*acts),
ICE_NONDMA_TO_NONDMA);
-
if (!e->acts)
goto out;
}
/**
- * ice_flow_acl_convert_to_acl_prior - Convert to ACL priority
+ * ice_flow_acl_convert_to_acl_prio - Convert to ACL priority
* @p: flow priority
*/
-static enum ice_acl_entry_prior
-ice_flow_acl_convert_to_acl_prior(enum ice_flow_priority p)
+static enum ice_acl_entry_prio
+ice_flow_acl_convert_to_acl_prio(enum ice_flow_priority p)
{
- enum ice_acl_entry_prior acl_prior;
+ enum ice_acl_entry_prio acl_prio;
switch (p) {
case ICE_FLOW_PRIO_LOW:
- acl_prior = ICE_LOW;
+ acl_prio = ICE_ACL_PRIO_LOW;
break;
case ICE_FLOW_PRIO_NORMAL:
- acl_prior = ICE_NORMAL;
+ acl_prio = ICE_ACL_PRIO_NORMAL;
break;
case ICE_FLOW_PRIO_HIGH:
- acl_prior = ICE_HIGH;
+ acl_prio = ICE_ACL_PRIO_HIGH;
break;
default:
- acl_prior = ICE_NORMAL;
+ acl_prio = ICE_ACL_PRIO_NORMAL;
break;
}
- return acl_prior;
+ return acl_prio;
}
/**
if (!entry || !(*entry) || !prof)
return ICE_ERR_BAD_PTR;
- e = *(entry);
+ e = *entry;
do_chg_rng_chk = false;
if (e->range_buf) {
ICE_NONDMA_TO_NONDMA);
if (do_add_entry) {
- enum ice_acl_entry_prior prior;
+ enum ice_acl_entry_prio prio;
u8 *keys, *inverts;
u16 entry_idx;
keys = (u8 *)e->entry;
inverts = keys + (e->entry_sz / 2);
- prior = ice_flow_acl_convert_to_acl_prior(e->priority);
+ prio = ice_flow_acl_convert_to_acl_prio(e->priority);
- status = ice_acl_add_entry(hw, prof->cfg.scen, prior, keys,
+ status = ice_acl_add_entry(hw, prof->cfg.scen, prio, keys,
inverts, acts, e->acts_cnt,
&entry_idx);
if (status)
exist->acts = (struct ice_flow_action *)
ice_calloc(hw, exist->acts_cnt,
sizeof(struct ice_flow_action));
-
if (!exist->acts) {
status = ICE_ERR_NO_MEMORY;
goto out;
(ICE_FLOW_SEG_HDR_IPV4 | ICE_FLOW_SEG_HDR_IPV6)
#define ICE_FLOW_RSS_SEG_HDR_L4_MASKS \
- (ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_UDP | \
- ICE_FLOW_SEG_HDR_SCTP)
+ (ICE_FLOW_SEG_HDR_TCP | ICE_FLOW_SEG_HDR_UDP | ICE_FLOW_SEG_HDR_SCTP)
#define ICE_FLOW_RSS_SEG_HDR_VAL_MASKS \
(ICE_FLOW_RSS_SEG_HDR_L2_MASKS | \
if (status)
goto exit;
- /* don't do RSS for GTPU outer */
+ /* Don't do RSS for GTPU Outer */
if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) {
status = ICE_SUCCESS;
ice_acquire_lock(&hw->rss_locks);
status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds, addl_hdrs,
ICE_RSS_OUTER_HEADERS, symm);
-
if (!status)
status = ice_add_rss_cfg_sync(hw, vsi_handle, hashed_flds,
addl_hdrs, ICE_RSS_INNER_HEADERS,
if (status)
goto out;
+ /* Don't do RSS for GTPU Outer */
if (segs_cnt == ICE_RSS_OUTER_HEADERS &&
segs[segs_cnt - 1].hdrs & ICE_FLOW_SEG_HDR_GTPU) {
status = ICE_SUCCESS;