summaryrefslogtreecommitdiff
path: root/sock.h
blob: 007bf2aefd9a35b1e1af0ab026e57ef677b3519e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef SOCK_H
#define SOCK_H

extern int af_socket(int af);
extern int pf_socket(void);
extern void set_nonblocking(int fd);
extern int set_nonblocking_sloppy(int fd);
extern int set_reuseaddr(int fd);
extern void set_sock_prio(int fd, int prio);
extern void set_tcp_nodelay(int fd);
extern void set_socket_keepalive(int fd);
extern int set_ipv6_only(int fd);
extern void set_mtu_disc_dont(int fd);
extern void set_system_socket_memory(int *vals, size_t len);
extern void reset_system_socket_memory(int *vals, size_t len);

#endif /* SOCK_H */
='/cgit.cgi/linux/net-next.git/patch/?id=5d4ca23e58f2db7c14b76070f31295244b6edb7b'>patch) tree346c7ca212d6e1bab6b67e7bb68d2d60e2419091 parentc17ef430b9fd5f58074f5cdc0128d06a5ae92304 (diff)
i40e: Clean up handling of msglevel flags and debug parameter
So the i40e driver had a really convoluted configuration for how to handle the debug flags contained in msg_level. Part of the issue is that the driver has its own 32 bit mask that it was using to track a separate set of debug features. From what I can tell it was trying to use the upper 4 bits to determine if the value was meant to represent a bit-mask or the numeric value provided by debug level. What this patch does is clean this up by compressing those 4 bits into bit 31, as a result we just have to perform a check against the value being negative to determine if we are looking at a debug level (positive), or a debug mask (negative). The debug level will populate the msg_level, and the debug mask will populate the debug_mask in the hardware struct. I added similar logic for ethtool. If the value being provided has bit 31 set we assume the value being provided is a debug mask, otherwise we assume it is a msg_enable mask. For displaying we only provide the msg_enable, and if debug_mask is in use we will print it to the dmesg log. Lastly I removed the debugfs interface. It is redundant with what we already have in ethtool and really doesn't belong anyway. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat