mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 06:26:45 +07:00
9771b8ccdf
The new command (NCSI_CMD_SEND_CMD) is added to allow user space application to send NC-SI command to the network card. Also, add a new attribute (NCSI_ATTR_DATA) for transferring request and response. The work flow is as below. Request: User space application -> Netlink interface (msg) -> new Netlink handler - ncsi_send_cmd_nl() -> ncsi_xmit_cmd() Response: Response received - ncsi_rcv_rsp() -> internal response handler - ncsi_rsp_handler_xxx() -> ncsi_rsp_handler_netlink() -> ncsi_send_netlink_rsp () -> Netlink interface (msg) -> user space application Command timeout - ncsi_request_timeout() -> ncsi_send_netlink_timeout () -> Netlink interface (msg with zero data length) -> user space application Error: Error detected -> ncsi_send_netlink_err () -> Netlink interface (err msg) -> user space application Signed-off-by: Justin Lee <justin.lee1@dell.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
33 lines
931 B
C
33 lines
931 B
C
/*
|
|
* Copyright Samuel Mendoza-Jonas, IBM Corporation 2018.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
#ifndef __NCSI_NETLINK_H__
|
|
#define __NCSI_NETLINK_H__
|
|
|
|
#include <linux/netdevice.h>
|
|
|
|
#include "internal.h"
|
|
|
|
int ncsi_send_netlink_rsp(struct ncsi_request *nr,
|
|
struct ncsi_package *np,
|
|
struct ncsi_channel *nc);
|
|
int ncsi_send_netlink_timeout(struct ncsi_request *nr,
|
|
struct ncsi_package *np,
|
|
struct ncsi_channel *nc);
|
|
int ncsi_send_netlink_err(struct net_device *dev,
|
|
u32 snd_seq,
|
|
u32 snd_portid,
|
|
struct nlmsghdr *nlhdr,
|
|
int err);
|
|
|
|
int ncsi_init_netlink(struct net_device *dev);
|
|
int ncsi_unregister_netlink(struct net_device *dev);
|
|
|
|
#endif /* __NCSI_NETLINK_H__ */
|