#include <string.h>
#include <stdbool.h>
#include <netinet/in.h>
+#include <pthread.h>
+
+#include <rte_common.h>
typedef uint8_t u8;
typedef int8_t s8;
u8 indirection_table[HW_ATL_B0_RSS_REDIRECTION_MAX];
};
+/* Macsec stuff */
+struct aq_macsec_config {
+ struct {
+ u32 macsec_enabled;
+ u32 encryption_enabled;
+ u32 replay_protection_enabled;
+ } common;
+
+ struct {
+ u32 idx;
+ u32 mac[2]; /* 6 bytes */
+ } txsc;
+
+ struct {
+ u32 idx;
+ u32 an; /* association number on the local side */
+ u32 pn; /* packet number on the local side */
+ u32 key[4]; /* 128 bit key */
+ } txsa;
+
+ struct {
+ u32 mac[2]; /* 6 bytes */
+ u32 pi;
+ } rxsc;
+
+ struct {
+ u32 idx;
+ u32 an; /* association number on the remote side */
+ u32 pn; /* packet number on the remote side */
+ u32 key[4]; /* 128 bit key */
+ } rxsa;
+};
+
struct aq_hw_cfg_s {
bool is_lro;
bool is_rss;
uint32_t flow_control;
struct aq_rss_parameters aq_rss;
+ struct aq_macsec_config aq_macsec;
};
struct aq_hw_s {
struct hw_atl_stats_s last_stats;
struct aq_stats_s curr_stats;
+ u32 caps_lo;
+
u64 speed;
unsigned int chip_features;
u32 fw_ver_actual;
u32 rpc_addr;
u32 rpc_tid;
struct hw_aq_atl_utils_fw_rpc rpc;
+
+ pthread_mutex_t mbox_mutex;
};
struct aq_fw_ops {
int (*get_eee_rate)(struct aq_hw_s *self, u32 *rate,
u32 *supported_rates);
+ int (*get_flow_control)(struct aq_hw_s *self, u32 *fc);
int (*set_flow_control)(struct aq_hw_s *self);
int (*led_control)(struct aq_hw_s *self, u32 mode);
u32 *data, u32 len, u32 offset);
int (*set_eeprom)(struct aq_hw_s *self, int dev_addr,
- u32 *data, u32 len);
+ u32 *data, u32 len, u32 offset);
+ int (*send_macsec_req)(struct aq_hw_s *self,
+ struct macsec_msg_fw_request *req,
+ struct macsec_msg_fw_response *response);
};
struct atl_sw_stats {