drivers/net/ethernet/mellanox/mlx5/core/steering/hws/internal.h
Source file repositories/reference/linux-study-clean/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/internal.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/net/ethernet/mellanox/mlx5/core/steering/hws/internal.h- Extension
.h- Size
- 1414 bytes
- Lines
- 60
- Domain
- Driver Families
- Bucket
- drivers/net
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
Dependency Surface
linux/mlx5/transobj.hlinux/mlx5/vport.hfs_core.hwq.hlib/mlx5.hprm.hmlx5hws.hpool.hvport.hcontext.htable.hsend.haction_ste_pool.hrule.hcmd.haction.hdefiner.hmatcher.hdebug.hpat_arg.hbwc.hbwc_complex.h
Detected Declarations
function is_mem_zerofunction align
Annotated Snippet
#ifndef HWS_INTERNAL_H_
#define HWS_INTERNAL_H_
#include <linux/mlx5/transobj.h>
#include <linux/mlx5/vport.h>
#include "fs_core.h"
#include "wq.h"
#include "lib/mlx5.h"
#include "prm.h"
#include "mlx5hws.h"
#include "pool.h"
#include "vport.h"
#include "context.h"
#include "table.h"
#include "send.h"
#include "action_ste_pool.h"
#include "rule.h"
#include "cmd.h"
#include "action.h"
#include "definer.h"
#include "matcher.h"
#include "debug.h"
#include "pat_arg.h"
#include "bwc.h"
#include "bwc_complex.h"
#define W_SIZE 2
#define DW_SIZE 4
#define BITS_IN_BYTE 8
#define BITS_IN_DW (BITS_IN_BYTE * DW_SIZE)
#define IS_BIT_SET(_value, _bit) ((_value) & (1ULL << (_bit)))
#define mlx5hws_err(ctx, arg...) mlx5_core_err((ctx)->mdev, ##arg)
#define mlx5hws_info(ctx, arg...) mlx5_core_info((ctx)->mdev, ##arg)
#define mlx5hws_dbg(ctx, arg...) mlx5_core_dbg((ctx)->mdev, ##arg)
#define MLX5HWS_TABLE_TYPE_BASE 2
static inline bool is_mem_zero(const u8 *mem, size_t size)
{
if (unlikely(!size)) {
pr_warn("HWS: invalid buffer of size 0 in %s\n", __func__);
return true;
}
return (*mem == 0) && memcmp(mem, mem + 1, size - 1) == 0;
}
static inline unsigned long align(unsigned long val, unsigned long align)
{
return (val + align - 1) & ~(align - 1);
}
#endif /* HWS_INTERNAL_H_ */
Annotation
- Immediate include surface: `linux/mlx5/transobj.h`, `linux/mlx5/vport.h`, `fs_core.h`, `wq.h`, `lib/mlx5.h`, `prm.h`, `mlx5hws.h`, `pool.h`.
- Detected declarations: `function is_mem_zero`, `function align`.
- Atlas domain: Driver Families / drivers/net.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.