Skip to content

Commit

Permalink
Merge branch 'onload-8.1' into onload-9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ligallag-amd committed Dec 6, 2024
2 parents fce6871 + add0d33 commit d3e9921
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
4 changes: 2 additions & 2 deletions src/include/ci/efhw/debug_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
#define EFHW_ASSERT(cond) BUG_ON((cond) == 0)
#define EFHW_DO_DEBUG(expr) expr
#else
#define EFHW_ASSERT(cond)
#define EFHW_DO_DEBUG(expr)
#define EFHW_ASSERT(cond) do {} while(0)
#define EFHW_DO_DEBUG(expr) do {} while(0)
#endif

#define EFHW_TEST(expr) \
Expand Down
6 changes: 3 additions & 3 deletions src/include/ci/efrm/debug_linux.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
#if !defined(NDEBUG)
#define EFRM_TRACE(fmt, ...) EFRM_PRINTK(KERN_DEBUG, fmt, __VA_ARGS__)
#else
#define EFRM_TRACE(fmt, ...)
#define EFRM_TRACE(fmt, ...) do {} while(0)
#endif

#define EFRM_WARN_ONCE(fmt, ...) do { \
Expand Down Expand Up @@ -107,8 +107,8 @@
#define EFRM_DO_DEBUG(expr) expr
#define EFRM_VERIFY_EQ(expr, val) EFRM_ASSERT((expr) == (val))
#else
#define EFRM_ASSERT(cond)
#define EFRM_DO_DEBUG(expr)
#define EFRM_ASSERT(cond) do {} while(0)
#define EFRM_DO_DEBUG(expr) do {} while(0)
#define EFRM_VERIFY_EQ(expr, val) expr
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/include/onload/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ extern int oo_debug_bits;
do{ if( oo_debug_bits & (bits) ) { foo; } }while(0)

#ifdef NDEBUG
# define OO_DYNAMIC_DEBUG(bits, foo)
# define OO_DYNAMIC_DEBUG(bits, foo) do {} while(0)
#else
# define OO_DYNAMIC_DEBUG(bits, foo) OO_DYNAMIC_LOG((bits), foo)
#endif
Expand Down
4 changes: 2 additions & 2 deletions src/lib/efrm/bt_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ efrm_bt_manager_realloc(struct efhw_nic *nic,
else
EFRM_ASSERT(a->bta_first_entry_offset + a->bta_size
<= EFHW_BUFFER_TABLE_BLOCK_SIZE);
)
);

spin_lock_bh(&manager->btm_lock);
if (manager->btm_block != NULL)
Expand Down Expand Up @@ -317,7 +317,7 @@ efrm_bt_nic_set(struct efhw_nic *nic, struct efrm_buffer_table_allocation *a,
else
EFRM_ASSERT(a->bta_first_entry_offset + a->bta_size
<= EFHW_BUFFER_TABLE_BLOCK_SIZE);
)
);

do {
rc = efhw_nic_buffer_table_set(nic, block,
Expand Down
5 changes: 2 additions & 3 deletions src/lib/efrm/efrm_efct_rxq.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,7 @@ int efrm_rxq_refresh(struct efrm_efct_rxq *rxq, unsigned long superbufs,
n_hugepages * CI_EFCT_SUPERBUFS_PER_PAGE);
}

pages = kmalloc_array(sizeof(pages[0]), CI_EFCT_MAX_HUGEPAGES,
GFP_KERNEL);
pages = kmalloc_array(CI_EFCT_MAX_HUGEPAGES, sizeof(pages[0]), GFP_KERNEL);
if (!pages)
return -ENOMEM;

Expand Down Expand Up @@ -427,7 +426,7 @@ int efrm_rxq_refresh_kernel(struct efhw_nic *nic, int hwqid,
size_t i;
int rc = 0;

pages = kmalloc_array(sizeof(pages[0]), CI_EFCT_MAX_HUGEPAGES, GFP_KERNEL);
pages = kmalloc_array(CI_EFCT_MAX_HUGEPAGES, sizeof(pages[0]), GFP_KERNEL);
if (!pages)
return -ENOMEM;

Expand Down
4 changes: 2 additions & 2 deletions src/lib/transport/unix/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,8 @@ extern citp_fdinfo_p citp_fdtable_busy_wait(unsigned fd, int fdt_locked) CI_HF;
#define CITP_FDTABLE_UNLOCK() __CITP_UNLOCK(&citp_ul_lock)
#define CITP_FDTABLE_UNLOCK_RD() __CITP_UNLOCK_RD(&citp_ul_lock)

#define CITP_FDTABLE_ASSERT_LOCKED(fdt_locked)
#define CITP_FDTABLE_ASSERT_LOCKED_RD
#define CITP_FDTABLE_ASSERT_LOCKED(fdt_locked) do {} while(0)
#define CITP_FDTABLE_ASSERT_LOCKED_RD do {} while(0)

#else

Expand Down

0 comments on commit d3e9921

Please sign in to comment.