Commit f1753f8b authored by WenChen's avatar WenChen Committed by JangShui Yang
Browse files

urma: upload kernel patch for 20240219_Spring

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I91DSN


CVE: NA

--------------------------------

Upload kernel patch for 20240103_Happy_New_Year,
detailed fixes are as follows:
1. Fix add sip netlink msg payload len problem
2. Replace client ctx and event handler lock with rwsem
3. Bug fix of use-after-free
4. Adjustment for kmod code check
5. Addition of debug info in data plane
6. Add ubcore device sysfs files
7. Fix dip table multi-thread problem

Fixes: 329bf7f3 ("ubcore: fix the bug of tp negotiation concurrency")
Signed-off-by: default avatarWenChen <chenwen54@huawei.com>
Signed-off-by: default avatarWeibo Zhao <zhaoweibo3@huawei.com>
parent 10cb4c23
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -20,6 +20,10 @@ ubcore-objs := ubcore_main.o \
			ubcore_utp.o \
			ubcore_uvs_cmd.o \
			ubcore_vtp.o \
			ubcore_cgroup.o

			ubcore_cgroup.o \
			ubcore_cdev_file.o \
			ubcore_genl_admin.o \
			ubcore_genl.o \
			ubcore_log.o \
			ubcore_workqueue.o
obj-$(CONFIG_UB) += ubcore.o
+902 −0

File added.

Preview size limit exceeded, changes collapsed.

+56 −0
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms and conditions of the GNU General Public License,
 * version 2, as published by the Free Software Foundation.
 *
 * This program is distributed in the hope it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
 * for more details.
 *
 * Description: ubcore device file ops file
 * Author: Qian Guoxin
 * Create: 2024-02-05
 * Note:
 * History: 2024-02-05: Create file
 */

#ifndef UBCORE_CDEV_FILE_H
#define UBCORE_CDEV_FILE_H

#include "urma/ubcore_types.h"

struct ubcore_port_attribute {
	struct attribute attr;
	ssize_t (*show)(struct ubcore_port_kobj *p, struct ubcore_port_attribute *attr, char *buf);
	ssize_t (*store)(struct ubcore_port_kobj *p, struct ubcore_port_attribute *attr,
		const char *buf, size_t count);
};

#define PORT_ATTR(_name, _mode, _show, _store)	\
	struct ubcore_port_attribute port_attr_##_name = __ATTR(_name, _mode, _show, _store)

#define PORT_ATTR_RO(_name) struct ubcore_port_attribute port_attr_##_name = __ATTR_RO(_name)

struct ubcore_eid_attribute {
	struct attribute attr;
	ssize_t (*show)(struct ubcore_eid_kobj *eid, struct ubcore_eid_attribute *attr, char *buf);
	ssize_t (*store)(struct ubcore_eid_kobj *eid, struct ubcore_eid_attribute *attr,
		const char *buf, size_t count);
};

#define EID_ATTR(_name, _mode, _show, _store) \
struct ubcore_eid_attribute eid_attr_##_name = __ATTR(_name, _mode, _show, _store)

#define EID_ATTR_RO(_name) \
struct ubcore_eid_attribute eid_attr_##_name = __ATTR_RO(_name)

int ubcore_fill_logic_device_attr(struct ubcore_logic_device *ldev,
	struct ubcore_device *dev);
void ubcore_unfill_logic_device_attr(struct ubcore_logic_device *ldev,
	struct ubcore_device *dev);

#endif /* UBCORE_CDEV_FILE_H */
+6 −0
Original line number Diff line number Diff line
@@ -68,6 +68,9 @@ int ubcore_cgroup_try_charge(struct ubcore_cg_object *cg_obj, struct ubcore_devi
{
	enum rdmacg_resource_type rdma_cg_type;

	if (cg_obj == NULL || cg_obj->cg == NULL)
		return 0;

	if (!ubcore_is_use_cg(dev))
		return 0;

@@ -84,6 +87,9 @@ void ubcore_cgroup_uncharge(struct ubcore_cg_object *cg_obj, struct ubcore_devic
{
	enum rdmacg_resource_type rdma_cg_type;

	if (cg_obj == NULL || cg_obj->cg == NULL)
		return;

	if (!ubcore_is_use_cg(dev))
		return;

+4 −1
Original line number Diff line number Diff line
@@ -45,7 +45,10 @@ enum ubcore_cmd {
	UBCORE_CMD_QUERY_RES,
	UBCORE_CMD_ADD_EID,
	UBCORE_CMD_DEL_EID,
	UBCORE_CMD_SET_EID_MODE
	UBCORE_CMD_SET_EID_MODE,
	UBCORE_CMD_SET_NS_MODE,
	UBCORE_CMD_SET_DEV_NS,
	UBCORE_CMD_MAX
};

struct ubcore_cmd_query_stats {
Loading