summaryrefslogtreecommitdiffstats
path: root/0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch
diff options
context:
space:
mode:
authorAugusto Caringi <acaringi@redhat.com>2020-06-29 15:02:20 -0300
committerAugusto Caringi <acaringi@redhat.com>2020-06-29 15:02:20 -0300
commit9b53592daf7ec9906beefa9e36772dafcf446132 (patch)
treead225c0978d9a8ab32e649eb21b43492525b3c4e /0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch
parenta6d5bdfa755afd46b7cb294d2a32a4f53e79aef3 (diff)
downloadkernel-9b53592daf7ec9906beefa9e36772dafcf446132.tar.gz
kernel-9b53592daf7ec9906beefa9e36772dafcf446132.tar.xz
kernel-9b53592daf7ec9906beefa9e36772dafcf446132.zip
kernel-5.8.0-0.rc3.1
* Mon Jun 29 2020 Fedora Kernel Team <kernel-team@fedoraproject.org> [5.8.0-0.rc3.1] - v5.8-rc3 rebase - s390x-zfcpdump: Handle missing Module.symvers file (Don Zickus) - Updated changelog for the release based on 8be3a53e18e0 (Fedora Kernel Team) Resolves: rhbz# Signed-off-by: Augusto Caringi <acaringi@redhat.com>
Diffstat (limited to '0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch')
-rw-r--r--0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch12
1 files changed, 6 insertions, 6 deletions
diff --git a/0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch b/0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch
index 08af59a82..f235067fd 100644
--- a/0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch
+++ b/0001-rh_kabi-introduce-RH_KABI_EXCLUDE.patch
@@ -80,25 +80,25 @@ index e0d3353802bb..87f2bd530df7 100644
# define _RH_KABI_REPLACE(_orig, _new) _orig
# define _RH_KABI_REPLACE_UNSAFE(_orig, _new) _orig
+# define _RH_KABI_EXCLUDE(_elem)
-
+
#else
-
+
@@ -137,6 +150,8 @@
}
# define _RH_KABI_REPLACE_UNSAFE(_orig, _new) _new
-
+
+# define _RH_KABI_EXCLUDE(_elem) _elem
+
#endif /* __GENKSYMS__ */
-
+
/* semicolon added wrappers for the RH_KABI_REPLACE macros */
@@ -169,4 +184,6 @@
*/
# define _RH_KABI_RESERVE(n) unsigned long rh_reserved##n
-
+
+#define RH_KABI_EXCLUDE(_elem) _RH_KABI_EXCLUDE(_elem);
+
#endif /* _LINUX_RH_KABI_H */
--
-2.26.2
+2.25.4
span class="hl ppc">#include "interval.h" /* * A simple traffic shaper for * the output direction. */ #define SHAPER_MIN 100 /* bytes per second */ #define SHAPER_MAX 100000000 #define SHAPER_MAX_TIMEOUT 10 /* seconds */ #define SHAPER_USE_FP struct shaper { int bytes_per_second; struct timeval wakeup; #ifdef SHAPER_USE_FP double factor; #else int factor; #endif }; void shaper_msg (struct shaper *s); void shaper_reset_wakeup (struct shaper *s); /* * We want to wake up in delay microseconds. If timeval is larger * than delay, set timeval to delay. */ bool shaper_soonest_event (struct timeval *tv, int delay); /* * inline functions */ static inline void shaper_reset (struct shaper *s, int bytes_per_second) { s->bytes_per_second = bytes_per_second ? constrain_int (bytes_per_second, SHAPER_MIN, SHAPER_MAX) : 0; #ifdef SHAPER_USE_FP s->factor = 1000000.0 / (double)s->bytes_per_second; #else s->factor = 1000000 / s->bytes_per_second; #endif } static inline void shaper_init (struct shaper *s, int bytes_per_second) { shaper_reset (s, bytes_per_second); shaper_reset_wakeup (s); } static inline int shaper_current_bandwidth (struct shaper *s) { return s->bytes_per_second; } /* * Returns traffic shaping delay in microseconds relative to current * time, or 0 if no delay. */ static inline int shaper_delay (struct shaper* s) { struct timeval tv; int delay = 0; if (tv_defined (&s->wakeup)) { ASSERT (!openvpn_gettimeofday (&tv, NULL)); delay = tv_subtract (&s->wakeup, &tv, SHAPER_MAX_TIMEOUT); #ifdef SHAPER_DEBUG dmsg (D_SHAPER_DEBUG, "SHAPER shaper_delay delay=%d", delay); #endif } return delay > 0 ? delay : 0; } /* * We are about to send a datagram of nbytes bytes. * * Compute when we can send another datagram, * based on target throughput (s->bytes_per_second). */ static inline void shaper_wrote_bytes (struct shaper* s, int nbytes) { struct timeval tv; /* compute delay in microseconds */ tv.tv_sec = 0; #ifdef SHAPER_USE_FP tv.tv_usec = min_int ((int)((double)max_int (nbytes, 100) * s->factor), (SHAPER_MAX_TIMEOUT*1000000)); #else tv.tv_usec = s->bytes_per_second ? min_int (max_int (nbytes, 100) * s->factor, (SHAPER_MAX_TIMEOUT*1000000)) : 0; #endif if (tv.tv_usec) { ASSERT (!openvpn_gettimeofday (&s->wakeup, NULL)); tv_add (&s->wakeup, &tv); #ifdef SHAPER_DEBUG dmsg (D_SHAPER_DEBUG, "SHAPER shaper_wrote_bytes bytes=%d delay=%d sec=%d usec=%d", nbytes, (int)tv.tv_usec, (int)s->wakeup.tv_sec, (int)s->wakeup.tv_usec); #endif } } #if 0 /* * Increase/Decrease bandwidth by a percentage. * * Return true if bandwidth changed. */ static inline bool shaper_change_pct (struct shaper *s, int pct) { const int orig_bandwidth = s->bytes_per_second; const int new_bandwidth = orig_bandwidth + (orig_bandwidth * pct / 100); ASSERT (s->bytes_per_second); shaper_reset (s, new_bandwidth); return s->bytes_per_second != orig_bandwidth; } #endif #endif /* ENABLE_FEATURE_SHAPER */ #endif