Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unify using ETHERNET_LL_SIZE #1447

Merged
merged 3 commits into from
Apr 7, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions libibverbs/verbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include <errno.h>
#include <string.h>
#include <linux/types.h>
#include <linux/if_ether.h>
#include <sys/types.h>
#include <infiniband/verbs_api.h>

Expand Down Expand Up @@ -1736,9 +1737,10 @@ enum ibv_flow_spec_type {
IBV_FLOW_SPEC_ACTION_COUNT = 0x1003,
};

#define ETHERNET_LL_SIZE ETH_ALEN
changchengx marked this conversation as resolved.
Show resolved Hide resolved
struct ibv_flow_eth_filter {
uint8_t dst_mac[6];
uint8_t src_mac[6];
uint8_t dst_mac[ETHERNET_LL_SIZE];
uint8_t src_mac[ETHERNET_LL_SIZE];
uint16_t ether_type;
/*
* same layout as 802.1q: prio 3, cfi 1, vlan id 12
Expand Down Expand Up @@ -3482,7 +3484,6 @@ const char *ibv_port_state_str(enum ibv_port_state port_state);
*/
const char *ibv_event_type_str(enum ibv_event_type event);

#define ETHERNET_LL_SIZE 6
int ibv_resolve_eth_l2_from_gid(struct ibv_context *context,
struct ibv_ah_attr *attr,
uint8_t eth_mac[ETHERNET_LL_SIZE],
Expand Down