ret = hns3_get_count(&hns->hw, flow->counter_id, &value);
if (ret) {
- rte_flow_error_set(error, -ret,
- RTE_FLOW_ERROR_TYPE_HANDLE,
+ rte_flow_error_set(error, -ret, RTE_FLOW_ERROR_TYPE_HANDLE,
NULL, "Read counter fail.");
return ret;
}
if (item->mask) {
ipv4_mask = item->mask;
-
if (ipv4_mask->hdr.total_length ||
ipv4_mask->hdr.packet_id ||
ipv4_mask->hdr.fragment_offset ||
if (item->mask) {
ipv6_mask = item->mask;
- if (ipv6_mask->hdr.vtc_flow ||
- ipv6_mask->hdr.payload_len || ipv6_mask->hdr.hop_limits) {
+ if (ipv6_mask->hdr.vtc_flow || ipv6_mask->hdr.payload_len ||
+ ipv6_mask->hdr.hop_limits) {
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM_MASK,
item,
if (item->mask) {
tcp_mask = item->mask;
- if (tcp_mask->hdr.sent_seq ||
- tcp_mask->hdr.recv_ack ||
- tcp_mask->hdr.data_off ||
- tcp_mask->hdr.tcp_flags ||
- tcp_mask->hdr.rx_win ||
- tcp_mask->hdr.cksum || tcp_mask->hdr.tcp_urp) {
+ if (tcp_mask->hdr.sent_seq || tcp_mask->hdr.recv_ack ||
+ tcp_mask->hdr.data_off || tcp_mask->hdr.tcp_flags ||
+ tcp_mask->hdr.rx_win || tcp_mask->hdr.cksum ||
+ tcp_mask->hdr.tcp_urp) {
return rte_flow_error_set(error, EINVAL,
RTE_FLOW_ERROR_TYPE_ITEM_MASK,
item,
RTE_FLOW_ERROR_TYPE_ITEM_MASK,
item,
"Only support src & dst port in SCTP");
-
if (sctp_mask->hdr.src_port) {
hns3_set_bit(rule->input_set, INNER_SRC_PORT, 1);
rule->key_conf.mask.src_port =
}
static int
-hns3_parse_normal(const struct rte_flow_item *item,
- struct hns3_fdir_rule *rule,
+hns3_parse_normal(const struct rte_flow_item *item, struct hns3_fdir_rule *rule,
struct items_step_mngr *step_mngr,
struct rte_flow_error *error)
{
.key_len = in->key_len,
.queue_num = in->queue_num,
};
- out->conf.queue =
- memcpy(out->queue, in->queue,
- sizeof(*in->queue) * in->queue_num);
+ out->conf.queue = memcpy(out->queue, in->queue,
+ sizeof(*in->queue) * in->queue_num);
if (in->key)
out->conf.key = memcpy(out->key, in->key, in->key_len);
flow = rte_zmalloc("hns3 flow", sizeof(struct rte_flow), 0);
if (flow == NULL) {
- rte_flow_error_set(error, ENOMEM,
- RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
- "Failed to allocate flow memory");
+ rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE,
+ NULL, "Failed to allocate flow memory");
return NULL;
}
flow_node = rte_zmalloc("hns3 flow node",
sizeof(struct hns3_flow_mem), 0);
if (flow_node == NULL) {
- rte_flow_error_set(error, ENOMEM,
- RTE_FLOW_ERROR_TYPE_HANDLE, NULL,
- "Failed to allocate flow list memory");
+ rte_flow_error_set(error, ENOMEM, RTE_FLOW_ERROR_TYPE_HANDLE,
+ NULL, "Failed to allocate flow list memory");
rte_free(flow);
return NULL;
}