summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/netronome/nfp/flower/main.h
diff options
context:
space:
mode:
authorLouis Peens <louis.peens@corigine.com>2022-05-05 14:43:44 +0900
committerDavid S. Miller <davem@davemloft.net>2022-05-06 11:21:34 +0100
commit9ee7c42183d1eaa7d559a7c20cbbf7803a25523e (patch)
tree43d4aae09a2ff6672406be07601af446b2067eee /drivers/net/ethernet/netronome/nfp/flower/main.h
parent9d5447ed44b5ddca07d82aba4d8a9436c4e910c4 (diff)
nfp: flower: update nfp_tun_neigh structs
Prepare for more rework in following patches by updating the existing nfp_neigh_structs. The update allows for the same headers to be used for both old and new firmware, with a slight length adjustment when sending the control message to the firmware. Signed-off-by: Louis Peens <louis.peens@corigine.com> Signed-off-by: Yinjun Zhang <yinjun.zhang@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/netronome/nfp/flower/main.h')
-rw-r--r--drivers/net/ethernet/netronome/nfp/flower/main.h50
1 files changed, 29 insertions, 21 deletions
diff --git a/drivers/net/ethernet/netronome/nfp/flower/main.h b/drivers/net/ethernet/netronome/nfp/flower/main.h
index 454fdb6ea4a5..2c011d60c212 100644
--- a/drivers/net/ethernet/netronome/nfp/flower/main.h
+++ b/drivers/net/ethernet/netronome/nfp/flower/main.h
@@ -111,47 +111,55 @@ struct nfp_fl_tunnel_offloads {
};
/**
- * struct nfp_tun_neigh - neighbour/route entry on the NFP
- * @dst_ipv4: Destination IPv4 address
- * @src_ipv4: Source IPv4 address
+ * struct nfp_tun_neigh - basic neighbour data
* @dst_addr: Destination MAC address
* @src_addr: Source MAC address
* @port_id: NFP port to output packet on - associated with source IPv4
- * @vlan_tpid: VLAN_TPID match field
- * @vlan_tci: VLAN_TCI match field
- * @host_ctx: Host context ID to be saved here
*/
struct nfp_tun_neigh {
- __be32 dst_ipv4;
- __be32 src_ipv4;
u8 dst_addr[ETH_ALEN];
u8 src_addr[ETH_ALEN];
__be32 port_id;
+};
+
+/**
+ * struct nfp_tun_neigh_ext - extended neighbour data
+ * @vlan_tpid: VLAN_TPID match field
+ * @vlan_tci: VLAN_TCI match field
+ * @host_ctx: Host context ID to be saved here
+ */
+struct nfp_tun_neigh_ext {
__be16 vlan_tpid;
__be16 vlan_tci;
__be32 host_ctx;
};
/**
- * struct nfp_tun_neigh_v6 - neighbour/route entry on the NFP
+ * struct nfp_tun_neigh_v4 - neighbour/route entry on the NFP for IPv4
+ * @dst_ipv4: Destination IPv4 address
+ * @src_ipv4: Source IPv4 address
+ * @common: Neighbour/route common info
+ * @ext: Neighbour/route extended info
+ */
+struct nfp_tun_neigh_v4 {
+ __be32 dst_ipv4;
+ __be32 src_ipv4;
+ struct nfp_tun_neigh common;
+ struct nfp_tun_neigh_ext ext;
+};
+
+/**
+ * struct nfp_tun_neigh_v6 - neighbour/route entry on the NFP for IPv6
* @dst_ipv6: Destination IPv6 address
* @src_ipv6: Source IPv6 address
- * @dst_addr: Destination MAC address
- * @src_addr: Source MAC address
- * @port_id: NFP port to output packet on - associated with source IPv6
- * @vlan_tpid: VLAN_TPID match field
- * @vlan_tci: VLAN_TCI match field
- * @host_ctx: Host context ID to be saved here
+ * @common: Neighbour/route common info
+ * @ext: Neighbour/route extended info
*/
struct nfp_tun_neigh_v6 {
struct in6_addr dst_ipv6;
struct in6_addr src_ipv6;
- u8 dst_addr[ETH_ALEN];
- u8 src_addr[ETH_ALEN];
- __be32 port_id;
- __be16 vlan_tpid;
- __be16 vlan_tci;
- __be32 host_ctx;
+ struct nfp_tun_neigh common;
+ struct nfp_tun_neigh_ext ext;
};
/**