* |WARNING| pw119056-119081 [PATCH] [v3, 26/26] net/nfp: support new solution for tunnel decap action
@ 2022-10-25 9:22 dpdklab
0 siblings, 0 replies; 2+ messages in thread
From: dpdklab @ 2022-10-25 9:22 UTC (permalink / raw)
To: test-report; +Cc: dpdk-test-reports
[-- Attachment #1: Type: text/plain, Size: 67777 bytes --]
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/119056
_apply patch failure_
Submitter: Chaoyong He <chaoyong.he@corigine.com>
Date: Tuesday, October 25 2022 07:59:18
Applied on: CommitID:f800c03de9f71a7b59111b5972676edb99c28b0a
Apply patch set 119056-119081 failed:
Checking patch drivers/net/nfp/nfp_cpp_bridge.c...
error: while searching for:
struct nfp_cpp *cpp;
struct nfp_pf_dev *pf_dev;
int sockfd, datafd, op, ret;
unlink("/tmp/nfp_cpp");
sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
error: patch failed: drivers/net/nfp/nfp_cpp_bridge.c:379
error: while searching for:
return -EIO;
}
memset(&address, 0, sizeof(struct sockaddr));
address.sa_family = AF_UNIX;
error: patch failed: drivers/net/nfp/nfp_cpp_bridge.c:388
error: while searching for:
while (rte_service_runstate_get(pf_dev->cpp_bridge_id) != 0) {
datafd = accept(sockfd, NULL, NULL);
if (datafd < 0) {
RTE_LOG(ERR, PMD, "%s: accept call error (%d)\n",
__func__, errno);
RTE_LOG(ERR, PMD, "%s: service failed\n", __func__);
error: patch failed: drivers/net/nfp/nfp_cpp_bridge.c:415
Applying patch drivers/net/nfp/nfp_cpp_bridge.c with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/net/nfp/nfp_cpp_bridge.c b/drivers/net/nfp/nfp_cpp_bridge.c (rejected hunks)
@@ -379,6 +379,7 @@ nfp_cpp_bridge_service_func(void *args)
struct nfp_cpp *cpp;
struct nfp_pf_dev *pf_dev;
int sockfd, datafd, op, ret;
+ struct timeval timeout = {1, 0};
unlink("/tmp/nfp_cpp");
sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
@@ -388,6 +389,8 @@ nfp_cpp_bridge_service_func(void *args)
return -EIO;
}
+ setsockopt(sockfd, SOL_SOCKET, SO_RCVTIMEO, (char *)&timeout, sizeof(timeout));
+
memset(&address, 0, sizeof(struct sockaddr));
address.sa_family = AF_UNIX;
@@ -415,6 +418,9 @@ nfp_cpp_bridge_service_func(void *args)
while (rte_service_runstate_get(pf_dev->cpp_bridge_id) != 0) {
datafd = accept(sockfd, NULL, NULL);
if (datafd < 0) {
+ if (errno == EAGAIN || errno == EWOULDBLOCK)
+ continue;
+
RTE_LOG(ERR, PMD, "%s: accept call error (%d)\n",
__func__, errno);
RTE_LOG(ERR, PMD, "%s: service failed\n", __func__);
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
tcp = Y
udp = Y
vlan = Y
[rte_flow actions]
count = Y
error: patch failed: doc/guides/nics/features/nfp.ini:35
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
uint8_t ipv6_dst[16];
};
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:324
Checking patch drivers/net/nfp/nfp_flow.c...
error: while searching for:
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
bool is_mask);
/* List of possible subsequent items. */
const enum rte_flow_item_type *const next_item;
};
error: patch failed: drivers/net/nfp/nfp_flow.c:38
error: while searching for:
struct nfp_fl_key_ls *key_ls)
{
struct rte_eth_dev *ethdev;
const struct rte_flow_item *item;
struct nfp_flower_representor *representor;
const struct rte_flow_item_port_id *port_id;
error: patch failed: drivers/net/nfp/nfp_flow.c:491
error: while searching for:
PMD_DRV_LOG(DEBUG, "RTE_FLOW_ITEM_TYPE_IPV4 detected");
key_ls->key_layer |= NFP_FLOWER_LAYER_IPV4;
key_ls->key_size += sizeof(struct nfp_flower_ipv4);
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
PMD_DRV_LOG(DEBUG, "RTE_FLOW_ITEM_TYPE_IPV6 detected");
error: patch failed: drivers/net/nfp/nfp_flow.c:526
error: while searching for:
key_ls->key_layer |= NFP_FLOWER_LAYER_TP;
key_ls->key_size += sizeof(struct nfp_flower_tp_ports);
break;
default:
PMD_DRV_LOG(ERR, "Item type %d not supported.", item->type);
return -ENOTSUP;
error: patch failed: drivers/net/nfp/nfp_flow.c:547
error: while searching for:
return ret;
}
static int
nfp_flow_merge_eth(__rte_unused struct rte_flow *nfp_flow,
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
bool is_mask)
{
struct nfp_flower_mac_mpls *eth;
const struct rte_flow_item_eth *spec;
error: patch failed: drivers/net/nfp/nfp_flow.c:719
error: while searching for:
__rte_unused char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
bool is_mask)
{
struct nfp_flower_meta_tci *meta_tci;
const struct rte_flow_item_vlan *spec;
error: patch failed: drivers/net/nfp/nfp_flow.c:760
error: while searching for:
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
bool is_mask)
{
struct nfp_flower_ipv4 *ipv4;
const struct rte_ipv4_hdr *hdr;
struct nfp_flower_meta_tci *meta_tci;
const struct rte_flow_item_ipv4 *spec;
const struct rte_flow_item_ipv4 *mask;
spec = item->spec;
mask = item->mask ? item->mask : proc->mask_default;
meta_tci = (struct nfp_flower_meta_tci *)nfp_flow->payload.unmasked_data;
if (spec == NULL) {
PMD_DRV_LOG(DEBUG, "nfp flow merge ipv4: no item->spec!");
goto ipv4_end;
}
/*
* reserve space for L4 info.
* rte_flow has ipv4 before L4 but NFP flower fw requires L4 before ipv4
*/
if (meta_tci->nfp_flow_key_layer & NFP_FLOWER_LAYER_TP)
*mbuf_off += sizeof(struct nfp_flower_tp_ports);
hdr = is_mask ? &mask->hdr : &spec->hdr;
ipv4 = (struct nfp_flower_ipv4 *)*mbuf_off;
ipv4->ip_ext.tos = hdr->type_of_service;
ipv4->ip_ext.proto = hdr->next_proto_id;
ipv4->ip_ext.ttl = hdr->time_to_live;
ipv4->ipv4_src = hdr->src_addr;
ipv4->ipv4_dst = hdr->dst_addr;
ipv4_end:
*mbuf_off += sizeof(struct nfp_flower_ipv4);
return 0;
}
error: patch failed: drivers/net/nfp/nfp_flow.c:789
error: while searching for:
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
bool is_mask)
{
struct nfp_flower_ipv6 *ipv6;
const struct rte_ipv6_hdr *hdr;
error: patch failed: drivers/net/nfp/nfp_flow.c:833
error: while searching for:
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
bool is_mask)
{
uint8_t tcp_flags;
struct nfp_flower_tp_ports *ports;
error: patch failed: drivers/net/nfp/nfp_flow.c:878
error: while searching for:
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
bool is_mask)
{
char *ports_off;
struct nfp_flower_tp_ports *ports;
error: patch failed: drivers/net/nfp/nfp_flow.c:950
Hunk #11 succeeded at 1396 (offset 379 lines).
error: while searching for:
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
bool is_mask)
{
char *ports_off;
struct nfp_flower_tp_ports *ports;
error: patch failed: drivers/net/nfp/nfp_flow.c:991
error: while searching for:
return 0;
}
/* Graph of supported items and associated process function */
static const struct nfp_flow_item_proc nfp_flow_item_proc_list[] = {
[RTE_FLOW_ITEM_TYPE_END] = {
.next_item = NEXT_ITEM(RTE_FLOW_ITEM_TYPE_ETH),
},
[RTE_FLOW_ITEM_TYPE_ETH] = {
.next_item = NEXT_ITEM(RTE_FLOW_ITEM_TYPE_VLAN,
error: patch failed: drivers/net/nfp/nfp_flow.c:1027
error: while searching for:
.merge = nfp_flow_merge_tcp,
},
[RTE_FLOW_ITEM_TYPE_UDP] = {
.mask_support = &(const struct rte_flow_item_udp){
.hdr = {
.src_port = RTE_BE16(0xffff),
error: patch failed: drivers/net/nfp/nfp_flow.c:1113
error: while searching for:
.mask_sz = sizeof(struct rte_flow_item_sctp),
.merge = nfp_flow_merge_sctp,
},
};
static int
error: patch failed: drivers/net/nfp/nfp_flow.c:1134
error: while searching for:
return ret;
}
static int
nfp_flow_compile_item_proc(const struct rte_flow_item items[],
struct rte_flow *nfp_flow,
char **mbuf_off_exact,
char **mbuf_off_mask)
{
int i;
int ret = 0;
const struct rte_flow_item *item;
const struct nfp_flow_item_proc *proc_list;
proc_list = nfp_flow_item_proc_list;
for (item = items; item->type != RTE_FLOW_ITEM_TYPE_END; ++item) {
const struct nfp_flow_item_proc *proc = NULL;
for (i = 0; proc_list->next_item && proc_list->next_item[i]; ++i) {
if (proc_list->next_item[i] == item->type) {
proc = &nfp_flow_item_proc_list[item->type];
error: patch failed: drivers/net/nfp/nfp_flow.c:1187
error: while searching for:
}
ret = proc->merge(nfp_flow, mbuf_off_exact, item,
proc, false);
if (ret != 0) {
PMD_DRV_LOG(ERR, "nfp flow item %d exact merge failed", item->type);
break;
}
ret = proc->merge(nfp_flow, mbuf_off_mask, item,
proc, true);
if (ret != 0) {
PMD_DRV_LOG(ERR, "nfp flow item %d mask merge failed", item->type);
break;
error: patch failed: drivers/net/nfp/nfp_flow.c:1230
error: while searching for:
int ret;
char *mbuf_off_mask;
char *mbuf_off_exact;
mbuf_off_exact = nfp_flow->payload.unmasked_data +
sizeof(struct nfp_flower_meta_tci) +
error: patch failed: drivers/net/nfp/nfp_flow.c:1257
error: while searching for:
sizeof(struct nfp_flower_meta_tci) +
sizeof(struct nfp_flower_in_port);
/* Go over items */
ret = nfp_flow_compile_item_proc(items, nfp_flow,
&mbuf_off_exact, &mbuf_off_mask);
if (ret != 0) {
PMD_DRV_LOG(ERR, "nfp flow item compile failed.");
return -EINVAL;
}
return 0;
}
error: patch failed: drivers/net/nfp/nfp_flow.c:1265
error: while searching for:
return 0;
}
static const struct rte_flow_ops nfp_flow_ops = {
.validate = nfp_flow_validate,
.create = nfp_flow_create,
.destroy = nfp_flow_destroy,
.flush = nfp_flow_flush,
.query = nfp_flow_query,
};
int
error: patch failed: drivers/net/nfp/nfp_flow.c:2119
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/nfp_flow.c with 19 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
Rejected hunk #5.
Rejected hunk #6.
Rejected hunk #7.
Rejected hunk #8.
Rejected hunk #9.
Rejected hunk #10.
Hunk #11 applied cleanly.
Rejected hunk #12.
Rejected hunk #13.
Rejected hunk #14.
Rejected hunk #15.
Rejected hunk #16.
Rejected hunk #17.
Rejected hunk #18.
Rejected hunk #19.
Rejected hunk #20.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -35,6 +35,7 @@ sctp = Y
tcp = Y
udp = Y
vlan = Y
+vxlan = Y
[rte_flow actions]
count = Y
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -324,6 +324,41 @@ struct nfp_flower_ipv6 {
uint8_t ipv6_dst[16];
};
+struct nfp_flower_tun_ipv4 {
+ rte_be32_t src;
+ rte_be32_t dst;
+};
+
+struct nfp_flower_tun_ip_ext {
+ uint8_t tos;
+ uint8_t ttl;
+};
+
+/*
+ * Flow Frame IPv4 UDP TUNNEL --> Tunnel details (5W/20B)
+ * -----------------------------------------------------------------
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_addr_src |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_addr_dst |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved | tos | ttl |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | VNI | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_flower_ipv4_udp_tun {
+ struct nfp_flower_tun_ipv4 ipv4;
+ rte_be16_t reserved1;
+ struct nfp_flower_tun_ip_ext ip_ext;
+ rte_be32_t reserved2;
+ rte_be32_t tun_id;
+};
+
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
diff a/drivers/net/nfp/nfp_flow.c b/drivers/net/nfp/nfp_flow.c (rejected hunks)
@@ -38,7 +38,8 @@ struct nfp_flow_item_proc {
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
- bool is_mask);
+ bool is_mask,
+ bool is_outer_layer);
/* List of possible subsequent items. */
const enum rte_flow_item_type *const next_item;
};
@@ -491,6 +492,7 @@ nfp_flow_key_layers_calculate_items(const struct rte_flow_item items[],
struct nfp_fl_key_ls *key_ls)
{
struct rte_eth_dev *ethdev;
+ bool outer_ip4_flag = false;
const struct rte_flow_item *item;
struct nfp_flower_representor *representor;
const struct rte_flow_item_port_id *port_id;
@@ -526,6 +528,8 @@ nfp_flow_key_layers_calculate_items(const struct rte_flow_item items[],
PMD_DRV_LOG(DEBUG, "RTE_FLOW_ITEM_TYPE_IPV4 detected");
key_ls->key_layer |= NFP_FLOWER_LAYER_IPV4;
key_ls->key_size += sizeof(struct nfp_flower_ipv4);
+ if (!outer_ip4_flag)
+ outer_ip4_flag = true;
break;
case RTE_FLOW_ITEM_TYPE_IPV6:
PMD_DRV_LOG(DEBUG, "RTE_FLOW_ITEM_TYPE_IPV6 detected");
@@ -547,6 +551,21 @@ nfp_flow_key_layers_calculate_items(const struct rte_flow_item items[],
key_ls->key_layer |= NFP_FLOWER_LAYER_TP;
key_ls->key_size += sizeof(struct nfp_flower_tp_ports);
break;
+ case RTE_FLOW_ITEM_TYPE_VXLAN:
+ PMD_DRV_LOG(DEBUG, "RTE_FLOW_ITEM_TYPE_VXLAN detected");
+ /* Clear IPv4 bits */
+ key_ls->key_layer &= ~NFP_FLOWER_LAYER_IPV4;
+ key_ls->tun_type = NFP_FL_TUN_VXLAN;
+ key_ls->key_layer |= NFP_FLOWER_LAYER_VXLAN;
+ if (outer_ip4_flag) {
+ key_ls->key_size += sizeof(struct nfp_flower_ipv4_udp_tun);
+ /*
+ * The outer l3 layer information is
+ * in `struct nfp_flower_ipv4_udp_tun`
+ */
+ key_ls->key_size -= sizeof(struct nfp_flower_ipv4);
+ }
+ break;
default:
PMD_DRV_LOG(ERR, "Item type %d not supported.", item->type);
return -ENOTSUP;
@@ -719,12 +738,25 @@ nfp_flow_key_layers_calculate(const struct rte_flow_item items[],
return ret;
}
+static bool
+nfp_flow_is_tunnel(struct rte_flow *nfp_flow)
+{
+ struct nfp_flower_meta_tci *meta_tci;
+
+ meta_tci = (struct nfp_flower_meta_tci *)nfp_flow->payload.unmasked_data;
+ if (meta_tci->nfp_flow_key_layer & NFP_FLOWER_LAYER_VXLAN)
+ return true;
+
+ return false;
+}
+
static int
nfp_flow_merge_eth(__rte_unused struct rte_flow *nfp_flow,
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
- bool is_mask)
+ bool is_mask,
+ __rte_unused bool is_outer_layer)
{
struct nfp_flower_mac_mpls *eth;
const struct rte_flow_item_eth *spec;
@@ -760,7 +792,8 @@ nfp_flow_merge_vlan(struct rte_flow *nfp_flow,
__rte_unused char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
- bool is_mask)
+ bool is_mask,
+ __rte_unused bool is_outer_layer)
{
struct nfp_flower_meta_tci *meta_tci;
const struct rte_flow_item_vlan *spec;
@@ -789,41 +822,58 @@ nfp_flow_merge_ipv4(struct rte_flow *nfp_flow,
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
- bool is_mask)
+ bool is_mask,
+ bool is_outer_layer)
{
struct nfp_flower_ipv4 *ipv4;
const struct rte_ipv4_hdr *hdr;
struct nfp_flower_meta_tci *meta_tci;
const struct rte_flow_item_ipv4 *spec;
const struct rte_flow_item_ipv4 *mask;
+ struct nfp_flower_ipv4_udp_tun *ipv4_udp_tun;
spec = item->spec;
mask = item->mask ? item->mask : proc->mask_default;
meta_tci = (struct nfp_flower_meta_tci *)nfp_flow->payload.unmasked_data;
- if (spec == NULL) {
- PMD_DRV_LOG(DEBUG, "nfp flow merge ipv4: no item->spec!");
- goto ipv4_end;
- }
+ if (is_outer_layer && nfp_flow_is_tunnel(nfp_flow)) {
+ if (spec == NULL) {
+ PMD_DRV_LOG(DEBUG, "nfp flow merge ipv4: no item->spec!");
+ return 0;
+ }
- /*
- * reserve space for L4 info.
- * rte_flow has ipv4 before L4 but NFP flower fw requires L4 before ipv4
- */
- if (meta_tci->nfp_flow_key_layer & NFP_FLOWER_LAYER_TP)
- *mbuf_off += sizeof(struct nfp_flower_tp_ports);
+ hdr = is_mask ? &mask->hdr : &spec->hdr;
+ ipv4_udp_tun = (struct nfp_flower_ipv4_udp_tun *)*mbuf_off;
- hdr = is_mask ? &mask->hdr : &spec->hdr;
- ipv4 = (struct nfp_flower_ipv4 *)*mbuf_off;
+ ipv4_udp_tun->ip_ext.tos = hdr->type_of_service;
+ ipv4_udp_tun->ip_ext.ttl = hdr->time_to_live;
+ ipv4_udp_tun->ipv4.src = hdr->src_addr;
+ ipv4_udp_tun->ipv4.dst = hdr->dst_addr;
+ } else {
+ if (spec == NULL) {
+ PMD_DRV_LOG(DEBUG, "nfp flow merge ipv4: no item->spec!");
+ goto ipv4_end;
+ }
+
+ /*
+ * reserve space for L4 info.
+ * rte_flow has ipv4 before L4 but NFP flower fw requires L4 before ipv4
+ */
+ if (meta_tci->nfp_flow_key_layer & NFP_FLOWER_LAYER_TP)
+ *mbuf_off += sizeof(struct nfp_flower_tp_ports);
+
+ hdr = is_mask ? &mask->hdr : &spec->hdr;
+ ipv4 = (struct nfp_flower_ipv4 *)*mbuf_off;
- ipv4->ip_ext.tos = hdr->type_of_service;
- ipv4->ip_ext.proto = hdr->next_proto_id;
- ipv4->ip_ext.ttl = hdr->time_to_live;
- ipv4->ipv4_src = hdr->src_addr;
- ipv4->ipv4_dst = hdr->dst_addr;
+ ipv4->ip_ext.tos = hdr->type_of_service;
+ ipv4->ip_ext.proto = hdr->next_proto_id;
+ ipv4->ip_ext.ttl = hdr->time_to_live;
+ ipv4->ipv4_src = hdr->src_addr;
+ ipv4->ipv4_dst = hdr->dst_addr;
ipv4_end:
- *mbuf_off += sizeof(struct nfp_flower_ipv4);
+ *mbuf_off += sizeof(struct nfp_flower_ipv4);
+ }
return 0;
}
@@ -833,7 +883,8 @@ nfp_flow_merge_ipv6(struct rte_flow *nfp_flow,
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
- bool is_mask)
+ bool is_mask,
+ __rte_unused bool is_outer_layer)
{
struct nfp_flower_ipv6 *ipv6;
const struct rte_ipv6_hdr *hdr;
@@ -878,7 +929,8 @@ nfp_flow_merge_tcp(struct rte_flow *nfp_flow,
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
- bool is_mask)
+ bool is_mask,
+ __rte_unused bool is_outer_layer)
{
uint8_t tcp_flags;
struct nfp_flower_tp_ports *ports;
@@ -950,7 +1002,8 @@ nfp_flow_merge_udp(struct rte_flow *nfp_flow,
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
- bool is_mask)
+ bool is_mask,
+ bool is_outer_layer)
{
char *ports_off;
struct nfp_flower_tp_ports *ports;
@@ -991,7 +1050,8 @@ nfp_flow_merge_sctp(struct rte_flow *nfp_flow,
char **mbuf_off,
const struct rte_flow_item *item,
const struct nfp_flow_item_proc *proc,
- bool is_mask)
+ bool is_mask,
+ __rte_unused bool is_outer_layer)
{
char *ports_off;
struct nfp_flower_tp_ports *ports;
@@ -1027,10 +1087,42 @@ nfp_flow_merge_sctp(struct rte_flow *nfp_flow,
return 0;
}
+static int
+nfp_flow_merge_vxlan(__rte_unused struct rte_flow *nfp_flow,
+ char **mbuf_off,
+ const struct rte_flow_item *item,
+ const struct nfp_flow_item_proc *proc,
+ bool is_mask,
+ __rte_unused bool is_outer_layer)
+{
+ const struct rte_vxlan_hdr *hdr;
+ struct nfp_flower_ipv4_udp_tun *tun4;
+ const struct rte_flow_item_vxlan *spec;
+ const struct rte_flow_item_vxlan *mask;
+
+ spec = item->spec;
+ if (spec == NULL) {
+ PMD_DRV_LOG(DEBUG, "nfp flow merge vxlan: no item->spec!");
+ goto vxlan_end;
+ }
+
+ mask = item->mask ? item->mask : proc->mask_default;
+ hdr = is_mask ? &mask->hdr : &spec->hdr;
+
+ tun4 = (struct nfp_flower_ipv4_udp_tun *)*mbuf_off;
+ tun4->tun_id = hdr->vx_vni;
+
+vxlan_end:
+ *mbuf_off += sizeof(struct nfp_flower_ipv4_udp_tun);
+
+ return 0;
+}
+
/* Graph of supported items and associated process function */
static const struct nfp_flow_item_proc nfp_flow_item_proc_list[] = {
[RTE_FLOW_ITEM_TYPE_END] = {
- .next_item = NEXT_ITEM(RTE_FLOW_ITEM_TYPE_ETH),
+ .next_item = NEXT_ITEM(RTE_FLOW_ITEM_TYPE_ETH,
+ RTE_FLOW_ITEM_TYPE_IPV4),
},
[RTE_FLOW_ITEM_TYPE_ETH] = {
.next_item = NEXT_ITEM(RTE_FLOW_ITEM_TYPE_VLAN,
@@ -1113,6 +1205,7 @@ static const struct nfp_flow_item_proc nfp_flow_item_proc_list[] = {
.merge = nfp_flow_merge_tcp,
},
[RTE_FLOW_ITEM_TYPE_UDP] = {
+ .next_item = NEXT_ITEM(RTE_FLOW_ITEM_TYPE_VXLAN),
.mask_support = &(const struct rte_flow_item_udp){
.hdr = {
.src_port = RTE_BE16(0xffff),
@@ -1134,6 +1227,17 @@ static const struct nfp_flow_item_proc nfp_flow_item_proc_list[] = {
.mask_sz = sizeof(struct rte_flow_item_sctp),
.merge = nfp_flow_merge_sctp,
},
+ [RTE_FLOW_ITEM_TYPE_VXLAN] = {
+ .next_item = NEXT_ITEM(RTE_FLOW_ITEM_TYPE_ETH),
+ .mask_support = &(const struct rte_flow_item_vxlan){
+ .hdr = {
+ .vx_vni = RTE_BE32(0xffffff00),
+ },
+ },
+ .mask_default = &rte_flow_item_vxlan_mask,
+ .mask_sz = sizeof(struct rte_flow_item_vxlan),
+ .merge = nfp_flow_merge_vxlan,
+ },
};
static int
@@ -1187,21 +1291,53 @@ nfp_flow_item_check(const struct rte_flow_item *item,
return ret;
}
+static bool
+nfp_flow_is_tun_item(const struct rte_flow_item *item)
+{
+ if (item->type == RTE_FLOW_ITEM_TYPE_VXLAN)
+ return true;
+
+ return false;
+}
+
+static bool
+nfp_flow_inner_item_get(const struct rte_flow_item items[],
+ const struct rte_flow_item **inner_item)
+{
+ const struct rte_flow_item *item;
+
+ *inner_item = items;
+
+ for (item = items; item->type != RTE_FLOW_ITEM_TYPE_END; ++item) {
+ if (nfp_flow_is_tun_item(item)) {
+ *inner_item = ++item;
+ return true;
+ }
+ }
+
+ return false;
+}
+
static int
nfp_flow_compile_item_proc(const struct rte_flow_item items[],
struct rte_flow *nfp_flow,
char **mbuf_off_exact,
- char **mbuf_off_mask)
+ char **mbuf_off_mask,
+ bool is_outer_layer)
{
int i;
int ret = 0;
+ bool continue_flag = true;
const struct rte_flow_item *item;
const struct nfp_flow_item_proc *proc_list;
proc_list = nfp_flow_item_proc_list;
- for (item = items; item->type != RTE_FLOW_ITEM_TYPE_END; ++item) {
+ for (item = items; item->type != RTE_FLOW_ITEM_TYPE_END && continue_flag; ++item) {
const struct nfp_flow_item_proc *proc = NULL;
+ if (nfp_flow_is_tun_item(item))
+ continue_flag = false;
+
for (i = 0; proc_list->next_item && proc_list->next_item[i]; ++i) {
if (proc_list->next_item[i] == item->type) {
proc = &nfp_flow_item_proc_list[item->type];
@@ -1230,14 +1366,14 @@ nfp_flow_compile_item_proc(const struct rte_flow_item items[],
}
ret = proc->merge(nfp_flow, mbuf_off_exact, item,
- proc, false);
+ proc, false, is_outer_layer);
if (ret != 0) {
PMD_DRV_LOG(ERR, "nfp flow item %d exact merge failed", item->type);
break;
}
ret = proc->merge(nfp_flow, mbuf_off_mask, item,
- proc, true);
+ proc, true, is_outer_layer);
if (ret != 0) {
PMD_DRV_LOG(ERR, "nfp flow item %d mask merge failed", item->type);
break;
@@ -1257,6 +1393,9 @@ nfp_flow_compile_items(__rte_unused struct nfp_flower_representor *representor,
int ret;
char *mbuf_off_mask;
char *mbuf_off_exact;
+ bool is_tun_flow = false;
+ bool is_outer_layer = true;
+ const struct rte_flow_item *loop_item;
mbuf_off_exact = nfp_flow->payload.unmasked_data +
sizeof(struct nfp_flower_meta_tci) +
@@ -1265,14 +1404,29 @@ nfp_flow_compile_items(__rte_unused struct nfp_flower_representor *representor,
sizeof(struct nfp_flower_meta_tci) +
sizeof(struct nfp_flower_in_port);
+ /* Check if this is a tunnel flow and get the inner item*/
+ is_tun_flow = nfp_flow_inner_item_get(items, &loop_item);
+ if (is_tun_flow)
+ is_outer_layer = false;
+
/* Go over items */
- ret = nfp_flow_compile_item_proc(items, nfp_flow,
- &mbuf_off_exact, &mbuf_off_mask);
+ ret = nfp_flow_compile_item_proc(loop_item, nfp_flow,
+ &mbuf_off_exact, &mbuf_off_mask, is_outer_layer);
if (ret != 0) {
PMD_DRV_LOG(ERR, "nfp flow item compile failed.");
return -EINVAL;
}
+ /* Go over inner items */
+ if (is_tun_flow) {
+ ret = nfp_flow_compile_item_proc(items, nfp_flow,
+ &mbuf_off_exact, &mbuf_off_mask, true);
+ if (ret != 0) {
+ PMD_DRV_LOG(ERR, "nfp flow outer item compile failed.");
+ return -EINVAL;
+ }
+ }
+
return 0;
}
@@ -2119,12 +2273,35 @@ nfp_flow_query(struct rte_eth_dev *dev,
return 0;
}
+static int
+nfp_flow_tunnel_match(__rte_unused struct rte_eth_dev *dev,
+ __rte_unused struct rte_flow_tunnel *tunnel,
+ __rte_unused struct rte_flow_item **pmd_items,
+ uint32_t *num_of_items,
+ __rte_unused struct rte_flow_error *err)
+{
+ *num_of_items = 0;
+
+ return 0;
+}
+
+static int
+nfp_flow_tunnel_item_release(__rte_unused struct rte_eth_dev *dev,
+ __rte_unused struct rte_flow_item *pmd_items,
+ __rte_unused uint32_t num_of_items,
+ __rte_unused struct rte_flow_error *err)
+{
+ return 0;
+}
+
static const struct rte_flow_ops nfp_flow_ops = {
.validate = nfp_flow_validate,
.create = nfp_flow_create,
.destroy = nfp_flow_destroy,
.flush = nfp_flow_flush,
.query = nfp_flow_query,
+ .tunnel_match = nfp_flow_tunnel_match,
+ .tunnel_item_release = nfp_flow_tunnel_item_release,
};
int
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be32_t dst;
};
struct nfp_flower_tun_ip_ext {
uint8_t tos;
uint8_t ttl;
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:329
error: while searching for:
rte_be32_t tun_id;
};
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:359
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -329,6 +329,11 @@ struct nfp_flower_tun_ipv4 {
rte_be32_t dst;
};
+struct nfp_flower_tun_ipv6 {
+ uint8_t ipv6_src[16];
+ uint8_t ipv6_dst[16];
+};
+
struct nfp_flower_tun_ip_ext {
uint8_t tos;
uint8_t ttl;
@@ -359,6 +364,43 @@ struct nfp_flower_ipv4_udp_tun {
rte_be32_t tun_id;
};
+/*
+ * Flow Frame IPv6 UDP TUNNEL --> Tunnel details (11W/44B)
+ * -----------------------------------------------------------------
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 31 - 0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 63 - 32 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 95 - 64 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 127 - 96 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 31 - 0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 63 - 32 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 95 - 64 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 127 - 96 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved | tos | ttl |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | VNI | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_flower_ipv6_udp_tun {
+ struct nfp_flower_tun_ipv6 ipv6;
+ rte_be16_t reserved1;
+ struct nfp_flower_tun_ip_ext ip_ext;
+ rte_be32_t reserved2;
+ rte_be32_t tun_id;
+};
+
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
Hunk #1 succeeded at 468 (offset 222 lines).
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be16_t mtu;
};
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:129
error: while searching for:
rte_be16_t dst_port;
};
int nfp_flower_cmsg_mac_repr(struct nfp_app_fw_flower *app_fw_flower);
int nfp_flower_cmsg_repr_reify(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_representor *repr);
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:574
error: while searching for:
struct rte_flow *flow);
int nfp_flower_cmsg_flow_add(struct nfp_app_fw_flower *app_fw_flower,
struct rte_flow *flow);
#endif /* _NFP_CMSG_H_ */
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:583
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/nfp_flow.h...
error: while searching for:
NFP_FL_TUN_GENEVE = 4,
};
struct nfp_fl_key_ls {
uint32_t key_layer_two;
uint8_t key_layer;
error: patch failed: drivers/net/nfp/nfp_flow.h:90
error: while searching for:
char *action_data;
};
#define CIRC_CNT(head, tail, size) (((head) - (tail)) & ((size) - 1))
#define CIRC_SPACE(head, tail, size) CIRC_CNT((tail), ((head) + 1), (size))
struct circ_buf {
error: patch failed: drivers/net/nfp/nfp_flow.h:118
error: while searching for:
struct nfp_fl_stats_id stats_ids; /**< The stats id ring. */
struct nfp_fl_stats *stats; /**< Store stats of flow. */
rte_spinlock_t stats_lock; /** < Lock the update of 'stats' field. */
};
struct rte_flow {
struct nfp_fl_payload payload;
size_t length;
uint32_t hash_key;
bool install_flag;
};
int nfp_flow_priv_init(struct nfp_pf_dev *pf_dev);
error: patch failed: drivers/net/nfp/nfp_flow.h:161
Applied patch drivers/net/nfp/flower/nfp_flower_cmsg.c cleanly.
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Applying patch drivers/net/nfp/nfp_flow.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -129,6 +129,36 @@ struct nfp_flower_cmsg_port_mod {
rte_be16_t mtu;
};
+struct nfp_flower_tun_neigh {
+ uint8_t dst_mac[RTE_ETHER_ADDR_LEN];
+ uint8_t src_mac[RTE_ETHER_ADDR_LEN];
+ rte_be32_t port_id;
+};
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_NEIGH_V4
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | DST_IPV4 |
+ * +---------------------------------------------------------------+
+ * 1 | SRC_IPV4 |
+ * +---------------------------------------------------------------+
+ * 2 | DST_MAC_B5_B4_B3_B2 |
+ * +-------------------------------+-------------------------------+
+ * 3 | DST_MAC_B1_B0 | SRC_MAC_B5_B4 |
+ * +-------------------------------+-------------------------------+
+ * 4 | SRC_MAC_B3_B2_B1_B0 |
+ * +---------------------------------------------------------------+
+ * 5 | Egress Port (NFP internal) |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_tun_neigh_v4 {
+ rte_be32_t dst_ipv4;
+ rte_be32_t src_ipv4;
+ struct nfp_flower_tun_neigh common;
+};
+
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
@@ -574,6 +604,67 @@ struct nfp_fl_act_set_tport {
rte_be16_t dst_port;
};
+/*
+ * Pre-tunnel
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | - | opcode | |jump_id| - |M| - |V|
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_daddr_127_96 / ipv4_daddr |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_daddr_95_64 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_daddr_63_32 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_daddr_31_0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_fl_act_pre_tun {
+ struct nfp_fl_act_head head;
+ rte_be16_t flags;
+ union {
+ rte_be32_t ipv4_dst;
+ uint8_t ipv6_dst[16];
+ };
+};
+
+/*
+ * Set tunnel
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | res | opcode | res | len_lw| reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | tun_id0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | tun_id1 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | reserved | type |r| idx |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_flags | ttl | tos |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | reserved_cvs1 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | reserved_cvs2 | reserved_cvs3 |
+ * | var_flags | var_np |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_fl_act_set_tun {
+ struct nfp_fl_act_head head;
+ rte_be16_t reserved;
+ rte_be64_t tun_id;
+ rte_be32_t tun_type_index;
+ rte_be16_t tun_flags;
+ uint8_t ttl;
+ uint8_t tos;
+ rte_be16_t outer_vlan_tpid;
+ rte_be16_t outer_vlan_tci;
+ uint8_t tun_len; /* Only valid for NFP_FL_TUNNEL_GENEVE */
+ uint8_t reserved2;
+ rte_be16_t tun_proto; /* Only valid for NFP_FL_TUNNEL_GENEVE */
+} __rte_packed;
+
int nfp_flower_cmsg_mac_repr(struct nfp_app_fw_flower *app_fw_flower);
int nfp_flower_cmsg_repr_reify(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_representor *repr);
@@ -583,5 +674,7 @@ int nfp_flower_cmsg_flow_delete(struct nfp_app_fw_flower *app_fw_flower,
struct rte_flow *flow);
int nfp_flower_cmsg_flow_add(struct nfp_app_fw_flower *app_fw_flower,
struct rte_flow *flow);
+int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
+ struct nfp_flower_cmsg_tun_neigh_v4 *payload);
#endif /* _NFP_CMSG_H_ */
diff a/drivers/net/nfp/nfp_flow.h b/drivers/net/nfp/nfp_flow.h (rejected hunks)
@@ -90,6 +90,11 @@ enum nfp_flower_tun_type {
NFP_FL_TUN_GENEVE = 4,
};
+enum nfp_flow_type {
+ NFP_FLOW_COMMON,
+ NFP_FLOW_ENCAP,
+};
+
struct nfp_fl_key_ls {
uint32_t key_layer_two;
uint8_t key_layer;
@@ -118,6 +123,24 @@ struct nfp_fl_payload {
char *action_data;
};
+struct nfp_fl_tun {
+ LIST_ENTRY(nfp_fl_tun) next;
+ uint8_t ref_cnt;
+ struct nfp_fl_tun_entry {
+ uint8_t v6_flag;
+ uint8_t dst_addr[RTE_ETHER_ADDR_LEN];
+ uint8_t src_addr[RTE_ETHER_ADDR_LEN];
+ union {
+ rte_be32_t dst_ipv4;
+ uint8_t dst_ipv6[16];
+ } dst;
+ union {
+ rte_be32_t src_ipv4;
+ uint8_t src_ipv6[16];
+ } src;
+ } payload;
+};
+
#define CIRC_CNT(head, tail, size) (((head) - (tail)) & ((size) - 1))
#define CIRC_SPACE(head, tail, size) CIRC_CNT((tail), ((head) + 1), (size))
struct circ_buf {
@@ -161,13 +184,17 @@ struct nfp_flow_priv {
struct nfp_fl_stats_id stats_ids; /**< The stats id ring. */
struct nfp_fl_stats *stats; /**< Store stats of flow. */
rte_spinlock_t stats_lock; /** < Lock the update of 'stats' field. */
+ /* neighbor next */
+ LIST_HEAD(, nfp_fl_tun)nn_list; /**< Store nn entry */
};
struct rte_flow {
struct nfp_fl_payload payload;
+ struct nfp_fl_tun tun;
size_t length;
uint32_t hash_key;
bool install_flag;
+ enum nfp_flow_type type;
};
int nfp_flow_priv_init(struct nfp_pf_dev *pf_dev);
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
error: drivers/net/nfp/flower/nfp_flower_cmsg.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
struct nfp_flower_tun_neigh common;
};
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:159
error: while searching for:
};
};
/*
* Set tunnel
* 3 2 1
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:629
error: while searching for:
struct rte_flow *flow);
int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v4 *payload);
#endif /* _NFP_CMSG_H_ */
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:676
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -159,6 +159,42 @@ struct nfp_flower_cmsg_tun_neigh_v4 {
struct nfp_flower_tun_neigh common;
};
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_NEIGH_V6
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | DST_IPV6 [0] |
+ * +---------------------------------------------------------------+
+ * 1 | DST_IPV6 [1] |
+ * +---------------------------------------------------------------+
+ * 2 | DST_IPV6 [2] |
+ * +---------------------------------------------------------------+
+ * 3 | DST_IPV6 [3] |
+ * +---------------------------------------------------------------+
+ * 4 | SRC_IPV6 [0] |
+ * +---------------------------------------------------------------+
+ * 5 | SRC_IPV6 [1] |
+ * +---------------------------------------------------------------+
+ * 6 | SRC_IPV6 [2] |
+ * +---------------------------------------------------------------+
+ * 7 | SRC_IPV6 [3] |
+ * +---------------------------------------------------------------+
+ * 8 | DST_MAC_B5_B4_B3_B2 |
+ * +-------------------------------+-------------------------------+
+ * 9 | DST_MAC_B1_B0 | SRC_MAC_B5_B4 |
+ * +-------------------------------+-------------------------------+
+ * 10 | SRC_MAC_B3_B2_B1_B0 |
+ * +---------------+---------------+---------------+---------------+
+ * 11 | Egress Port (NFP internal) |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_tun_neigh_v6 {
+ uint8_t dst_ipv6[16];
+ uint8_t src_ipv6[16];
+ struct nfp_flower_tun_neigh common;
+};
+
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
@@ -629,6 +665,8 @@ struct nfp_fl_act_pre_tun {
};
};
+#define NFP_FL_PRE_TUN_IPV6 (1 << 0)
+
/*
* Set tunnel
* 3 2 1
@@ -676,5 +714,7 @@ int nfp_flower_cmsg_flow_add(struct nfp_app_fw_flower *app_fw_flower,
struct rte_flow *flow);
int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v4 *payload);
+int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
+ struct nfp_flower_cmsg_tun_neigh_v6 *payload);
#endif /* _NFP_CMSG_H_ */
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
set_tp_dst = Y
set_tp_src = Y
set_ttl = Y
error: patch failed: doc/guides/nics/features/nfp.ini:56
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -56,3 +56,4 @@ set_mac_src = Y
set_tp_dst = Y
set_tp_src = Y
set_ttl = Y
+vxlan_encap = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
[rte_flow actions]
count = Y
drop = Y
of_pop_vlan = Y
of_push_vlan = Y
of_set_vlan_pcp = Y
error: patch failed: doc/guides/nics/features/nfp.ini:40
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
error: drivers/net/nfp/flower/nfp_flower_cmsg.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
struct nfp_flower_tun_neigh common;
};
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:195
error: while searching for:
struct nfp_flower_cmsg_tun_neigh_v4 *payload);
int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v6 *payload);
#endif /* _NFP_CMSG_H_ */
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:716
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/nfp_flow.h...
error: while searching for:
#ifndef _NFP_FLOW_H_
#define _NFP_FLOW_H_
#include <rte_bitops.h>
#include <ethdev_driver.h>
error: patch failed: drivers/net/nfp/nfp_flow.h:6
error: while searching for:
enum nfp_flow_type {
NFP_FLOW_COMMON,
NFP_FLOW_ENCAP,
};
struct nfp_fl_key_ls {
error: patch failed: drivers/net/nfp/nfp_flow.h:93
error: while searching for:
uint64_t bytes;
};
struct nfp_flow_priv {
uint32_t hash_seed; /**< Hash seed for hash tables in this structure. */
uint64_t flower_version; /**< Flow version, always increase. */
error: patch failed: drivers/net/nfp/nfp_flow.h:169
error: while searching for:
struct nfp_fl_stats_id stats_ids; /**< The stats id ring. */
struct nfp_fl_stats *stats; /**< Store stats of flow. */
rte_spinlock_t stats_lock; /** < Lock the update of 'stats' field. */
/* neighbor next */
LIST_HEAD(, nfp_fl_tun)nn_list; /**< Store nn entry */
};
error: patch failed: drivers/net/nfp/nfp_flow.h:184
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch drivers/net/nfp/nfp_flow.h with 4 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
Rejected hunk #4.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -40,6 +40,7 @@ vxlan = Y
[rte_flow actions]
count = Y
drop = Y
+jump = Y
of_pop_vlan = Y
of_push_vlan = Y
of_set_vlan_pcp = Y
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -195,6 +195,91 @@ struct nfp_flower_cmsg_tun_neigh_v6 {
struct nfp_flower_tun_neigh common;
};
+#define NFP_TUN_PRE_TUN_RULE_DEL (1 << 0)
+#define NFP_TUN_PRE_TUN_IDX_BIT (1 << 3)
+#define NFP_TUN_PRE_TUN_IPV6_BIT (1 << 7)
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_PRE_TUN_RULE
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | FLAGS |
+ * +---------------------------------------------------------------+
+ * 1 | MAC_IDX | VLAN_ID |
+ * +---------------------------------------------------------------+
+ * 2 | HOST_CTX |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_pre_tun_rule {
+ rte_be32_t flags;
+ rte_be16_t port_idx;
+ rte_be16_t vlan_tci;
+ rte_be32_t host_ctx_id;
+};
+
+#define NFP_TUN_MAC_OFFLOAD_DEL_FLAG 0x2
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_MAC
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * Word +-----------------------+---+-+-+---------------+---------------+
+ * 0 | spare |NBI|D|F| Amount of MAC’s in this msg |
+ * +---------------+-------+---+-+-+---------------+---------------+
+ * 1 | Index 0 | MAC[0] | MAC[1] |
+ * +---------------+---------------+---------------+---------------+
+ * 2 | MAC[2] | MAC[3] | MAC[4] | MAC[5] |
+ * +---------------+---------------+---------------+---------------+
+ * 3 | Index 1 | MAC[0] | MAC[1] |
+ * +---------------+---------------+---------------+---------------+
+ * 4 | MAC[2] | MAC[3] | MAC[4] | MAC[5] |
+ * +---------------+---------------+---------------+---------------+
+ * ...
+ * +---------------+---------------+---------------+---------------+
+ * 2N-1 | Index N | MAC[0] | MAC[1] |
+ * +---------------+---------------+---------------+---------------+
+ * 2N | MAC[2] | MAC[3] | MAC[4] | MAC[5] |
+ * +---------------+---------------+---------------+---------------+
+ *
+ * F: Flush bit. Set if entire table must be flushed. Rest of info in cmsg
+ * will be ignored. Not implemented.
+ * D: Delete bit. Set if entry must be deleted instead of added
+ * NBI: Network Block Interface. Set to 0
+ * The amount of MAC’s per control message is limited only by the packet
+ * buffer size. A 2048B buffer can fit 253 MAC address and a 10240B buffer
+ * 1277 MAC addresses.
+ */
+struct nfp_flower_cmsg_tun_mac {
+ rte_be16_t flags;
+ rte_be16_t count; /**< Should always be 1 */
+ rte_be16_t index;
+ struct rte_ether_addr addr;
+};
+
+#define NFP_FL_IPV4_ADDRS_MAX 32
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_IPS
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | Number of IP Addresses |
+ * +---------------------------------------------------------------+
+ * 1 | IP Address #1 |
+ * +---------------------------------------------------------------+
+ * 2 | IP Address #2 |
+ * +---------------------------------------------------------------+
+ * | ... |
+ * +---------------------------------------------------------------+
+ * 32 | IP Address #32 |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_tun_ipv4_addr {
+ rte_be32_t count;
+ rte_be32_t ipv4_addr[NFP_FL_IPV4_ADDRS_MAX];
+};
+
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
@@ -716,5 +801,14 @@ int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v4 *payload);
int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v6 *payload);
+int nfp_flower_cmsg_tun_off_v4(struct nfp_app_fw_flower *app_fw_flower);
+int nfp_flower_cmsg_pre_tunnel_rule(struct nfp_app_fw_flower *app_fw_flower,
+ struct nfp_fl_rule_metadata *nfp_flow_meta,
+ uint16_t mac_idx,
+ bool is_del);
+int nfp_flower_cmsg_tun_mac_rule(struct nfp_app_fw_flower *app_fw_flower,
+ struct rte_ether_addr *mac,
+ uint16_t mac_idx,
+ bool is_del);
#endif /* _NFP_CMSG_H_ */
diff a/drivers/net/nfp/nfp_flow.h b/drivers/net/nfp/nfp_flow.h (rejected hunks)
@@ -6,6 +6,7 @@
#ifndef _NFP_FLOW_H_
#define _NFP_FLOW_H_
+#include <sys/queue.h>
#include <rte_bitops.h>
#include <ethdev_driver.h>
@@ -93,6 +94,7 @@ enum nfp_flower_tun_type {
enum nfp_flow_type {
NFP_FLOW_COMMON,
NFP_FLOW_ENCAP,
+ NFP_FLOW_DECAP,
};
struct nfp_fl_key_ls {
@@ -169,6 +171,14 @@ struct nfp_fl_stats {
uint64_t bytes;
};
+struct nfp_ipv4_addr_entry {
+ LIST_ENTRY(nfp_ipv4_addr_entry) next;
+ rte_be32_t ipv4_addr;
+ int ref_count;
+};
+
+#define NFP_TUN_PRE_TUN_RULE_LIMIT 32
+
struct nfp_flow_priv {
uint32_t hash_seed; /**< Hash seed for hash tables in this structure. */
uint64_t flower_version; /**< Flow version, always increase. */
@@ -184,6 +194,13 @@ struct nfp_flow_priv {
struct nfp_fl_stats_id stats_ids; /**< The stats id ring. */
struct nfp_fl_stats *stats; /**< Store stats of flow. */
rte_spinlock_t stats_lock; /** < Lock the update of 'stats' field. */
+ /* pre tunnel rule */
+ uint16_t pre_tun_cnt; /**< The size of pre tunnel rule */
+ uint8_t pre_tun_bitmap[NFP_TUN_PRE_TUN_RULE_LIMIT]; /**< Bitmap of pre tunnel rule */
+ struct rte_hash *pre_tun_table; /**< Hash table to store pre tunnel rule */
+ /* IPv4 off */
+ LIST_HEAD(, nfp_ipv4_addr_entry) ipv4_off_list; /**< Store ipv4 off */
+ rte_spinlock_t ipv4_off_lock; /**< Lock the ipv4 off list */
/* neighbor next */
LIST_HEAD(, nfp_fl_tun)nn_list; /**< Store nn entry */
};
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
error: drivers/net/nfp/flower/nfp_flower_cmsg.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be32_t ipv4_addr[NFP_FL_IPV4_ADDRS_MAX];
};
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:280
error: while searching for:
int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v6 *payload);
int nfp_flower_cmsg_tun_off_v4(struct nfp_app_fw_flower *app_fw_flower);
int nfp_flower_cmsg_pre_tunnel_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_fl_rule_metadata *nfp_flow_meta,
uint16_t mac_idx,
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:802
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/nfp_flow.h...
Hunk #1 succeeded at 186 (offset 9 lines).
error: while searching for:
/* IPv4 off */
LIST_HEAD(, nfp_ipv4_addr_entry) ipv4_off_list; /**< Store ipv4 off */
rte_spinlock_t ipv4_off_lock; /**< Lock the ipv4 off list */
/* neighbor next */
LIST_HEAD(, nfp_fl_tun)nn_list; /**< Store nn entry */
};
error: patch failed: drivers/net/nfp/nfp_flow.h:201
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch drivers/net/nfp/nfp_flow.h with 1 reject...
Hunk #1 applied cleanly.
Rejected hunk #2.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -280,6 +280,29 @@ struct nfp_flower_cmsg_tun_ipv4_addr {
rte_be32_t ipv4_addr[NFP_FL_IPV4_ADDRS_MAX];
};
+#define NFP_FL_IPV6_ADDRS_MAX 4
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_IP_V6
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | Number of IP Addresses |
+ * +---------------------------------------------------------------+
+ * 1 | IP Address1 #1 |
+ * +---------------------------------------------------------------+
+ * 2 | IP Address1 #2 |
+ * +---------------------------------------------------------------+
+ * | ... |
+ * +---------------------------------------------------------------+
+ * 16 | IP Address4 #4 |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_tun_ipv6_addr {
+ rte_be32_t count;
+ uint8_t ipv6_addr[NFP_FL_IPV6_ADDRS_MAX * 16];
+};
+
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
@@ -802,6 +825,7 @@ int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v6 *payload);
int nfp_flower_cmsg_tun_off_v4(struct nfp_app_fw_flower *app_fw_flower);
+int nfp_flower_cmsg_tun_off_v6(struct nfp_app_fw_flower *app_fw_flower);
int nfp_flower_cmsg_pre_tunnel_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_fl_rule_metadata *nfp_flow_meta,
uint16_t mac_idx,
diff a/drivers/net/nfp/nfp_flow.h b/drivers/net/nfp/nfp_flow.h (rejected hunks)
@@ -201,6 +207,9 @@ struct nfp_flow_priv {
/* IPv4 off */
LIST_HEAD(, nfp_ipv4_addr_entry) ipv4_off_list; /**< Store ipv4 off */
rte_spinlock_t ipv4_off_lock; /**< Lock the ipv4 off list */
+ /* IPv6 off */
+ LIST_HEAD(, nfp_ipv6_addr_entry) ipv6_off_list; /**< Store ipv6 off */
+ rte_spinlock_t ipv6_off_lock; /**< Lock the ipv6 off list */
/* neighbor next */
LIST_HEAD(, nfp_fl_tun)nn_list; /**< Store nn entry */
};
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
set_tp_dst = Y
set_tp_src = Y
set_ttl = Y
vxlan_encap = Y
error: patch failed: doc/guides/nics/features/nfp.ini:57
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -57,4 +57,5 @@ set_mac_src = Y
set_tp_dst = Y
set_tp_src = Y
set_ttl = Y
+vxlan_decap = Y
vxlan_encap = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
port_id = Y
set_ipv4_dscp = Y
set_ipv4_dst = Y
error: patch failed: doc/guides/nics/features/nfp.ini:45
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -45,6 +45,7 @@ of_pop_vlan = Y
of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
+raw_encap = Y
port_id = Y
set_ipv4_dscp = Y
set_ipv4_dst = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
[rte_flow items]
eth = Y
ipv4 = Y
ipv6 = Y
port_id = Y
error: patch failed: doc/guides/nics/features/nfp.ini:28
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -28,6 +28,7 @@ Usage doc = Y
[rte_flow items]
eth = Y
+geneve = Y
ipv4 = Y
ipv6 = Y
port_id = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
raw_encap = Y
port_id = Y
set_ipv4_dscp = Y
error: patch failed: doc/guides/nics/features/nfp.ini:46
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -46,6 +46,7 @@ of_pop_vlan = Y
of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
+raw_decap = Y
raw_encap = Y
port_id = Y
set_ipv4_dscp = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be32_t tun_id;
};
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:575
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/nfp_flow.h...
error: drivers/net/nfp/nfp_flow.h: does not match index
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 1 reject...
Rejected hunk #1.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -575,6 +575,35 @@ struct nfp_flower_ipv6_udp_tun {
rte_be32_t tun_id;
};
+/*
+ * Flow Frame GRE TUNNEL --> Tunnel details (6W/24B)
+ * -----------------------------------------------------------------
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_addr_src |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_addr_dst |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | tun_flags | tos | ttl |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved | Ethertype |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Key |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_flower_ipv4_gre_tun {
+ struct nfp_flower_tun_ipv4 ipv4;
+ rte_be16_t tun_flags;
+ struct nfp_flower_tun_ip_ext ip_ext;
+ rte_be16_t reserved1;
+ rte_be16_t ethertype;
+ rte_be32_t tun_key;
+ rte_be32_t reserved2;
+};
+
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
Hunk #1 succeeded at 662 (offset 58 lines).
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applied patch drivers/net/nfp/flower/nfp_flower_cmsg.h cleanly.
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
[rte_flow items]
eth = Y
geneve = Y
ipv4 = Y
ipv6 = Y
port_id = Y
error: patch failed: doc/guides/nics/features/nfp.ini:29
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -29,6 +29,8 @@ Usage doc = Y
[rte_flow items]
eth = Y
geneve = Y
+gre = Y
+gre_key = Y
ipv4 = Y
ipv6 = Y
port_id = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower.c...
error: while searching for:
nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev)
{
int ret;
unsigned int numa_node;
struct nfp_net_hw *pf_hw;
struct nfp_net_hw *ctrl_hw;
error: patch failed: drivers/net/nfp/flower/nfp_flower.c:1074
error: while searching for:
goto vnic_cleanup;
}
/* Fill in the PF vNIC and populate app struct */
app_fw_flower->pf_hw = pf_hw;
pf_hw->ctrl_bar = pf_dev->ctrl_bar;
error: patch failed: drivers/net/nfp/flower/nfp_flower.c:1115
Checking patch drivers/net/nfp/flower/nfp_flower.h...
error: while searching for:
#include "../nfp_common.h"
/*
* Flower fallback and ctrl path always adds and removes
* 8 bytes of prepended data. Tx descriptors must point
error: patch failed: drivers/net/nfp/flower/nfp_flower.h:8
error: while searching for:
/* service id of ctrl vnic service */
uint32_t ctrl_vnic_id;
struct nfp_flow_priv *flow_priv;
};
int nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev);
int nfp_secondary_init_app_fw_flower(struct nfp_cpp *cpp);
uint16_t nfp_flower_pf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
error: patch failed: drivers/net/nfp/flower/nfp_flower.h:57
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
error: drivers/net/nfp/flower/nfp_flower_cmsg.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: drivers/net/nfp/flower/nfp_flower_cmsg.h: does not match index
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not match index
Applying patch drivers/net/nfp/flower/nfp_flower.c with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch drivers/net/nfp/flower/nfp_flower.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
diff a/drivers/net/nfp/flower/nfp_flower.c b/drivers/net/nfp/flower/nfp_flower.c (rejected hunks)
@@ -1074,6 +1074,8 @@ int
nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev)
{
int ret;
+ int err;
+ uint64_t ext_features;
unsigned int numa_node;
struct nfp_net_hw *pf_hw;
struct nfp_net_hw *ctrl_hw;
@@ -1115,6 +1117,18 @@ nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev)
goto vnic_cleanup;
}
+ /* Read the extra features */
+ ext_features = nfp_rtsym_read_le(pf_dev->sym_tbl, "_abi_flower_extra_features",
+ &err);
+ if (err != 0) {
+ PMD_INIT_LOG(ERR, "Couldn't read extra features from fw");
+ ret = -EIO;
+ goto pf_cpp_area_cleanup;
+ }
+
+ /* Store the extra features */
+ app_fw_flower->ext_features = ext_features;
+
/* Fill in the PF vNIC and populate app struct */
app_fw_flower->pf_hw = pf_hw;
pf_hw->ctrl_bar = pf_dev->ctrl_bar;
diff a/drivers/net/nfp/flower/nfp_flower.h b/drivers/net/nfp/flower/nfp_flower.h (rejected hunks)
@@ -8,6 +8,21 @@
#include "../nfp_common.h"
+/* Extra features bitmap. */
+#define NFP_FL_FEATS_GENEVE RTE_BIT64(0)
+#define NFP_FL_NBI_MTU_SETTING RTE_BIT64(1)
+#define NFP_FL_FEATS_GENEVE_OPT RTE_BIT64(2)
+#define NFP_FL_FEATS_VLAN_PCP RTE_BIT64(3)
+#define NFP_FL_FEATS_VF_RLIM RTE_BIT64(4)
+#define NFP_FL_FEATS_FLOW_MOD RTE_BIT64(5)
+#define NFP_FL_FEATS_PRE_TUN_RULES RTE_BIT64(6)
+#define NFP_FL_FEATS_IPV6_TUN RTE_BIT64(7)
+#define NFP_FL_FEATS_VLAN_QINQ RTE_BIT64(8)
+#define NFP_FL_FEATS_QOS_PPS RTE_BIT64(9)
+#define NFP_FL_FEATS_QOS_METER RTE_BIT64(10)
+#define NFP_FL_FEATS_DECAP_V2 RTE_BIT64(11)
+#define NFP_FL_FEATS_HOST_ACK RTE_BIT64(31)
+
/*
* Flower fallback and ctrl path always adds and removes
* 8 bytes of prepended data. Tx descriptors must point
@@ -57,9 +72,18 @@ struct nfp_app_fw_flower {
/* service id of ctrl vnic service */
uint32_t ctrl_vnic_id;
+ /* Flower extra features */
+ uint64_t ext_features;
+
struct nfp_flow_priv *flow_priv;
};
+static inline bool
+nfp_flower_support_decap_v2(const struct nfp_app_fw_flower *app_fw_flower)
+{
+ return app_fw_flower->ext_features & NFP_FL_FEATS_DECAP_V2;
+}
+
int nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev);
int nfp_secondary_init_app_fw_flower(struct nfp_cpp *cpp);
uint16_t nfp_flower_pf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
https://lab.dpdk.org/results/dashboard/patchsets/24175/
UNH-IOL DPDK Community Lab
^ permalink raw reply [flat|nested] 2+ messages in thread
* |WARNING| pw119056-119081 [PATCH] [v3, 26/26] net/nfp: support new solution for tunnel decap action
@ 2022-10-25 8:19 dpdklab
0 siblings, 0 replies; 2+ messages in thread
From: dpdklab @ 2022-10-25 8:19 UTC (permalink / raw)
To: test-report; +Cc: dpdk-test-reports
[-- Attachment #1: Type: text/plain, Size: 44622 bytes --]
Test-Label: iol-testing
Test-Status: WARNING
http://dpdk.org/patch/119056
_apply patch failure_
Submitter: Chaoyong He <chaoyong.he@corigine.com>
Date: Tuesday, October 25 2022 07:59:18
Applied on: CommitID:011c617ca20858ce0ad20625e9d3e4c3d6252047
Apply patch set 119056-119081 failed:
Checking patch drivers/net/nfp/nfp_cpp_bridge.c...
error: while searching for:
struct nfp_cpp *cpp;
struct nfp_pf_dev *pf_dev;
int sockfd, datafd, op, ret;
unlink("/tmp/nfp_cpp");
sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
error: patch failed: drivers/net/nfp/nfp_cpp_bridge.c:379
Hunk #2 succeeded at 386 (offset -3 lines).
error: while searching for:
while (rte_service_runstate_get(pf_dev->cpp_bridge_id) != 0) {
datafd = accept(sockfd, NULL, NULL);
if (datafd < 0) {
RTE_LOG(ERR, PMD, "%s: accept call error (%d)\n",
__func__, errno);
RTE_LOG(ERR, PMD, "%s: service failed\n", __func__);
error: patch failed: drivers/net/nfp/nfp_cpp_bridge.c:415
Applying patch drivers/net/nfp/nfp_cpp_bridge.c with 2 rejects...
Rejected hunk #1.
Hunk #2 applied cleanly.
Rejected hunk #3.
diff a/drivers/net/nfp/nfp_cpp_bridge.c b/drivers/net/nfp/nfp_cpp_bridge.c (rejected hunks)
@@ -379,6 +379,7 @@ nfp_cpp_bridge_service_func(void *args)
struct nfp_cpp *cpp;
struct nfp_pf_dev *pf_dev;
int sockfd, datafd, op, ret;
+ struct timeval timeout = {1, 0};
unlink("/tmp/nfp_cpp");
sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
@@ -415,6 +418,9 @@ nfp_cpp_bridge_service_func(void *args)
while (rte_service_runstate_get(pf_dev->cpp_bridge_id) != 0) {
datafd = accept(sockfd, NULL, NULL);
if (datafd < 0) {
+ if (errno == EAGAIN || errno == EWOULDBLOCK)
+ continue;
+
RTE_LOG(ERR, PMD, "%s: accept call error (%d)\n",
__func__, errno);
RTE_LOG(ERR, PMD, "%s: service failed\n", __func__);
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
tcp = Y
udp = Y
vlan = Y
[rte_flow actions]
count = Y
error: patch failed: doc/guides/nics/features/nfp.ini:35
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
uint8_t ipv6_dst[16];
};
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:324
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -35,6 +35,7 @@ sctp = Y
tcp = Y
udp = Y
vlan = Y
+vxlan = Y
[rte_flow actions]
count = Y
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -324,6 +324,41 @@ struct nfp_flower_ipv6 {
uint8_t ipv6_dst[16];
};
+struct nfp_flower_tun_ipv4 {
+ rte_be32_t src;
+ rte_be32_t dst;
+};
+
+struct nfp_flower_tun_ip_ext {
+ uint8_t tos;
+ uint8_t ttl;
+};
+
+/*
+ * Flow Frame IPv4 UDP TUNNEL --> Tunnel details (5W/20B)
+ * -----------------------------------------------------------------
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_addr_src |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_addr_dst |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved | tos | ttl |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | VNI | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_flower_ipv4_udp_tun {
+ struct nfp_flower_tun_ipv4 ipv4;
+ rte_be16_t reserved1;
+ struct nfp_flower_tun_ip_ext ip_ext;
+ rte_be32_t reserved2;
+ rte_be32_t tun_id;
+};
+
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be32_t dst;
};
struct nfp_flower_tun_ip_ext {
uint8_t tos;
uint8_t ttl;
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:329
error: while searching for:
rte_be32_t tun_id;
};
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:359
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -329,6 +329,11 @@ struct nfp_flower_tun_ipv4 {
rte_be32_t dst;
};
+struct nfp_flower_tun_ipv6 {
+ uint8_t ipv6_src[16];
+ uint8_t ipv6_dst[16];
+};
+
struct nfp_flower_tun_ip_ext {
uint8_t tos;
uint8_t ttl;
@@ -359,6 +364,43 @@ struct nfp_flower_ipv4_udp_tun {
rte_be32_t tun_id;
};
+/*
+ * Flow Frame IPv6 UDP TUNNEL --> Tunnel details (11W/44B)
+ * -----------------------------------------------------------------
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 31 - 0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 63 - 32 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 95 - 64 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 127 - 96 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 31 - 0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 63 - 32 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 95 - 64 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 127 - 96 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved | tos | ttl |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | VNI | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_flower_ipv6_udp_tun {
+ struct nfp_flower_tun_ipv6 ipv6;
+ rte_be16_t reserved1;
+ struct nfp_flower_tun_ip_ext ip_ext;
+ rte_be32_t reserved2;
+ rte_be32_t tun_id;
+};
+
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
Hunk #1 succeeded at 177 (offset -69 lines).
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be16_t mtu;
};
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:129
error: while searching for:
rte_be16_t dst_port;
};
int nfp_flower_cmsg_mac_repr(struct nfp_app_fw_flower *app_fw_flower);
int nfp_flower_cmsg_repr_reify(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_representor *repr);
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:574
error: while searching for:
struct rte_flow *flow);
int nfp_flower_cmsg_flow_add(struct nfp_app_fw_flower *app_fw_flower,
struct rte_flow *flow);
#endif /* _NFP_CMSG_H_ */
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:583
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/nfp_flow.h...
error: drivers/net/nfp/nfp_flow.h: does not exist in index
Applied patch drivers/net/nfp/flower/nfp_flower_cmsg.c cleanly.
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -129,6 +129,36 @@ struct nfp_flower_cmsg_port_mod {
rte_be16_t mtu;
};
+struct nfp_flower_tun_neigh {
+ uint8_t dst_mac[RTE_ETHER_ADDR_LEN];
+ uint8_t src_mac[RTE_ETHER_ADDR_LEN];
+ rte_be32_t port_id;
+};
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_NEIGH_V4
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | DST_IPV4 |
+ * +---------------------------------------------------------------+
+ * 1 | SRC_IPV4 |
+ * +---------------------------------------------------------------+
+ * 2 | DST_MAC_B5_B4_B3_B2 |
+ * +-------------------------------+-------------------------------+
+ * 3 | DST_MAC_B1_B0 | SRC_MAC_B5_B4 |
+ * +-------------------------------+-------------------------------+
+ * 4 | SRC_MAC_B3_B2_B1_B0 |
+ * +---------------------------------------------------------------+
+ * 5 | Egress Port (NFP internal) |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_tun_neigh_v4 {
+ rte_be32_t dst_ipv4;
+ rte_be32_t src_ipv4;
+ struct nfp_flower_tun_neigh common;
+};
+
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
@@ -574,6 +604,67 @@ struct nfp_fl_act_set_tport {
rte_be16_t dst_port;
};
+/*
+ * Pre-tunnel
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | - | opcode | |jump_id| - |M| - |V|
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_daddr_127_96 / ipv4_daddr |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_daddr_95_64 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_daddr_63_32 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_daddr_31_0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_fl_act_pre_tun {
+ struct nfp_fl_act_head head;
+ rte_be16_t flags;
+ union {
+ rte_be32_t ipv4_dst;
+ uint8_t ipv6_dst[16];
+ };
+};
+
+/*
+ * Set tunnel
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | res | opcode | res | len_lw| reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | tun_id0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | tun_id1 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | reserved | type |r| idx |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_flags | ttl | tos |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | reserved_cvs1 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | reserved_cvs2 | reserved_cvs3 |
+ * | var_flags | var_np |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_fl_act_set_tun {
+ struct nfp_fl_act_head head;
+ rte_be16_t reserved;
+ rte_be64_t tun_id;
+ rte_be32_t tun_type_index;
+ rte_be16_t tun_flags;
+ uint8_t ttl;
+ uint8_t tos;
+ rte_be16_t outer_vlan_tpid;
+ rte_be16_t outer_vlan_tci;
+ uint8_t tun_len; /* Only valid for NFP_FL_TUNNEL_GENEVE */
+ uint8_t reserved2;
+ rte_be16_t tun_proto; /* Only valid for NFP_FL_TUNNEL_GENEVE */
+} __rte_packed;
+
int nfp_flower_cmsg_mac_repr(struct nfp_app_fw_flower *app_fw_flower);
int nfp_flower_cmsg_repr_reify(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_representor *repr);
@@ -583,5 +674,7 @@ int nfp_flower_cmsg_flow_delete(struct nfp_app_fw_flower *app_fw_flower,
struct rte_flow *flow);
int nfp_flower_cmsg_flow_add(struct nfp_app_fw_flower *app_fw_flower,
struct rte_flow *flow);
+int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
+ struct nfp_flower_cmsg_tun_neigh_v4 *payload);
#endif /* _NFP_CMSG_H_ */
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
error: drivers/net/nfp/flower/nfp_flower_cmsg.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
struct nfp_flower_tun_neigh common;
};
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:159
error: while searching for:
};
};
/*
* Set tunnel
* 3 2 1
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:629
error: while searching for:
struct rte_flow *flow);
int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v4 *payload);
#endif /* _NFP_CMSG_H_ */
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:676
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -159,6 +159,42 @@ struct nfp_flower_cmsg_tun_neigh_v4 {
struct nfp_flower_tun_neigh common;
};
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_NEIGH_V6
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | DST_IPV6 [0] |
+ * +---------------------------------------------------------------+
+ * 1 | DST_IPV6 [1] |
+ * +---------------------------------------------------------------+
+ * 2 | DST_IPV6 [2] |
+ * +---------------------------------------------------------------+
+ * 3 | DST_IPV6 [3] |
+ * +---------------------------------------------------------------+
+ * 4 | SRC_IPV6 [0] |
+ * +---------------------------------------------------------------+
+ * 5 | SRC_IPV6 [1] |
+ * +---------------------------------------------------------------+
+ * 6 | SRC_IPV6 [2] |
+ * +---------------------------------------------------------------+
+ * 7 | SRC_IPV6 [3] |
+ * +---------------------------------------------------------------+
+ * 8 | DST_MAC_B5_B4_B3_B2 |
+ * +-------------------------------+-------------------------------+
+ * 9 | DST_MAC_B1_B0 | SRC_MAC_B5_B4 |
+ * +-------------------------------+-------------------------------+
+ * 10 | SRC_MAC_B3_B2_B1_B0 |
+ * +---------------+---------------+---------------+---------------+
+ * 11 | Egress Port (NFP internal) |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_tun_neigh_v6 {
+ uint8_t dst_ipv6[16];
+ uint8_t src_ipv6[16];
+ struct nfp_flower_tun_neigh common;
+};
+
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
@@ -629,6 +665,8 @@ struct nfp_fl_act_pre_tun {
};
};
+#define NFP_FL_PRE_TUN_IPV6 (1 << 0)
+
/*
* Set tunnel
* 3 2 1
@@ -676,5 +714,7 @@ int nfp_flower_cmsg_flow_add(struct nfp_app_fw_flower *app_fw_flower,
struct rte_flow *flow);
int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v4 *payload);
+int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
+ struct nfp_flower_cmsg_tun_neigh_v6 *payload);
#endif /* _NFP_CMSG_H_ */
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
set_tp_dst = Y
set_tp_src = Y
set_ttl = Y
error: patch failed: doc/guides/nics/features/nfp.ini:56
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -56,3 +56,4 @@ set_mac_src = Y
set_tp_dst = Y
set_tp_src = Y
set_ttl = Y
+vxlan_encap = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
[rte_flow actions]
count = Y
drop = Y
of_pop_vlan = Y
of_push_vlan = Y
of_set_vlan_pcp = Y
error: patch failed: doc/guides/nics/features/nfp.ini:40
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
error: drivers/net/nfp/flower/nfp_flower_cmsg.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
struct nfp_flower_tun_neigh common;
};
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:195
error: while searching for:
struct nfp_flower_cmsg_tun_neigh_v4 *payload);
int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v6 *payload);
#endif /* _NFP_CMSG_H_ */
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:716
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/nfp_flow.h...
error: drivers/net/nfp/nfp_flow.h: does not exist in index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -40,6 +40,7 @@ vxlan = Y
[rte_flow actions]
count = Y
drop = Y
+jump = Y
of_pop_vlan = Y
of_push_vlan = Y
of_set_vlan_pcp = Y
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -195,6 +195,91 @@ struct nfp_flower_cmsg_tun_neigh_v6 {
struct nfp_flower_tun_neigh common;
};
+#define NFP_TUN_PRE_TUN_RULE_DEL (1 << 0)
+#define NFP_TUN_PRE_TUN_IDX_BIT (1 << 3)
+#define NFP_TUN_PRE_TUN_IPV6_BIT (1 << 7)
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_PRE_TUN_RULE
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | FLAGS |
+ * +---------------------------------------------------------------+
+ * 1 | MAC_IDX | VLAN_ID |
+ * +---------------------------------------------------------------+
+ * 2 | HOST_CTX |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_pre_tun_rule {
+ rte_be32_t flags;
+ rte_be16_t port_idx;
+ rte_be16_t vlan_tci;
+ rte_be32_t host_ctx_id;
+};
+
+#define NFP_TUN_MAC_OFFLOAD_DEL_FLAG 0x2
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_MAC
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * Word +-----------------------+---+-+-+---------------+---------------+
+ * 0 | spare |NBI|D|F| Amount of MAC’s in this msg |
+ * +---------------+-------+---+-+-+---------------+---------------+
+ * 1 | Index 0 | MAC[0] | MAC[1] |
+ * +---------------+---------------+---------------+---------------+
+ * 2 | MAC[2] | MAC[3] | MAC[4] | MAC[5] |
+ * +---------------+---------------+---------------+---------------+
+ * 3 | Index 1 | MAC[0] | MAC[1] |
+ * +---------------+---------------+---------------+---------------+
+ * 4 | MAC[2] | MAC[3] | MAC[4] | MAC[5] |
+ * +---------------+---------------+---------------+---------------+
+ * ...
+ * +---------------+---------------+---------------+---------------+
+ * 2N-1 | Index N | MAC[0] | MAC[1] |
+ * +---------------+---------------+---------------+---------------+
+ * 2N | MAC[2] | MAC[3] | MAC[4] | MAC[5] |
+ * +---------------+---------------+---------------+---------------+
+ *
+ * F: Flush bit. Set if entire table must be flushed. Rest of info in cmsg
+ * will be ignored. Not implemented.
+ * D: Delete bit. Set if entry must be deleted instead of added
+ * NBI: Network Block Interface. Set to 0
+ * The amount of MAC’s per control message is limited only by the packet
+ * buffer size. A 2048B buffer can fit 253 MAC address and a 10240B buffer
+ * 1277 MAC addresses.
+ */
+struct nfp_flower_cmsg_tun_mac {
+ rte_be16_t flags;
+ rte_be16_t count; /**< Should always be 1 */
+ rte_be16_t index;
+ struct rte_ether_addr addr;
+};
+
+#define NFP_FL_IPV4_ADDRS_MAX 32
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_IPS
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | Number of IP Addresses |
+ * +---------------------------------------------------------------+
+ * 1 | IP Address #1 |
+ * +---------------------------------------------------------------+
+ * 2 | IP Address #2 |
+ * +---------------------------------------------------------------+
+ * | ... |
+ * +---------------------------------------------------------------+
+ * 32 | IP Address #32 |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_tun_ipv4_addr {
+ rte_be32_t count;
+ rte_be32_t ipv4_addr[NFP_FL_IPV4_ADDRS_MAX];
+};
+
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
@@ -716,5 +801,14 @@ int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v4 *payload);
int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v6 *payload);
+int nfp_flower_cmsg_tun_off_v4(struct nfp_app_fw_flower *app_fw_flower);
+int nfp_flower_cmsg_pre_tunnel_rule(struct nfp_app_fw_flower *app_fw_flower,
+ struct nfp_fl_rule_metadata *nfp_flow_meta,
+ uint16_t mac_idx,
+ bool is_del);
+int nfp_flower_cmsg_tun_mac_rule(struct nfp_app_fw_flower *app_fw_flower,
+ struct rte_ether_addr *mac,
+ uint16_t mac_idx,
+ bool is_del);
#endif /* _NFP_CMSG_H_ */
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
error: drivers/net/nfp/flower/nfp_flower_cmsg.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be32_t ipv4_addr[NFP_FL_IPV4_ADDRS_MAX];
};
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:280
error: while searching for:
int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v6 *payload);
int nfp_flower_cmsg_tun_off_v4(struct nfp_app_fw_flower *app_fw_flower);
int nfp_flower_cmsg_pre_tunnel_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_fl_rule_metadata *nfp_flow_meta,
uint16_t mac_idx,
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:802
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/nfp_flow.h...
error: drivers/net/nfp/nfp_flow.h: does not exist in index
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -280,6 +280,29 @@ struct nfp_flower_cmsg_tun_ipv4_addr {
rte_be32_t ipv4_addr[NFP_FL_IPV4_ADDRS_MAX];
};
+#define NFP_FL_IPV6_ADDRS_MAX 4
+
+/*
+ * NFP_FLOWER_CMSG_TYPE_TUN_IP_V6
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | Number of IP Addresses |
+ * +---------------------------------------------------------------+
+ * 1 | IP Address1 #1 |
+ * +---------------------------------------------------------------+
+ * 2 | IP Address1 #2 |
+ * +---------------------------------------------------------------+
+ * | ... |
+ * +---------------------------------------------------------------+
+ * 16 | IP Address4 #4 |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_cmsg_tun_ipv6_addr {
+ rte_be32_t count;
+ uint8_t ipv6_addr[NFP_FL_IPV6_ADDRS_MAX * 16];
+};
+
/*
* NFP_FLOWER_CMSG_TYPE_FLOW_STATS
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
@@ -802,6 +825,7 @@ int nfp_flower_cmsg_tun_neigh_v4_rule(struct nfp_app_fw_flower *app_fw_flower,
int nfp_flower_cmsg_tun_neigh_v6_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_flower_cmsg_tun_neigh_v6 *payload);
int nfp_flower_cmsg_tun_off_v4(struct nfp_app_fw_flower *app_fw_flower);
+int nfp_flower_cmsg_tun_off_v6(struct nfp_app_fw_flower *app_fw_flower);
int nfp_flower_cmsg_pre_tunnel_rule(struct nfp_app_fw_flower *app_fw_flower,
struct nfp_fl_rule_metadata *nfp_flow_meta,
uint16_t mac_idx,
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
set_tp_dst = Y
set_tp_src = Y
set_ttl = Y
vxlan_encap = Y
error: patch failed: doc/guides/nics/features/nfp.ini:57
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -57,4 +57,5 @@ set_mac_src = Y
set_tp_dst = Y
set_tp_src = Y
set_ttl = Y
+vxlan_decap = Y
vxlan_encap = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
port_id = Y
set_ipv4_dscp = Y
set_ipv4_dst = Y
error: patch failed: doc/guides/nics/features/nfp.ini:45
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -45,6 +45,7 @@ of_pop_vlan = Y
of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
+raw_encap = Y
port_id = Y
set_ipv4_dscp = Y
set_ipv4_dst = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
[rte_flow items]
eth = Y
ipv4 = Y
ipv6 = Y
port_id = Y
error: patch failed: doc/guides/nics/features/nfp.ini:28
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -28,6 +28,7 @@ Usage doc = Y
[rte_flow items]
eth = Y
+geneve = Y
ipv4 = Y
ipv6 = Y
port_id = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
raw_encap = Y
port_id = Y
set_ipv4_dscp = Y
error: patch failed: doc/guides/nics/features/nfp.ini:46
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -46,6 +46,7 @@ of_pop_vlan = Y
of_push_vlan = Y
of_set_vlan_pcp = Y
of_set_vlan_vid = Y
+raw_decap = Y
raw_encap = Y
port_id = Y
set_ipv4_dscp = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be32_t tun_id;
};
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:575
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/nfp_flow.h...
error: drivers/net/nfp/nfp_flow.h: does not exist in index
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 1 reject...
Rejected hunk #1.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -575,6 +575,35 @@ struct nfp_flower_ipv6_udp_tun {
rte_be32_t tun_id;
};
+/*
+ * Flow Frame GRE TUNNEL --> Tunnel details (6W/24B)
+ * -----------------------------------------------------------------
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_addr_src |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv4_addr_dst |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | tun_flags | tos | ttl |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved | Ethertype |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Key |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_flower_ipv4_gre_tun {
+ struct nfp_flower_tun_ipv4 ipv4;
+ rte_be16_t tun_flags;
+ struct nfp_flower_tun_ip_ext ip_ext;
+ rte_be16_t reserved1;
+ rte_be16_t ethertype;
+ rte_be32_t tun_key;
+ rte_be32_t reserved2;
+};
+
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be32_t reserved2;
};
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:604
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 1 reject...
Rejected hunk #1.
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -604,6 +604,47 @@ struct nfp_flower_ipv4_gre_tun {
rte_be32_t reserved2;
};
+/*
+ * Flow Frame GRE TUNNEL V6 --> Tunnel details (12W/48B)
+ * -----------------------------------------------------------------
+ * 3 2 1
+ * 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 31 - 0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 63 - 32 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 95 - 64 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_src, 127 - 96 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 31 - 0 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 63 - 32 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 95 - 64 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | ipv6_addr_dst, 127 - 96 |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | tun_flags | tos | ttl |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved | Ethertype |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Key |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ * | Reserved |
+ * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ */
+struct nfp_flower_ipv6_gre_tun {
+ struct nfp_flower_tun_ipv6 ipv6;
+ rte_be16_t tun_flags;
+ struct nfp_flower_tun_ip_ext ip_ext;
+ rte_be16_t reserved1;
+ rte_be16_t ethertype;
+ rte_be32_t tun_key;
+ rte_be32_t reserved2;
+};
+
struct nfp_fl_act_head {
uint8_t jump_id;
uint8_t len_lw;
Checking patch doc/guides/nics/features/nfp.ini...
error: while searching for:
[rte_flow items]
eth = Y
geneve = Y
ipv4 = Y
ipv6 = Y
port_id = Y
error: patch failed: doc/guides/nics/features/nfp.ini:29
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applying patch doc/guides/nics/features/nfp.ini with 1 reject...
Rejected hunk #1.
diff a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini (rejected hunks)
@@ -29,6 +29,8 @@ Usage doc = Y
[rte_flow items]
eth = Y
geneve = Y
+gre = Y
+gre_key = Y
ipv4 = Y
ipv6 = Y
port_id = Y
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Checking patch drivers/net/nfp/flower/nfp_flower.c...
Hunk #1 succeeded at 1072 (offset -2 lines).
Hunk #2 succeeded at 1109 (offset -8 lines).
Checking patch drivers/net/nfp/flower/nfp_flower.h...
error: while searching for:
#include "../nfp_common.h"
/*
* Flower fallback and ctrl path always adds and removes
* 8 bytes of prepended data. Tx descriptors must point
error: patch failed: drivers/net/nfp/flower/nfp_flower.h:8
error: while searching for:
/* service id of ctrl vnic service */
uint32_t ctrl_vnic_id;
struct nfp_flow_priv *flow_priv;
};
int nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev);
int nfp_secondary_init_app_fw_flower(struct nfp_cpp *cpp);
uint16_t nfp_flower_pf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
error: patch failed: drivers/net/nfp/flower/nfp_flower.h:57
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.c...
error: drivers/net/nfp/flower/nfp_flower_cmsg.c: does not match index
Checking patch drivers/net/nfp/flower/nfp_flower_cmsg.h...
error: while searching for:
rte_be32_t port_id;
};
/*
* NFP_FLOWER_CMSG_TYPE_TUN_NEIGH_V4
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:135
error: while searching for:
rte_be32_t dst_ipv4;
rte_be32_t src_ipv4;
struct nfp_flower_tun_neigh common;
};
/*
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:157
error: while searching for:
uint8_t dst_ipv6[16];
uint8_t src_ipv6[16];
struct nfp_flower_tun_neigh common;
};
#define NFP_TUN_PRE_TUN_RULE_DEL (1 << 0)
error: patch failed: drivers/net/nfp/flower/nfp_flower_cmsg.h:193
Checking patch drivers/net/nfp/nfp_flow.c...
error: drivers/net/nfp/nfp_flow.c: does not exist in index
Applied patch drivers/net/nfp/flower/nfp_flower.c cleanly.
Applying patch drivers/net/nfp/flower/nfp_flower.h with 2 rejects...
Rejected hunk #1.
Rejected hunk #2.
Applying patch drivers/net/nfp/flower/nfp_flower_cmsg.h with 3 rejects...
Rejected hunk #1.
Rejected hunk #2.
Rejected hunk #3.
diff a/drivers/net/nfp/flower/nfp_flower.h b/drivers/net/nfp/flower/nfp_flower.h (rejected hunks)
@@ -8,6 +8,21 @@
#include "../nfp_common.h"
+/* Extra features bitmap. */
+#define NFP_FL_FEATS_GENEVE RTE_BIT64(0)
+#define NFP_FL_NBI_MTU_SETTING RTE_BIT64(1)
+#define NFP_FL_FEATS_GENEVE_OPT RTE_BIT64(2)
+#define NFP_FL_FEATS_VLAN_PCP RTE_BIT64(3)
+#define NFP_FL_FEATS_VF_RLIM RTE_BIT64(4)
+#define NFP_FL_FEATS_FLOW_MOD RTE_BIT64(5)
+#define NFP_FL_FEATS_PRE_TUN_RULES RTE_BIT64(6)
+#define NFP_FL_FEATS_IPV6_TUN RTE_BIT64(7)
+#define NFP_FL_FEATS_VLAN_QINQ RTE_BIT64(8)
+#define NFP_FL_FEATS_QOS_PPS RTE_BIT64(9)
+#define NFP_FL_FEATS_QOS_METER RTE_BIT64(10)
+#define NFP_FL_FEATS_DECAP_V2 RTE_BIT64(11)
+#define NFP_FL_FEATS_HOST_ACK RTE_BIT64(31)
+
/*
* Flower fallback and ctrl path always adds and removes
* 8 bytes of prepended data. Tx descriptors must point
@@ -57,9 +72,18 @@ struct nfp_app_fw_flower {
/* service id of ctrl vnic service */
uint32_t ctrl_vnic_id;
+ /* Flower extra features */
+ uint64_t ext_features;
+
struct nfp_flow_priv *flow_priv;
};
+static inline bool
+nfp_flower_support_decap_v2(const struct nfp_app_fw_flower *app_fw_flower)
+{
+ return app_fw_flower->ext_features & NFP_FL_FEATS_DECAP_V2;
+}
+
int nfp_init_app_fw_flower(struct nfp_pf_dev *pf_dev);
int nfp_secondary_init_app_fw_flower(struct nfp_cpp *cpp);
uint16_t nfp_flower_pf_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
diff a/drivers/net/nfp/flower/nfp_flower_cmsg.h b/drivers/net/nfp/flower/nfp_flower_cmsg.h (rejected hunks)
@@ -135,6 +135,21 @@ struct nfp_flower_tun_neigh {
rte_be32_t port_id;
};
+/*
+ * Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
+ * -----\ 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+ * +---------------------------------------------------------------+
+ * 0 | VLAN_TPID | VLAN_ID |
+ * +---------------------------------------------------------------+
+ * 1 | HOST_CTX |
+ * +---------------------------------------------------------------+
+ */
+struct nfp_flower_tun_neigh_ext {
+ rte_be16_t vlan_tpid;
+ rte_be16_t vlan_tci;
+ rte_be32_t host_ctx;
+};
+
/*
* NFP_FLOWER_CMSG_TYPE_TUN_NEIGH_V4
* Bit 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0
@@ -157,6 +172,7 @@ struct nfp_flower_cmsg_tun_neigh_v4 {
rte_be32_t dst_ipv4;
rte_be32_t src_ipv4;
struct nfp_flower_tun_neigh common;
+ struct nfp_flower_tun_neigh_ext ext;
};
/*
@@ -193,6 +209,7 @@ struct nfp_flower_cmsg_tun_neigh_v6 {
uint8_t dst_ipv6[16];
uint8_t src_ipv6[16];
struct nfp_flower_tun_neigh common;
+ struct nfp_flower_tun_neigh_ext ext;
};
#define NFP_TUN_PRE_TUN_RULE_DEL (1 << 0)
https://lab.dpdk.org/results/dashboard/patchsets/24175/
UNH-IOL DPDK Community Lab
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-25 9:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 9:22 |WARNING| pw119056-119081 [PATCH] [v3, 26/26] net/nfp: support new solution for tunnel decap action dpdklab
-- strict thread matches above, loose matches on Subject: below --
2022-10-25 8:19 dpdklab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).