restore lost packages from 0.2.3 + fix overwritten 0.2.4 files
- Restore 29 recipe symlinks (libdrm, qtbase, dbus, sddm, pipewire, etc.) - Restore 33 patches (KDE, libdrm, mesa, pipewire, sddm, wireplumber) - Restore 20+ local/scripts (audit, lint, test, build helpers) - Restore src/cook/scheduler.rs, status.rs, gnu-config/ - Restore scripts/patch-inclusion-gate.sh, run_mini1.sh, validate-collision-log.sh - Recover TLC source from HEAD (was overwritten by 0.2.3 checkout) - Recover 11 local/docs plans from HEAD (were overwritten) - Recover qt6-wayland-smoke symlink from HEAD - Fix MOTD: remove garbled ASCII art, use clean text - Update version: 0.2.0 -> 0.2.4 in os-release, motd, config - Reduce filesystem_size: 1536 -> 512 MiB - Add ABSOLUTE RULE to AGENTS.md: never delete/ignore packages - Reduce pcid scheme log verbosity: info -> debug
This commit is contained in:
@@ -0,0 +1,191 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright(c) 2013 - 2018 Intel Corporation. */
|
||||
|
||||
#ifndef _I40E_CLIENT_H_
|
||||
#define _I40E_CLIENT_H_
|
||||
|
||||
#include <linux/auxiliary_bus.h>
|
||||
|
||||
#define I40E_CLIENT_STR_LENGTH 10
|
||||
|
||||
/* Client interface version should be updated anytime there is a change in the
|
||||
* existing APIs or data structures.
|
||||
*/
|
||||
#define I40E_CLIENT_VERSION_MAJOR 0
|
||||
#define I40E_CLIENT_VERSION_MINOR 01
|
||||
#define I40E_CLIENT_VERSION_BUILD 00
|
||||
#define I40E_CLIENT_VERSION_STR \
|
||||
__stringify(I40E_CLIENT_VERSION_MAJOR) "." \
|
||||
__stringify(I40E_CLIENT_VERSION_MINOR) "." \
|
||||
__stringify(I40E_CLIENT_VERSION_BUILD)
|
||||
|
||||
struct i40e_client_version {
|
||||
u8 major;
|
||||
u8 minor;
|
||||
u8 build;
|
||||
u8 rsvd;
|
||||
};
|
||||
|
||||
enum i40e_client_instance_state {
|
||||
__I40E_CLIENT_INSTANCE_NONE,
|
||||
__I40E_CLIENT_INSTANCE_OPENED,
|
||||
};
|
||||
|
||||
struct i40e_ops;
|
||||
struct i40e_client;
|
||||
|
||||
#define I40E_QUEUE_INVALID_IDX 0xFFFF
|
||||
|
||||
struct i40e_qv_info {
|
||||
u32 v_idx; /* msix_vector */
|
||||
u16 ceq_idx;
|
||||
u16 aeq_idx;
|
||||
u8 itr_idx;
|
||||
};
|
||||
|
||||
struct i40e_qvlist_info {
|
||||
u32 num_vectors;
|
||||
struct i40e_qv_info qv_info[] __counted_by(num_vectors);
|
||||
};
|
||||
|
||||
|
||||
/* set of LAN parameters useful for clients managed by LAN */
|
||||
|
||||
/* Struct to hold per priority info */
|
||||
struct i40e_prio_qos_params {
|
||||
u16 qs_handle; /* qs handle for prio */
|
||||
u8 tc; /* TC mapped to prio */
|
||||
u8 reserved;
|
||||
};
|
||||
|
||||
#define I40E_CLIENT_MAX_USER_PRIORITY 8
|
||||
/* Struct to hold Client QoS */
|
||||
struct i40e_qos_params {
|
||||
struct i40e_prio_qos_params prio_qos[I40E_CLIENT_MAX_USER_PRIORITY];
|
||||
};
|
||||
|
||||
struct i40e_params {
|
||||
struct i40e_qos_params qos;
|
||||
u16 mtu;
|
||||
};
|
||||
|
||||
/* Structure to hold Lan device info for a client device */
|
||||
struct i40e_info {
|
||||
struct i40e_client_version version;
|
||||
u8 lanmac[6];
|
||||
struct net_device *netdev;
|
||||
struct pci_dev *pcidev;
|
||||
struct auxiliary_device *aux_dev;
|
||||
u8 __iomem *hw_addr;
|
||||
u8 fid; /* function id, PF id or VF id */
|
||||
#define I40E_CLIENT_FTYPE_PF 0
|
||||
u8 ftype; /* function type, PF or VF */
|
||||
void *pf;
|
||||
|
||||
/* All L2 params that could change during the life span of the PF
|
||||
* and needs to be communicated to the client when they change
|
||||
*/
|
||||
struct i40e_qvlist_info *qvlist_info;
|
||||
struct i40e_params params;
|
||||
struct i40e_ops *ops;
|
||||
|
||||
u16 msix_count; /* number of msix vectors*/
|
||||
/* Array down below will be dynamically allocated based on msix_count */
|
||||
struct msix_entry *msix_entries;
|
||||
u16 itr_index; /* Which ITR index the PE driver is suppose to use */
|
||||
u16 fw_maj_ver; /* firmware major version */
|
||||
u16 fw_min_ver; /* firmware minor version */
|
||||
u32 fw_build; /* firmware build number */
|
||||
};
|
||||
|
||||
struct i40e_auxiliary_device {
|
||||
struct auxiliary_device aux_dev;
|
||||
struct i40e_info *ldev;
|
||||
};
|
||||
|
||||
#define I40E_CLIENT_RESET_LEVEL_PF 1
|
||||
#define I40E_CLIENT_RESET_LEVEL_CORE 2
|
||||
#define I40E_CLIENT_VSI_FLAG_TCP_ENABLE BIT(1)
|
||||
|
||||
struct i40e_ops {
|
||||
/* setup_q_vector_list enables queues with a particular vector */
|
||||
int (*setup_qvlist)(struct i40e_info *ldev, struct i40e_client *client,
|
||||
struct i40e_qvlist_info *qv_info);
|
||||
|
||||
int (*virtchnl_send)(struct i40e_info *ldev, struct i40e_client *client,
|
||||
u32 vf_id, u8 *msg, u16 len);
|
||||
|
||||
/* If the PE Engine is unresponsive, RDMA driver can request a reset.
|
||||
* The level helps determine the level of reset being requested.
|
||||
*/
|
||||
void (*request_reset)(struct i40e_info *ldev,
|
||||
struct i40e_client *client, u32 level);
|
||||
|
||||
/* API for the RDMA driver to set certain VSI flags that control
|
||||
* PE Engine.
|
||||
*/
|
||||
int (*update_vsi_ctxt)(struct i40e_info *ldev,
|
||||
struct i40e_client *client,
|
||||
bool is_vf, u32 vf_id,
|
||||
u32 flag, u32 valid_flag);
|
||||
};
|
||||
|
||||
struct i40e_client_ops {
|
||||
/* Should be called from register_client() or whenever PF is ready
|
||||
* to create a specific client instance.
|
||||
*/
|
||||
int (*open)(struct i40e_info *ldev, struct i40e_client *client);
|
||||
|
||||
/* Should be called when netdev is unavailable or when unregister
|
||||
* call comes in. If the close is happenening due to a reset being
|
||||
* triggered set the reset bit to true.
|
||||
*/
|
||||
void (*close)(struct i40e_info *ldev, struct i40e_client *client,
|
||||
bool reset);
|
||||
|
||||
/* called when some l2 managed parameters changes - mtu */
|
||||
void (*l2_param_change)(struct i40e_info *ldev,
|
||||
struct i40e_client *client,
|
||||
struct i40e_params *params);
|
||||
|
||||
int (*virtchnl_receive)(struct i40e_info *ldev,
|
||||
struct i40e_client *client, u32 vf_id,
|
||||
u8 *msg, u16 len);
|
||||
|
||||
/* called when a VF is reset by the PF */
|
||||
void (*vf_reset)(struct i40e_info *ldev,
|
||||
struct i40e_client *client, u32 vf_id);
|
||||
|
||||
/* called when the number of VFs changes */
|
||||
void (*vf_enable)(struct i40e_info *ldev,
|
||||
struct i40e_client *client, u32 num_vfs);
|
||||
|
||||
/* returns true if VF is capable of specified offload */
|
||||
int (*vf_capable)(struct i40e_info *ldev,
|
||||
struct i40e_client *client, u32 vf_id);
|
||||
};
|
||||
|
||||
/* Client device */
|
||||
struct i40e_client_instance {
|
||||
struct list_head list;
|
||||
struct i40e_info lan_info;
|
||||
struct i40e_client *client;
|
||||
unsigned long state;
|
||||
};
|
||||
|
||||
struct i40e_client {
|
||||
struct list_head list; /* list of registered clients */
|
||||
char name[I40E_CLIENT_STR_LENGTH];
|
||||
struct i40e_client_version version;
|
||||
unsigned long state; /* client state */
|
||||
atomic_t ref_cnt; /* Count of all the client devices of this kind */
|
||||
u32 flags;
|
||||
u8 type;
|
||||
#define I40E_CLIENT_IWARP 0
|
||||
const struct i40e_client_ops *ops; /* client ops provided by the client */
|
||||
};
|
||||
|
||||
void i40e_client_device_register(struct i40e_info *ldev, struct i40e_client *client);
|
||||
void i40e_client_device_unregister(struct i40e_info *ldev);
|
||||
|
||||
#endif /* _I40E_CLIENT_H_ */
|
||||
@@ -0,0 +1,68 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (C) 2021-2025, Intel Corporation. */
|
||||
|
||||
#ifndef _IIDC_RDMA_H_
|
||||
#define _IIDC_RDMA_H_
|
||||
|
||||
#include <linux/auxiliary_bus.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/if_ether.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <net/dscp.h>
|
||||
|
||||
enum iidc_rdma_event_type {
|
||||
IIDC_RDMA_EVENT_BEFORE_MTU_CHANGE,
|
||||
IIDC_RDMA_EVENT_AFTER_MTU_CHANGE,
|
||||
IIDC_RDMA_EVENT_BEFORE_TC_CHANGE,
|
||||
IIDC_RDMA_EVENT_AFTER_TC_CHANGE,
|
||||
IIDC_RDMA_EVENT_WARN_RESET,
|
||||
IIDC_RDMA_EVENT_CRIT_ERR,
|
||||
IIDC_RDMA_EVENT_NBITS /* must be last */
|
||||
};
|
||||
|
||||
struct iidc_rdma_event {
|
||||
DECLARE_BITMAP(type, IIDC_RDMA_EVENT_NBITS);
|
||||
u32 reg;
|
||||
};
|
||||
|
||||
enum iidc_rdma_reset_type {
|
||||
IIDC_FUNC_RESET,
|
||||
IIDC_DEV_RESET,
|
||||
};
|
||||
|
||||
enum iidc_rdma_protocol {
|
||||
IIDC_RDMA_PROTOCOL_IWARP = BIT(0),
|
||||
IIDC_RDMA_PROTOCOL_ROCEV2 = BIT(1),
|
||||
};
|
||||
|
||||
/* Structure to be populated by core LAN PCI driver */
|
||||
struct iidc_rdma_core_dev_info {
|
||||
struct pci_dev *pdev; /* PCI device of corresponding to main function */
|
||||
struct auxiliary_device *adev;
|
||||
/* Current active RDMA protocol */
|
||||
enum iidc_rdma_protocol rdma_protocol;
|
||||
void *iidc_priv; /* elements unique to each driver */
|
||||
};
|
||||
|
||||
/* Structure representing auxiliary driver tailored information about the core
|
||||
* PCI dev, each auxiliary driver using the IIDC interface will have an
|
||||
* instance of this struct dedicated to it.
|
||||
*/
|
||||
struct iidc_rdma_core_auxiliary_dev {
|
||||
struct auxiliary_device adev;
|
||||
struct iidc_rdma_core_dev_info *cdev_info;
|
||||
};
|
||||
|
||||
/* structure representing the auxiliary driver. This struct is to be
|
||||
* allocated and populated by the auxiliary driver's owner. The core PCI
|
||||
* driver will access these ops by performing a container_of on the
|
||||
* auxiliary_device->dev.driver.
|
||||
*/
|
||||
struct iidc_rdma_core_auxiliary_drv {
|
||||
struct auxiliary_driver adrv;
|
||||
void (*event_handler)(struct iidc_rdma_core_dev_info *cdev,
|
||||
struct iidc_rdma_event *event);
|
||||
};
|
||||
|
||||
#endif /* _IIDC_RDMA_H_*/
|
||||
@@ -0,0 +1,70 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (C) 2021-2025, Intel Corporation. */
|
||||
|
||||
#ifndef _IIDC_RDMA_ICE_H_
|
||||
#define _IIDC_RDMA_ICE_H_
|
||||
|
||||
#include <linux/dcbnl.h>
|
||||
|
||||
#define IIDC_MAX_USER_PRIORITY 8
|
||||
#define IIDC_DSCP_PFC_MODE 0x1
|
||||
|
||||
/**
|
||||
* struct iidc_rdma_qset_params - Struct to hold per RDMA Qset info
|
||||
* @teid: TEID of the Qset node
|
||||
* @qs_handle: SW index of the Qset, RDMA provides this
|
||||
* @vport_id: VSI index
|
||||
* @tc: Traffic Class branch the QSet should belong to
|
||||
*/
|
||||
struct iidc_rdma_qset_params {
|
||||
/* Qset TEID returned to the RDMA driver in
|
||||
* ice_add_rdma_qset and used by RDMA driver
|
||||
* for calls to ice_del_rdma_qset
|
||||
*/
|
||||
u32 teid;
|
||||
u16 qs_handle;
|
||||
u16 vport_id;
|
||||
u8 tc;
|
||||
};
|
||||
|
||||
struct iidc_rdma_qos_info {
|
||||
u64 tc_ctx;
|
||||
u8 rel_bw;
|
||||
u8 prio_type;
|
||||
u8 egress_virt_up;
|
||||
u8 ingress_virt_up;
|
||||
};
|
||||
|
||||
/* Struct to pass QoS info */
|
||||
struct iidc_rdma_qos_params {
|
||||
struct iidc_rdma_qos_info tc_info[IEEE_8021QAZ_MAX_TCS];
|
||||
u8 up2tc[IIDC_MAX_USER_PRIORITY];
|
||||
u8 vport_relative_bw;
|
||||
u8 vport_priority_type;
|
||||
u8 num_tc;
|
||||
u8 pfc_mode;
|
||||
u8 dscp_map[DSCP_MAX];
|
||||
};
|
||||
|
||||
struct iidc_rdma_priv_dev_info {
|
||||
u8 pf_id;
|
||||
u16 vport_id;
|
||||
struct net_device *netdev;
|
||||
struct iidc_rdma_qos_params qos_info;
|
||||
u8 __iomem *hw_addr;
|
||||
};
|
||||
|
||||
int ice_add_rdma_qset(struct iidc_rdma_core_dev_info *cdev,
|
||||
struct iidc_rdma_qset_params *qset);
|
||||
int ice_del_rdma_qset(struct iidc_rdma_core_dev_info *cdev,
|
||||
struct iidc_rdma_qset_params *qset);
|
||||
int ice_rdma_request_reset(struct iidc_rdma_core_dev_info *cdev,
|
||||
enum iidc_rdma_reset_type reset_type);
|
||||
int ice_rdma_update_vsi_filter(struct iidc_rdma_core_dev_info *cdev, u16 vsi_id,
|
||||
bool enable);
|
||||
int ice_alloc_rdma_qvector(struct iidc_rdma_core_dev_info *cdev,
|
||||
struct msix_entry *entry);
|
||||
void ice_free_rdma_qvector(struct iidc_rdma_core_dev_info *cdev,
|
||||
struct msix_entry *entry);
|
||||
|
||||
#endif /* _IIDC_RDMA_ICE_H_*/
|
||||
@@ -0,0 +1,55 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (C) 2025 Intel Corporation. */
|
||||
|
||||
#ifndef _IIDC_RDMA_IDPF_H_
|
||||
#define _IIDC_RDMA_IDPF_H_
|
||||
|
||||
#include <linux/auxiliary_bus.h>
|
||||
|
||||
/* struct to be populated by core LAN PCI driver */
|
||||
struct iidc_rdma_vport_dev_info {
|
||||
struct auxiliary_device *adev;
|
||||
struct auxiliary_device *core_adev;
|
||||
struct net_device *netdev;
|
||||
u16 vport_id;
|
||||
};
|
||||
|
||||
struct iidc_rdma_vport_auxiliary_dev {
|
||||
struct auxiliary_device adev;
|
||||
struct iidc_rdma_vport_dev_info *vdev_info;
|
||||
};
|
||||
|
||||
struct iidc_rdma_vport_auxiliary_drv {
|
||||
struct auxiliary_driver adrv;
|
||||
void (*event_handler)(struct iidc_rdma_vport_dev_info *vdev,
|
||||
struct iidc_rdma_event *event);
|
||||
};
|
||||
|
||||
/* struct to be populated by core LAN PCI driver */
|
||||
enum iidc_function_type {
|
||||
IIDC_FUNCTION_TYPE_PF,
|
||||
IIDC_FUNCTION_TYPE_VF,
|
||||
};
|
||||
|
||||
struct iidc_rdma_lan_mapped_mem_region {
|
||||
u8 __iomem *region_addr;
|
||||
__le64 size;
|
||||
__le64 start_offset;
|
||||
};
|
||||
|
||||
struct iidc_rdma_priv_dev_info {
|
||||
struct msix_entry *msix_entries;
|
||||
u16 msix_count; /* How many vectors are reserved for this device */
|
||||
enum iidc_function_type ftype;
|
||||
__le16 num_memory_regions;
|
||||
struct iidc_rdma_lan_mapped_mem_region *mapped_mem_regions;
|
||||
};
|
||||
|
||||
int idpf_idc_vport_dev_ctrl(struct iidc_rdma_core_dev_info *cdev_info, bool up);
|
||||
int idpf_idc_request_reset(struct iidc_rdma_core_dev_info *cdev_info,
|
||||
enum iidc_rdma_reset_type __always_unused reset_type);
|
||||
int idpf_idc_rdma_vc_send_sync(struct iidc_rdma_core_dev_info *cdev_info,
|
||||
u8 *send_msg, u16 msg_size,
|
||||
u8 *recv_msg, u16 *recv_len);
|
||||
|
||||
#endif /* _IIDC_RDMA_IDPF_H_ */
|
||||
@@ -0,0 +1,399 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (C) 2025 Intel Corporation */
|
||||
|
||||
#ifndef __LIBIE_ADMINQ_H
|
||||
#define __LIBIE_ADMINQ_H
|
||||
|
||||
#include <linux/build_bug.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
#define LIBIE_CHECK_STRUCT_LEN(n, X) \
|
||||
static_assert((n) == sizeof(struct X))
|
||||
#define LIBIE_AQ_MAX_BUF_LEN 4096
|
||||
|
||||
/**
|
||||
* struct libie_aqc_generic - Generic structure used in adminq communication
|
||||
* @param0: generic parameter high 32bit
|
||||
* @param1: generic parameter lower 32bit
|
||||
* @addr_high: generic address high 32bit
|
||||
* @addr_low: generic address lower 32bit
|
||||
*/
|
||||
struct libie_aqc_generic {
|
||||
__le32 param0;
|
||||
__le32 param1;
|
||||
__le32 addr_high;
|
||||
__le32 addr_low;
|
||||
};
|
||||
LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_generic);
|
||||
|
||||
/**
|
||||
* struct libie_aqc_get_ver - Used in command get version (direct 0x0001)
|
||||
* @rom_ver: rom version
|
||||
* @fw_build: number coressponding to firmware build
|
||||
* @fw_branch: branch identifier of firmware version
|
||||
* @fw_major: major number of firmware version
|
||||
* @fw_minor: minor number of firmware version
|
||||
* @fw_patch: patch of firmware version
|
||||
* @api_branch: brancch identifier of API version
|
||||
* @api_major: major number of API version
|
||||
* @api_minor: minor number of API version
|
||||
* @api_patch: patch of API version
|
||||
*/
|
||||
struct libie_aqc_get_ver {
|
||||
__le32 rom_ver;
|
||||
__le32 fw_build;
|
||||
u8 fw_branch;
|
||||
u8 fw_major;
|
||||
u8 fw_minor;
|
||||
u8 fw_patch;
|
||||
u8 api_branch;
|
||||
u8 api_major;
|
||||
u8 api_minor;
|
||||
u8 api_patch;
|
||||
};
|
||||
LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_get_ver);
|
||||
|
||||
/**
|
||||
* struct libie_aqc_driver_ver - Used in command send driver version
|
||||
* (indirect 0x0002)
|
||||
* @major_ver: driver major version
|
||||
* @minor_ver: driver minor version
|
||||
* @build_ver: driver build version
|
||||
* @subbuild_ver: driver subbuild version
|
||||
* @reserved: for feature use
|
||||
* @addr_high: high part of response address buff
|
||||
* @addr_low: low part of response address buff
|
||||
*/
|
||||
struct libie_aqc_driver_ver {
|
||||
u8 major_ver;
|
||||
u8 minor_ver;
|
||||
u8 build_ver;
|
||||
u8 subbuild_ver;
|
||||
u8 reserved[4];
|
||||
__le32 addr_high;
|
||||
__le32 addr_low;
|
||||
};
|
||||
LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_driver_ver);
|
||||
|
||||
enum libie_aq_res_id {
|
||||
LIBIE_AQC_RES_ID_NVM = 1,
|
||||
LIBIE_AQC_RES_ID_SDP = 2,
|
||||
LIBIE_AQC_RES_ID_CHNG_LOCK = 3,
|
||||
LIBIE_AQC_RES_ID_GLBL_LOCK = 4,
|
||||
};
|
||||
|
||||
enum libie_aq_res_access_type {
|
||||
LIBIE_AQC_RES_ACCESS_READ = 1,
|
||||
LIBIE_AQC_RES_ACCESS_WRITE = 2,
|
||||
};
|
||||
|
||||
#define LIBIE_AQ_RES_NVM_READ_DFLT_TIMEOUT_MS 3000
|
||||
#define LIBIE_AQ_RES_NVM_WRITE_DFLT_TIMEOUT_MS 180000
|
||||
#define LIBIE_AQ_RES_CHNG_LOCK_DFLT_TIMEOUT_MS 1000
|
||||
#define LIBIE_AQ_RES_GLBL_LOCK_DFLT_TIMEOUT_MS 3000
|
||||
|
||||
#define LIBIE_AQ_RES_GLBL_SUCCESS 0
|
||||
#define LIBIE_AQ_RES_GLBL_IN_PROG 1
|
||||
#define LIBIE_AQ_RES_GLBL_DONE 2
|
||||
|
||||
/**
|
||||
* struct libie_aqc_req_res - Request resource ownership
|
||||
* @res_id: resource ID (look at enum definition above)
|
||||
* @access_type: read or write (enum definition above)
|
||||
* @timeout: Upon successful completion, FW writes this value and driver is
|
||||
* expected to release resource before timeout. This value is provided in
|
||||
* milliseconds.
|
||||
* @res_number: for SDP, this is the pin ID of the SDP
|
||||
* @status: status only used for LIBIE_AQC_RES_ID_GLBL_LOCK, for others reserved
|
||||
* @reserved: reserved for future use
|
||||
*
|
||||
* Used in commands:
|
||||
* request resource ownership (direct 0x0008)
|
||||
* request resource ownership (direct 0x0009)
|
||||
*/
|
||||
struct libie_aqc_req_res {
|
||||
__le16 res_id;
|
||||
__le16 access_type;
|
||||
|
||||
__le32 timeout;
|
||||
__le32 res_number;
|
||||
__le16 status;
|
||||
u8 reserved[2];
|
||||
};
|
||||
LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_req_res);
|
||||
|
||||
/**
|
||||
* struct libie_aqc_list_caps - Getting capabilities
|
||||
* @cmd_flags: command flags
|
||||
* @pf_index: index of PF to get caps from
|
||||
* @reserved: reserved for future use
|
||||
* @count: number of capabilities records
|
||||
* @addr_high: high part of response address buff
|
||||
* @addr_low: low part of response address buff
|
||||
*
|
||||
* Used in commands:
|
||||
* get function capabilities (indirect 0x000A)
|
||||
* get device capabilities (indirect 0x000B)
|
||||
*/
|
||||
struct libie_aqc_list_caps {
|
||||
u8 cmd_flags;
|
||||
u8 pf_index;
|
||||
u8 reserved[2];
|
||||
__le32 count;
|
||||
__le32 addr_high;
|
||||
__le32 addr_low;
|
||||
};
|
||||
LIBIE_CHECK_STRUCT_LEN(16, libie_aqc_list_caps);
|
||||
|
||||
/* Device/Function buffer entry, repeated per reported capability */
|
||||
#define LIBIE_AQC_CAPS_SWITCH_MODE 0x0001
|
||||
#define LIBIE_AQC_CAPS_MNG_MODE 0x0002
|
||||
#define LIBIE_AQC_CAPS_NPAR_ACTIVE 0x0003
|
||||
#define LIBIE_AQC_CAPS_OS2BMC_CAP 0x0004
|
||||
#define LIBIE_AQC_CAPS_VALID_FUNCTIONS 0x0005
|
||||
#define LIBIE_AQC_MAX_VALID_FUNCTIONS 0x8
|
||||
#define LIBIE_AQC_CAPS_SRIOV 0x0012
|
||||
#define LIBIE_AQC_CAPS_VF 0x0013
|
||||
#define LIBIE_AQC_CAPS_VMDQ 0x0014
|
||||
#define LIBIE_AQC_CAPS_8021QBG 0x0015
|
||||
#define LIBIE_AQC_CAPS_8021QBR 0x0016
|
||||
#define LIBIE_AQC_CAPS_VSI 0x0017
|
||||
#define LIBIE_AQC_CAPS_DCB 0x0018
|
||||
#define LIBIE_AQC_CAPS_FCOE 0x0021
|
||||
#define LIBIE_AQC_CAPS_ISCSI 0x0022
|
||||
#define LIBIE_AQC_CAPS_RSS 0x0040
|
||||
#define LIBIE_AQC_CAPS_RXQS 0x0041
|
||||
#define LIBIE_AQC_CAPS_TXQS 0x0042
|
||||
#define LIBIE_AQC_CAPS_MSIX 0x0043
|
||||
#define LIBIE_AQC_CAPS_VF_MSIX 0x0044
|
||||
#define LIBIE_AQC_CAPS_FD 0x0045
|
||||
#define LIBIE_AQC_CAPS_1588 0x0046
|
||||
#define LIBIE_AQC_CAPS_MAX_MTU 0x0047
|
||||
#define LIBIE_AQC_CAPS_NVM_VER 0x0048
|
||||
#define LIBIE_AQC_CAPS_PENDING_NVM_VER 0x0049
|
||||
#define LIBIE_AQC_CAPS_OROM_VER 0x004A
|
||||
#define LIBIE_AQC_CAPS_PENDING_OROM_VER 0x004B
|
||||
#define LIBIE_AQC_CAPS_NET_VER 0x004C
|
||||
#define LIBIE_AQC_CAPS_PENDING_NET_VER 0x004D
|
||||
#define LIBIE_AQC_CAPS_RDMA 0x0051
|
||||
#define LIBIE_AQC_CAPS_LED 0x0061
|
||||
#define LIBIE_AQC_CAPS_SDP 0x0062
|
||||
#define LIBIE_AQC_CAPS_MDIO 0x0063
|
||||
#define LIBIE_AQC_CAPS_WSR_PROT 0x0064
|
||||
#define LIBIE_AQC_CAPS_SENSOR_READING 0x0067
|
||||
#define LIBIE_AQC_INLINE_IPSEC 0x0070
|
||||
#define LIBIE_AQC_CAPS_NUM_ENABLED_PORTS 0x0072
|
||||
#define LIBIE_AQC_CAPS_PCIE_RESET_AVOIDANCE 0x0076
|
||||
#define LIBIE_AQC_CAPS_POST_UPDATE_RESET_RESTRICT 0x0077
|
||||
#define LIBIE_AQC_CAPS_NVM_MGMT 0x0080
|
||||
#define LIBIE_AQC_CAPS_EXT_TOPO_DEV_IMG0 0x0081
|
||||
#define LIBIE_AQC_CAPS_EXT_TOPO_DEV_IMG1 0x0082
|
||||
#define LIBIE_AQC_CAPS_EXT_TOPO_DEV_IMG2 0x0083
|
||||
#define LIBIE_AQC_CAPS_EXT_TOPO_DEV_IMG3 0x0084
|
||||
#define LIBIE_AQC_CAPS_TX_SCHED_TOPO_COMP_MODE 0x0085
|
||||
#define LIBIE_AQC_CAPS_NAC_TOPOLOGY 0x0087
|
||||
#define LIBIE_AQC_CAPS_FW_LAG_SUPPORT 0x0092
|
||||
#define LIBIE_AQC_BIT_ROCEV2_LAG BIT(0)
|
||||
#define LIBIE_AQC_BIT_SRIOV_LAG BIT(1)
|
||||
#define LIBIE_AQC_BIT_SRIOV_AA_LAG BIT(2)
|
||||
#define LIBIE_AQC_CAPS_FLEX10 0x00F1
|
||||
#define LIBIE_AQC_CAPS_CEM 0x00F2
|
||||
|
||||
/**
|
||||
* struct libie_aqc_list_caps_elem - Getting list of caps elements
|
||||
* @cap: one from the defines list above
|
||||
* @major_ver: major version
|
||||
* @minor_ver: minor version
|
||||
* @number: number of resources described by this capability
|
||||
* @logical_id: logical ID, only meaningful for some types of resources
|
||||
* @phys_id: physical ID, only meaningful for some types of resources
|
||||
* @rsvd1: reserved for future use
|
||||
* @rsvd2: reserved for future use
|
||||
*/
|
||||
struct libie_aqc_list_caps_elem {
|
||||
__le16 cap;
|
||||
|
||||
u8 major_ver;
|
||||
u8 minor_ver;
|
||||
__le32 number;
|
||||
__le32 logical_id;
|
||||
__le32 phys_id;
|
||||
__le64 rsvd1;
|
||||
__le64 rsvd2;
|
||||
};
|
||||
LIBIE_CHECK_STRUCT_LEN(32, libie_aqc_list_caps_elem);
|
||||
|
||||
/* Admin Queue command opcodes */
|
||||
enum libie_adminq_opc {
|
||||
/* FW Logging Commands */
|
||||
libie_aqc_opc_fw_logs_config = 0xFF30,
|
||||
libie_aqc_opc_fw_logs_register = 0xFF31,
|
||||
libie_aqc_opc_fw_logs_query = 0xFF32,
|
||||
libie_aqc_opc_fw_logs_event = 0xFF33,
|
||||
};
|
||||
|
||||
enum libie_aqc_fw_logging_mod {
|
||||
LIBIE_AQC_FW_LOG_ID_GENERAL = 0,
|
||||
LIBIE_AQC_FW_LOG_ID_CTRL,
|
||||
LIBIE_AQC_FW_LOG_ID_LINK,
|
||||
LIBIE_AQC_FW_LOG_ID_LINK_TOPO,
|
||||
LIBIE_AQC_FW_LOG_ID_DNL,
|
||||
LIBIE_AQC_FW_LOG_ID_I2C,
|
||||
LIBIE_AQC_FW_LOG_ID_SDP,
|
||||
LIBIE_AQC_FW_LOG_ID_MDIO,
|
||||
LIBIE_AQC_FW_LOG_ID_ADMINQ,
|
||||
LIBIE_AQC_FW_LOG_ID_HDMA,
|
||||
LIBIE_AQC_FW_LOG_ID_LLDP,
|
||||
LIBIE_AQC_FW_LOG_ID_DCBX,
|
||||
LIBIE_AQC_FW_LOG_ID_DCB,
|
||||
LIBIE_AQC_FW_LOG_ID_XLR,
|
||||
LIBIE_AQC_FW_LOG_ID_NVM,
|
||||
LIBIE_AQC_FW_LOG_ID_AUTH,
|
||||
LIBIE_AQC_FW_LOG_ID_VPD,
|
||||
LIBIE_AQC_FW_LOG_ID_IOSF,
|
||||
LIBIE_AQC_FW_LOG_ID_PARSER,
|
||||
LIBIE_AQC_FW_LOG_ID_SW,
|
||||
LIBIE_AQC_FW_LOG_ID_SCHEDULER,
|
||||
LIBIE_AQC_FW_LOG_ID_TXQ,
|
||||
LIBIE_AQC_FW_LOG_ID_RSVD,
|
||||
LIBIE_AQC_FW_LOG_ID_POST,
|
||||
LIBIE_AQC_FW_LOG_ID_WATCHDOG,
|
||||
LIBIE_AQC_FW_LOG_ID_TASK_DISPATCH,
|
||||
LIBIE_AQC_FW_LOG_ID_MNG,
|
||||
LIBIE_AQC_FW_LOG_ID_SYNCE,
|
||||
LIBIE_AQC_FW_LOG_ID_HEALTH,
|
||||
LIBIE_AQC_FW_LOG_ID_TSDRV,
|
||||
LIBIE_AQC_FW_LOG_ID_PFREG,
|
||||
LIBIE_AQC_FW_LOG_ID_MDLVER,
|
||||
LIBIE_AQC_FW_LOG_ID_MAX
|
||||
};
|
||||
|
||||
/* Set FW Logging configuration (indirect 0xFF30)
|
||||
* Register for FW Logging (indirect 0xFF31)
|
||||
* Query FW Logging (indirect 0xFF32)
|
||||
* FW Log Event (indirect 0xFF33)
|
||||
*/
|
||||
#define LIBIE_AQC_FW_LOG_CONF_UART_EN BIT(0)
|
||||
#define LIBIE_AQC_FW_LOG_CONF_AQ_EN BIT(1)
|
||||
#define LIBIE_AQC_FW_LOG_QUERY_REGISTERED BIT(2)
|
||||
#define LIBIE_AQC_FW_LOG_CONF_SET_VALID BIT(3)
|
||||
#define LIBIE_AQC_FW_LOG_AQ_REGISTER BIT(0)
|
||||
#define LIBIE_AQC_FW_LOG_AQ_QUERY BIT(2)
|
||||
|
||||
#define LIBIE_AQC_FW_LOG_MIN_RESOLUTION 1
|
||||
#define LIBIE_AQC_FW_LOG_MAX_RESOLUTION 128
|
||||
|
||||
struct libie_aqc_fw_log {
|
||||
u8 cmd_flags;
|
||||
|
||||
u8 rsp_flag;
|
||||
__le16 fw_rt_msb;
|
||||
union {
|
||||
struct {
|
||||
__le32 fw_rt_lsb;
|
||||
} sync;
|
||||
struct {
|
||||
__le16 log_resolution;
|
||||
__le16 mdl_cnt;
|
||||
} cfg;
|
||||
} ops;
|
||||
__le32 addr_high;
|
||||
__le32 addr_low;
|
||||
};
|
||||
|
||||
/* Response Buffer for:
|
||||
* Set Firmware Logging Configuration (0xFF30)
|
||||
* Query FW Logging (0xFF32)
|
||||
*/
|
||||
struct libie_aqc_fw_log_cfg_resp {
|
||||
__le16 module_identifier;
|
||||
u8 log_level;
|
||||
u8 rsvd0;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct libie_aq_desc - Admin Queue (AQ) descriptor
|
||||
* @flags: LIBIE_AQ_FLAG_* flags
|
||||
* @opcode: AQ command opcode
|
||||
* @datalen: length in bytes of indirect/external data buffer
|
||||
* @retval: return value from firmware
|
||||
* @cookie_high: opaque data high-half
|
||||
* @cookie_low: opaque data low-half
|
||||
* @params: command-specific parameters
|
||||
*
|
||||
* Descriptor format for commands the driver posts on the Admin Transmit Queue
|
||||
* (ATQ). The firmware writes back onto the command descriptor and returns
|
||||
* the result of the command. Asynchronous events that are not an immediate
|
||||
* result of the command are written to the Admin Receive Queue (ARQ) using
|
||||
* the same descriptor format. Descriptors are in little-endian notation with
|
||||
* 32-bit words.
|
||||
*/
|
||||
struct libie_aq_desc {
|
||||
__le16 flags;
|
||||
__le16 opcode;
|
||||
__le16 datalen;
|
||||
__le16 retval;
|
||||
__le32 cookie_high;
|
||||
__le32 cookie_low;
|
||||
union {
|
||||
u8 raw[16];
|
||||
struct libie_aqc_generic generic;
|
||||
struct libie_aqc_get_ver get_ver;
|
||||
struct libie_aqc_driver_ver driver_ver;
|
||||
struct libie_aqc_req_res res_owner;
|
||||
struct libie_aqc_list_caps get_cap;
|
||||
struct libie_aqc_fw_log fw_log;
|
||||
} params;
|
||||
};
|
||||
LIBIE_CHECK_STRUCT_LEN(32, libie_aq_desc);
|
||||
|
||||
/* FW defined boundary for a large buffer, 4k >= Large buffer > 512 bytes */
|
||||
#define LIBIE_AQ_LG_BUF 512
|
||||
|
||||
/* Flags sub-structure
|
||||
* |0 |1 |2 |3 |4 |5 |6 |7 |8 |9 |10 |11 |12 |13 |14 |15 |
|
||||
* |DD |CMP|ERR|VFE| * * RESERVED * * |LB |RD |VFC|BUF|SI |EI |FE |
|
||||
*/
|
||||
#define LIBIE_AQ_FLAG_DD BIT(0) /* 0x1 */
|
||||
#define LIBIE_AQ_FLAG_CMP BIT(1) /* 0x2 */
|
||||
#define LIBIE_AQ_FLAG_ERR BIT(2) /* 0x4 */
|
||||
#define LIBIE_AQ_FLAG_VFE BIT(3) /* 0x8 */
|
||||
#define LIBIE_AQ_FLAG_LB BIT(9) /* 0x200 */
|
||||
#define LIBIE_AQ_FLAG_RD BIT(10) /* 0x400 */
|
||||
#define LIBIE_AQ_FLAG_VFC BIT(11) /* 0x800 */
|
||||
#define LIBIE_AQ_FLAG_BUF BIT(12) /* 0x1000 */
|
||||
#define LIBIE_AQ_FLAG_SI BIT(13) /* 0x2000 */
|
||||
#define LIBIE_AQ_FLAG_EI BIT(14) /* 0x4000 */
|
||||
#define LIBIE_AQ_FLAG_FE BIT(15) /* 0x8000 */
|
||||
|
||||
/* error codes */
|
||||
enum libie_aq_err {
|
||||
LIBIE_AQ_RC_OK = 0, /* Success */
|
||||
LIBIE_AQ_RC_EPERM = 1, /* Operation not permitted */
|
||||
LIBIE_AQ_RC_ENOENT = 2, /* No such element */
|
||||
LIBIE_AQ_RC_ESRCH = 3, /* Bad opcode */
|
||||
LIBIE_AQ_RC_EIO = 5, /* I/O error */
|
||||
LIBIE_AQ_RC_EAGAIN = 8, /* Try again */
|
||||
LIBIE_AQ_RC_ENOMEM = 9, /* Out of memory */
|
||||
LIBIE_AQ_RC_EACCES = 10, /* Permission denied */
|
||||
LIBIE_AQ_RC_EBUSY = 12, /* Device or resource busy */
|
||||
LIBIE_AQ_RC_EEXIST = 13, /* Object already exists */
|
||||
LIBIE_AQ_RC_EINVAL = 14, /* Invalid argument */
|
||||
LIBIE_AQ_RC_ENOSPC = 16, /* No space left or allocation failure */
|
||||
LIBIE_AQ_RC_ENOSYS = 17, /* Function not implemented */
|
||||
LIBIE_AQ_RC_EMODE = 21, /* Op not allowed in current dev mode */
|
||||
LIBIE_AQ_RC_ENOSEC = 24, /* Missing security manifest */
|
||||
LIBIE_AQ_RC_EBADSIG = 25, /* Bad RSA signature */
|
||||
LIBIE_AQ_RC_ESVN = 26, /* SVN number prohibits this package */
|
||||
LIBIE_AQ_RC_EBADMAN = 27, /* Manifest hash mismatch */
|
||||
LIBIE_AQ_RC_EBADBUF = 28, /* Buffer hash mismatches manifest */
|
||||
};
|
||||
|
||||
static inline void *libie_aq_raw(struct libie_aq_desc *desc)
|
||||
{
|
||||
return &desc->params.raw;
|
||||
}
|
||||
|
||||
const char *libie_aq_str(enum libie_aq_err err);
|
||||
|
||||
#endif /* __LIBIE_ADMINQ_H */
|
||||
@@ -0,0 +1,97 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/* Copyright (C) 2022, Intel Corporation. */
|
||||
|
||||
#ifndef _LIBIE_FWLOG_H_
|
||||
#define _LIBIE_FWLOG_H_
|
||||
|
||||
#include <linux/net/intel/libie/adminq.h>
|
||||
|
||||
/* Only a single log level should be set and all log levels under the set value
|
||||
* are enabled, e.g. if log level is set to LIBIE_FW_LOG_LEVEL_VERBOSE, then all
|
||||
* other log levels are included (except LIBIE_FW_LOG_LEVEL_NONE)
|
||||
*/
|
||||
enum libie_fwlog_level {
|
||||
LIBIE_FWLOG_LEVEL_NONE = 0,
|
||||
LIBIE_FWLOG_LEVEL_ERROR = 1,
|
||||
LIBIE_FWLOG_LEVEL_WARNING = 2,
|
||||
LIBIE_FWLOG_LEVEL_NORMAL = 3,
|
||||
LIBIE_FWLOG_LEVEL_VERBOSE = 4,
|
||||
LIBIE_FWLOG_LEVEL_INVALID, /* all values >= this entry are invalid */
|
||||
};
|
||||
|
||||
struct libie_fwlog_module_entry {
|
||||
/* module ID for the corresponding firmware logging event */
|
||||
u16 module_id;
|
||||
/* verbosity level for the module_id */
|
||||
u8 log_level;
|
||||
};
|
||||
|
||||
struct libie_fwlog_cfg {
|
||||
/* list of modules for configuring log level */
|
||||
struct libie_fwlog_module_entry module_entries[LIBIE_AQC_FW_LOG_ID_MAX];
|
||||
/* options used to configure firmware logging */
|
||||
u16 options;
|
||||
#define LIBIE_FWLOG_OPTION_ARQ_ENA BIT(0)
|
||||
#define LIBIE_FWLOG_OPTION_UART_ENA BIT(1)
|
||||
/* set before calling libie_fwlog_init() so the PF registers for
|
||||
* firmware logging on initialization
|
||||
*/
|
||||
#define LIBIE_FWLOG_OPTION_REGISTER_ON_INIT BIT(2)
|
||||
/* set in the libie_aq_fwlog_get() response if the PF is registered for
|
||||
* FW logging events over ARQ
|
||||
*/
|
||||
#define LIBIE_FWLOG_OPTION_IS_REGISTERED BIT(3)
|
||||
|
||||
/* minimum number of log events sent per Admin Receive Queue event */
|
||||
u16 log_resolution;
|
||||
};
|
||||
|
||||
struct libie_fwlog_data {
|
||||
u16 data_size;
|
||||
u8 *data;
|
||||
};
|
||||
|
||||
struct libie_fwlog_ring {
|
||||
struct libie_fwlog_data *rings;
|
||||
u16 index;
|
||||
u16 size;
|
||||
u16 head;
|
||||
u16 tail;
|
||||
};
|
||||
|
||||
#define LIBIE_FWLOG_RING_SIZE_INDEX_DFLT 3
|
||||
#define LIBIE_FWLOG_RING_SIZE_DFLT 256
|
||||
#define LIBIE_FWLOG_RING_SIZE_MAX 512
|
||||
|
||||
struct libie_fwlog {
|
||||
struct libie_fwlog_cfg cfg;
|
||||
bool supported; /* does hardware support FW logging? */
|
||||
struct libie_fwlog_ring ring;
|
||||
struct dentry *debugfs;
|
||||
/* keep track of all the dentrys for FW log modules */
|
||||
struct dentry **debugfs_modules;
|
||||
struct_group_tagged(libie_fwlog_api, api,
|
||||
struct pci_dev *pdev;
|
||||
int (*send_cmd)(void *, struct libie_aq_desc *, void *, u16);
|
||||
void *priv;
|
||||
struct dentry *debugfs_root;
|
||||
);
|
||||
};
|
||||
|
||||
#if IS_ENABLED(CONFIG_LIBIE_FWLOG)
|
||||
int libie_fwlog_init(struct libie_fwlog *fwlog, struct libie_fwlog_api *api);
|
||||
void libie_fwlog_deinit(struct libie_fwlog *fwlog);
|
||||
void libie_fwlog_reregister(struct libie_fwlog *fwlog);
|
||||
void libie_get_fwlog_data(struct libie_fwlog *fwlog, u8 *buf, u16 len);
|
||||
#else
|
||||
static inline int libie_fwlog_init(struct libie_fwlog *fwlog,
|
||||
struct libie_fwlog_api *api)
|
||||
{
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
static inline void libie_fwlog_deinit(struct libie_fwlog *fwlog) { }
|
||||
static inline void libie_fwlog_reregister(struct libie_fwlog *fwlog) { }
|
||||
static inline void libie_get_fwlog_data(struct libie_fwlog *fwlog, u8 *buf,
|
||||
u16 len) { }
|
||||
#endif /* CONFIG_LIBIE_FWLOG */
|
||||
#endif /* _LIBIE_FWLOG_H_ */
|
||||
@@ -0,0 +1,41 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (C) 2025 Intel Corporation */
|
||||
|
||||
#ifndef __LIBIE_PCTYPE_H
|
||||
#define __LIBIE_PCTYPE_H
|
||||
|
||||
/* Packet Classifier Type indexes, used to set the xxQF_HENA registers. Also
|
||||
* communicated over the virtchnl API as part of struct virtchnl_rss_hashena.
|
||||
*/
|
||||
enum libie_filter_pctype {
|
||||
/* Note: Values 0-28 are reserved for future use.
|
||||
* Value 29, 30, 32 are not supported on XL710 and X710.
|
||||
*/
|
||||
LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV4_UDP = 29,
|
||||
LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV4_UDP = 30,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_UDP = 31,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP_SYN_NO_ACK = 32,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_TCP = 33,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_SCTP = 34,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV4_OTHER = 35,
|
||||
LIBIE_FILTER_PCTYPE_FRAG_IPV4 = 36,
|
||||
/* Note: Values 37-38 are reserved for future use.
|
||||
* Value 39, 40, 42 are not supported on XL710 and X710.
|
||||
*/
|
||||
LIBIE_FILTER_PCTYPE_NONF_UNICAST_IPV6_UDP = 39,
|
||||
LIBIE_FILTER_PCTYPE_NONF_MULTICAST_IPV6_UDP = 40,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_UDP = 41,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP_SYN_NO_ACK = 42,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_TCP = 43,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_SCTP = 44,
|
||||
LIBIE_FILTER_PCTYPE_NONF_IPV6_OTHER = 45,
|
||||
LIBIE_FILTER_PCTYPE_FRAG_IPV6 = 46,
|
||||
/* Note: Value 47 is reserved for future use */
|
||||
LIBIE_FILTER_PCTYPE_FCOE_OX = 48,
|
||||
LIBIE_FILTER_PCTYPE_FCOE_RX = 49,
|
||||
LIBIE_FILTER_PCTYPE_FCOE_OTHER = 50,
|
||||
/* Note: Values 51-62 are reserved for future use */
|
||||
LIBIE_FILTER_PCTYPE_L2_PAYLOAD = 63
|
||||
};
|
||||
|
||||
#endif /* __LIBIE_PCTYPE_H */
|
||||
@@ -0,0 +1,50 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
/* Copyright (C) 2024 Intel Corporation */
|
||||
|
||||
#ifndef __LIBIE_RX_H
|
||||
#define __LIBIE_RX_H
|
||||
|
||||
#include <net/libeth/rx.h>
|
||||
|
||||
/* Rx buffer management */
|
||||
|
||||
/* The largest size for a single descriptor as per HW */
|
||||
#define LIBIE_MAX_RX_BUF_LEN 9728U
|
||||
/* "True" HW-writeable space: minimum from SW and HW values */
|
||||
#define LIBIE_RX_BUF_LEN(hr) min_t(u32, LIBETH_RX_PAGE_LEN(hr), \
|
||||
LIBIE_MAX_RX_BUF_LEN)
|
||||
|
||||
/* The maximum frame size as per HW (S/G) */
|
||||
#define __LIBIE_MAX_RX_FRM_LEN 16382U
|
||||
/* ATST, HW can chain up to 5 Rx descriptors */
|
||||
#define LIBIE_MAX_RX_FRM_LEN(hr) \
|
||||
min_t(u32, __LIBIE_MAX_RX_FRM_LEN, LIBIE_RX_BUF_LEN(hr) * 5)
|
||||
/* Maximum frame size minus LL overhead */
|
||||
#define LIBIE_MAX_MTU \
|
||||
(LIBIE_MAX_RX_FRM_LEN(LIBETH_MAX_HEADROOM) - LIBETH_RX_LL_LEN)
|
||||
|
||||
/* O(1) converting i40e/ice/iavf's 8/10-bit hardware packet type to a parsed
|
||||
* bitfield struct.
|
||||
*/
|
||||
|
||||
#define LIBIE_RX_PT_NUM 154
|
||||
|
||||
extern const struct libeth_rx_pt libie_rx_pt_lut[LIBIE_RX_PT_NUM];
|
||||
|
||||
/**
|
||||
* libie_rx_pt_parse - convert HW packet type to software bitfield structure
|
||||
* @pt: 10-bit hardware packet type value from the descriptor
|
||||
*
|
||||
* ```libie_rx_pt_lut``` must be accessed only using this wrapper.
|
||||
*
|
||||
* Return: parsed bitfield struct corresponding to the provided ptype.
|
||||
*/
|
||||
static inline struct libeth_rx_pt libie_rx_pt_parse(u32 pt)
|
||||
{
|
||||
if (unlikely(pt >= LIBIE_RX_PT_NUM))
|
||||
pt = 0;
|
||||
|
||||
return libie_rx_pt_lut[pt];
|
||||
}
|
||||
|
||||
#endif /* __LIBIE_RX_H */
|
||||
Reference in New Issue
Block a user