mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-03-07 05:27:43 +07:00
Merge branch 'be2net-small-structures-clean-up'
Ivan Vecera says: ==================== be2net: small structures clean-up The series: - removes unused / unneccessary fields in several be2net structures - re-order fields in some structures to eliminate holes, cache-lines crosses - as result reduces size of main struct be_adapter by 4kB ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
f1fbeada1b
@ -185,34 +185,13 @@ static inline void queue_tail_inc(struct be_queue_info *q)
|
||||
|
||||
struct be_eq_obj {
|
||||
struct be_queue_info q;
|
||||
char desc[32];
|
||||
|
||||
/* Adaptive interrupt coalescing (AIC) info */
|
||||
bool enable_aic;
|
||||
u32 min_eqd; /* in usecs */
|
||||
u32 max_eqd; /* in usecs */
|
||||
u32 eqd; /* configured val when aic is off */
|
||||
u32 cur_eqd; /* in usecs */
|
||||
|
||||
struct be_adapter *adapter;
|
||||
struct napi_struct napi;
|
||||
u8 idx; /* array index */
|
||||
u8 msix_idx;
|
||||
u16 spurious_intr;
|
||||
struct napi_struct napi;
|
||||
struct be_adapter *adapter;
|
||||
cpumask_var_t affinity_mask;
|
||||
|
||||
#ifdef CONFIG_NET_RX_BUSY_POLL
|
||||
#define BE_EQ_IDLE 0
|
||||
#define BE_EQ_NAPI 1 /* napi owns this EQ */
|
||||
#define BE_EQ_POLL 2 /* poll owns this EQ */
|
||||
#define BE_EQ_LOCKED (BE_EQ_NAPI | BE_EQ_POLL)
|
||||
#define BE_EQ_NAPI_YIELD 4 /* napi yielded this EQ */
|
||||
#define BE_EQ_POLL_YIELD 8 /* poll yielded this EQ */
|
||||
#define BE_EQ_YIELD (BE_EQ_NAPI_YIELD | BE_EQ_POLL_YIELD)
|
||||
#define BE_EQ_USER_PEND (BE_EQ_POLL | BE_EQ_POLL_YIELD)
|
||||
unsigned int state;
|
||||
spinlock_t lock; /* lock to serialize napi and busy-poll */
|
||||
#endif /* CONFIG_NET_RX_BUSY_POLL */
|
||||
} ____cacheline_aligned_in_smp;
|
||||
|
||||
struct be_aic_obj { /* Adaptive interrupt coalescing (AIC) info */
|
||||
@ -238,7 +217,6 @@ struct be_tx_stats {
|
||||
u64 tx_vxlan_offload_pkts;
|
||||
u64 tx_reqs;
|
||||
u64 tx_compl;
|
||||
ulong tx_jiffies;
|
||||
u32 tx_stops;
|
||||
u32 tx_drv_drops; /* pkts dropped by driver */
|
||||
/* the error counters are described in be_ethtool.c */
|
||||
@ -261,9 +239,9 @@ struct be_tx_compl_info {
|
||||
|
||||
struct be_tx_obj {
|
||||
u32 db_offset;
|
||||
struct be_tx_compl_info txcp;
|
||||
struct be_queue_info q;
|
||||
struct be_queue_info cq;
|
||||
struct be_tx_compl_info txcp;
|
||||
/* Remember the skbs that were transmitted */
|
||||
struct sk_buff *sent_skb_list[TX_Q_LEN];
|
||||
struct be_tx_stats stats;
|
||||
@ -458,10 +436,10 @@ struct be_port_resources {
|
||||
#define be_is_os2bmc_enabled(adapter) (adapter->flags & BE_FLAGS_OS2BMC)
|
||||
|
||||
struct rss_info {
|
||||
u64 rss_flags;
|
||||
u8 rsstable[RSS_INDIR_TABLE_LEN];
|
||||
u8 rss_queue[RSS_INDIR_TABLE_LEN];
|
||||
u8 rss_hkey[RSS_HASH_KEY_LEN];
|
||||
u64 rss_flags;
|
||||
};
|
||||
|
||||
#define BE_INVALID_DIE_TEMP 0xFF
|
||||
@ -544,11 +522,13 @@ enum {
|
||||
};
|
||||
|
||||
struct be_error_recovery {
|
||||
/* Lancer error recovery variables */
|
||||
u8 recovery_retries;
|
||||
union {
|
||||
u8 recovery_retries; /* used for Lancer */
|
||||
u8 recovery_state; /* used for BEx and Skyhawk */
|
||||
};
|
||||
|
||||
/* BEx/Skyhawk error recovery variables */
|
||||
u8 recovery_state;
|
||||
bool recovery_supported;
|
||||
u16 ue_to_reset_time; /* Time after UE, to soft reset
|
||||
* the chip - PF0 only
|
||||
*/
|
||||
@ -556,7 +536,6 @@ struct be_error_recovery {
|
||||
* of SLIPORT_SEMAPHORE reg
|
||||
*/
|
||||
u16 last_err_code;
|
||||
bool recovery_supported;
|
||||
unsigned long probe_time;
|
||||
unsigned long last_recovery_time;
|
||||
|
||||
|
@ -3403,9 +3403,11 @@ static int be_msix_register(struct be_adapter *adapter)
|
||||
int status, i, vec;
|
||||
|
||||
for_all_evt_queues(adapter, eqo, i) {
|
||||
sprintf(eqo->desc, "%s-q%d", netdev->name, i);
|
||||
char irq_name[IFNAMSIZ+4];
|
||||
|
||||
snprintf(irq_name, sizeof(irq_name), "%s-q%d", netdev->name, i);
|
||||
vec = be_msix_vec_get(adapter, eqo);
|
||||
status = request_irq(vec, be_msix, 0, eqo->desc, eqo);
|
||||
status = request_irq(vec, be_msix, 0, irq_name, eqo);
|
||||
if (status)
|
||||
goto err_msix;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user