Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dcb: add DCBX mode to event notifier attributes

Add DCBX mode to event notifiers so listeners can learn
currently enabled mode.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

John Fastabend and committed by
David S. Miller
6bd0e1cb e290ed81

+7
+1
include/net/dcbnl.h
··· 26 26 int ifindex; 27 27 struct dcb_app app; 28 28 struct list_head list; 29 + u8 dcbx; 29 30 }; 30 31 31 32 int dcb_setapp(struct net_device *, struct dcb_app *);
+6
net/dcb/dcbnl.c
··· 2075 2075 2076 2076 event.ifindex = dev->ifindex; 2077 2077 memcpy(&event.app, new, sizeof(event.app)); 2078 + if (dev->dcbnl_ops->getdcbx) 2079 + event.dcbx = dev->dcbnl_ops->getdcbx(dev); 2078 2080 2079 2081 spin_lock(&dcb_lock); 2080 2082 /* Search for existing match and replace */ ··· 2154 2152 2155 2153 event.ifindex = dev->ifindex; 2156 2154 memcpy(&event.app, new, sizeof(event.app)); 2155 + if (dev->dcbnl_ops->getdcbx) 2156 + event.dcbx = dev->dcbnl_ops->getdcbx(dev); 2157 2157 2158 2158 spin_lock(&dcb_lock); 2159 2159 /* Search for existing match and abort if found */ ··· 2200 2196 2201 2197 event.ifindex = dev->ifindex; 2202 2198 memcpy(&event.app, del, sizeof(event.app)); 2199 + if (dev->dcbnl_ops->getdcbx) 2200 + event.dcbx = dev->dcbnl_ops->getdcbx(dev); 2203 2201 2204 2202 spin_lock(&dcb_lock); 2205 2203 /* Search for existing match and remove it. */