summaryrefslogtreecommitdiffstats
path: root/src/vnet/mfib
AgeCommit message (Expand)AuthorFilesLines
2017-08-08L2 over MPLSNeale Ranns3-16/+14
2017-06-06Rework vxlan-gpe to support FIB 2.0 and bypass modeHongjun Ni1-0/+2
2017-06-01IP Mcast - recalculate on interface up/dowmNeale Ranns2-56/+87
2017-05-23ARP/ND entries for the same address on different interfaces (VPP-848)Neale Ranns1-4/+4
2017-05-19mfib CLI bugs (VPP-852)Neale Ranns2-8/+14
2017-05-15Add GTP-U plugin. VPP-694Hongjun Ni1-0/+2
2017-05-02Allow local/for-us replications for IP multicast routes on the CLINeale Ranns1-4/+2
2017-04-07MPLS McastNeale Ranns8-165/+417
2017-02-25MFIB: changes to improve route add/delete performanceNeale Ranns2-2/+9
2017-02-24MFIB memory leak. free the per-source interface hashNeale Ranns1-0/+2
2017-02-20Python test IP and MPLS objects conform to infra.Neale Ranns8-12/+129
2017-02-13Basic support for LISP-GPE encapsulated NSH packetsFlorin Coras1-0/+1
2017-02-09Improve MFIB doxygen helpNeale Ranns4-4/+12
2017-02-02Fix SR multicast post mfib commitNeale Ranns6-22/+210
2017-01-31MFIB Coverity warnings. The lock macro is functionally equivalent but more ex...Neale Ranns2-25/+40
2017-01-28sh not show in the mfib flags commandsNeale Ranns1-2/+2
2017-01-27IP Multicast FIB (mfib)Neale Ranns16-0/+5997
="nn">os import logging """ @var formatting delimiter consisting of '=' characters """ double_line_delim = '=' * 78 """ @var formatting delimiter consisting of '-' characters """ single_line_delim = '-' * 78 def colorize(msg, color): return color + msg + COLOR_RESET class ColorFormatter(logging.Formatter): def init(self, fmt=None, datefmt=None): super(ColorFormatter, self).__init__(fmt, datefmt) def format(self, record): message = super(ColorFormatter, self).format(record) if hasattr(record, 'color'): message = colorize(message, record.color) return message try: verbose = int(os.getenv("V", 0)) except: verbose = 0 # 40 = ERROR, 30 = WARNING, 20 = INFO, 10 = DEBUG, 0 = NOTSET (all messages) if verbose >= 2: log_level = 10 elif verbose == 1: log_level = 20 else: log_level = 40 handler = logging.StreamHandler(sys.stdout) color_formatter = ColorFormatter(fmt='%(asctime)s,%(msecs)03d %(message)s', datefmt="%H:%M:%S") handler.setFormatter(color_formatter) handler.setLevel(log_level) global_logger = logging.getLogger() global_logger.addHandler(handler) scapy_logger = logging.getLogger("scapy.runtime") scapy_logger.setLevel(logging.ERROR) def get_logger(name): logger = logging.getLogger(name) logger.setLevel(logging.DEBUG) return logger def get_parallel_logger(stream): logger = logging.getLogger('parallel_logger_{!s}'.format(stream)) logger.propagate = False logger.setLevel(logging.DEBUG) handler = logging.StreamHandler(stream) handler.setFormatter(color_formatter) handler.setLevel(log_level) logger.addHandler(handler) return logger # Static variables to store color formatting strings. # # These variables (RED, GREEN, YELLOW and LPURPLE) are used to configure # the color of the text to be printed in the terminal. Variable COLOR_RESET # is used to revert the text color to the default one. if hasattr(sys.stdout, 'isatty') and sys.stdout.isatty(): RED = '\033[91m' GREEN = '\033[92m' YELLOW = '\033[93m' LPURPLE = '\033[94m' COLOR_RESET = '\033[0m' else: RED = '' GREEN = '' YELLOW = '' LPURPLE = '' COLOR_RESET = ''