#ifndef _SCSI_SCSI_DBG_H #define _SCSI_SCSI_DBG_H struct scsi_cmnd; struct scsi_device; struct scsi_sense_hdr; #define SCSI_LOG_BUFSIZE 128 extern void scsi_print_command(struct scsi_cmnd *); extern size_t __scsi_format_command(char *, size_t, const unsigned char *, size_t); extern void scsi_show_extd_sense(const struct scsi_device *, const char *, unsigned char, unsigned char); extern void scsi_print_sense_hdr(const struct scsi_device *, const char *, const struct scsi_sense_hdr *); extern void scsi_print_sense(const struct scsi_cmnd *); extern void __scsi_print_sense(const struct scsi_device *, const char *name, const unsigned char *sense_buffer, int sense_len); extern void scsi_print_result(const struct scsi_cmnd *, const char *, int); #ifdef CONFIG_SCSI_CONSTANTS extern bool scsi_opcode_sa_name(int, int, const char **, const char **); extern const char *scsi_sense_key_string(unsigned char); extern const char *scsi_extd_sense_format(unsigned char, unsigned char, const char **); extern const char *scsi_mlreturn_string(int); extern const char *scsi_hostbyte_string(int); extern const char *scsi_driverbyte_string(int); #else static inline bool scsi_opcode_sa_name(int cmd, int sa, const char **cdb_name, const char **sa_name) { *cdb_name = NULL; switch (cmd) { case VARIABLE_LENGTH_CMD: case MAINTENANCE_IN: case MAINTENANCE_OUT: case PERSISTENT_RESERVE_IN: case PERSISTENT_RESERVE_OUT: case SERVICE_ACTION_IN_12: case SERVICE_ACTION_OUT_12: case SERVICE_ACTION_BIDIRECTIONAL: case SERVICE_ACTION_IN_16: case SERVICE_ACTION_OUT_16: case EXTENDED_COPY: case RECEIVE_COPY_RESULTS: *sa_name = NULL; return true; default: return false; } } static inline const char * scsi_sense_key_string(unsigned char key) { return NULL; } static inline const char * scsi_extd_sense_format(unsigned char asc, unsigned char ascq, const char **fmt) { *fmt = NULL; return NULL; } static inline const char * scsi_mlreturn_string(int result) { return NULL; } static inline const char * scsi_hostbyte_string(int result) { return NULL; } static inline const char * scsi_driverbyte_string(int result) { return NULL; } #endif #endif /* _SCSI_SCSI_DBG_H */ lue='grep'>log msg
diff options
context:
space:
mode:
authorDavid Ahern <dsa@cumulusnetworks.com>2017-02-02 12:37:10 -0800
committerDavid S. Miller <davem@davemloft.net>2017-02-04 19:58:14 -0500
commit3b1137fe74829e021f483756a648cbb87c8a1b4a (patch)
tree1ecd3c34b17fe500786be8bb88d6b632eb1050b9
parentbeb1afac518dec5a15dc92ba8f0ca016dcf457b4 (diff)
net: ipv6: Change notifications for multipath add to RTA_MULTIPATH
Change ip6_route_multipath_add to send one notifciation with the full route encoded with RTA_MULTIPATH instead of a series of individual routes. This is done by adding a skip_notify flag to the nl_info struct. The flag is used to skip sending of the notification in the fib code that actually inserts the route. Once the full route has been added, a notification is generated with all nexthops. ip6_route_multipath_add handles 3 use cases: new routes, route replace, and route append. The multipath notification generated needs to be consistent with the order of the nexthops and it should be consistent with the order in a FIB dump which means the route with the first nexthop needs to be used as the route reference. For the first 2 cases (new and replace), a reference to the route used to send the notification is obtained by saving the first route added. For the append case, the last route added is used to loop back to its first sibling route which is the first nexthop in the multipath route. Signed-off-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat
-rw-r--r--include/net/netlink.h1
-rw-r--r--net/ipv6/ip6_fib.c6
-rw-r--r--net/ipv6/route.c50
3 files changed, 54 insertions, 3 deletions
diff --git a/include/net/netlink.h b/include/net/netlink.h