blob: f62f7ca17b3d1d48a3b890f149f77ed062b46ac2 [file] [log] [blame]
Stephane Barbarie35595062018-02-08 08:34:39 -05001package common
2
3import (
4 "github.com/opencord/voltha/protos/go/openflow_13"
5)
6
7type SortByPriority []*openflow_13.OfpFlowStats
8
9func (s SortByPriority) Len() int {
10 return len(s)
11}
12func (s SortByPriority) Swap(i, j int) {
13 s[i], s[j] = s[j], s[i]
14}
15func (s SortByPriority) Less(i, j int) bool {
16 return s[i].Priority < s[j].Priority
17}