* [PATCH 1/8] [TFRC]: Whitespace cleanups
From: Gerrit Renker @ 2007-12-08 10:06 UTC (permalink / raw)
To: acme; +Cc: dccp, netdev, Gerrit Renker
In-Reply-To: <11971083882331-git-send-email-gerrit@erg.abdn.ac.uk>
Just some tidy-ups to keep git/quilt happy. Also moved up the
comment "Receiver routines" above the first occurrence of RX
history routines.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/ccid3.c | 16 ++++++++--------
net/dccp/ccids/lib/loss_interval.c | 2 +-
net/dccp/ccids/lib/packet_history.c | 12 ++++++------
3 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index faacffa..a5246f7 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -780,7 +780,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
*/
}
goto update_records;
- }
+ }
if (tfrc_rx_hist_duplicate(&hcrx->ccid3hcrx_hist, skb))
return; /* done receiving */
@@ -792,7 +792,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
*/
hcrx->ccid3hcrx_s = tfrc_ewma(hcrx->ccid3hcrx_s, payload, 9);
hcrx->ccid3hcrx_bytes_recv += payload;
- }
+ }
/*
* Handle pending losses and otherwise check for new loss
@@ -808,11 +808,11 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
if (list_empty(&hcrx->ccid3hcrx_li_hist)) { /* no loss so far: p = 0 */
const u32 sample = tfrc_rx_hist_sample_rtt(&hcrx->ccid3hcrx_hist, skb);
- /*
- * Empty loss history: no loss so far, hence p stays 0.
- * Sample RTT values, since an RTT estimate is required for the
- * computation of p when the first loss occurs; RFC 3448, 6.3.1.
- */
+ /*
+ * Empty loss history: no loss so far, hence p stays 0.
+ * Sample RTT values, since an RTT estimate is required for the
+ * computation of p when the first loss occurs; RFC 3448, 6.3.1.
+ */
if (sample != 0)
hcrx->ccid3hcrx_rtt = tfrc_ewma(hcrx->ccid3hcrx_rtt, sample, 9);
}
@@ -823,7 +823,7 @@ static void ccid3_hc_rx_packet_recv(struct sock *sk, struct sk_buff *skb)
if (SUB16(dccp_hdr(skb)->dccph_ccval, hcrx->ccid3hcrx_last_counter) > 3)
do_feedback = CCID3_FBACK_PERIODIC;
-update_records:
+update_records:
tfrc_rx_hist_add_packet(&hcrx->ccid3hcrx_hist, skb, ndp);
if (do_feedback)
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c
index 7e0714a..c0a933a 100644
--- a/net/dccp/ccids/lib/loss_interval.c
+++ b/net/dccp/ccids/lib/loss_interval.c
@@ -131,7 +131,7 @@ static u32 dccp_li_calc_first_li(struct sock *sk,
{
/*
* FIXME:
- * Will be rewritten in the upcoming new loss intervals code.
+ * Will be rewritten in the upcoming new loss intervals code.
* Has to be commented ou because it relies on the old rx history
* data structures
*/
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c
index e197389..54cd23e 100644
--- a/net/dccp/ccids/lib/packet_history.c
+++ b/net/dccp/ccids/lib/packet_history.c
@@ -114,6 +114,11 @@ u32 tfrc_tx_hist_rtt(struct tfrc_tx_hist_entry *head, const u64 seqno,
EXPORT_SYMBOL_GPL(tfrc_tx_hist_rtt);
+/*
+ * Receiver History Routines
+ */
+static struct kmem_cache *tfrc_rx_hist_slab;
+
/**
* tfrc_rx_hist_index - index to reach n-th entry after loss_start
*/
@@ -131,11 +136,6 @@ static inline struct tfrc_rx_hist_entry *
return h->ring[tfrc_rx_hist_index(h, h->loss_count)];
}
-/*
- * Receiver History Routines
- */
-static struct kmem_cache *tfrc_rx_hist_slab;
-
void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h,
const struct sk_buff *skb,
const u32 ndp)
@@ -278,7 +278,7 @@ u32 tfrc_rx_hist_sample_rtt(struct tfrc_rx_hist *h, const struct sk_buff *skb)
{
u32 sample = 0,
delta_v = SUB16(dccp_hdr(skb)->dccph_ccval,
- tfrc_rx_hist_rtt_last_s(h)->tfrchrx_ccval);
+ tfrc_rx_hist_rtt_last_s(h)->tfrchrx_ccval);
if (delta_v < 1 || delta_v > 4) { /* unsuitable CCVal delta */
if (h->rtt_sample_prev == 2) { /* previous candidate stored */
^ permalink raw reply related
* [PATCH 7/8] [TFRC]: CCID3 (and CCID4) needs to access these inlines
From: Gerrit Renker @ 2007-12-08 10:06 UTC (permalink / raw)
To: acme; +Cc: dccp, netdev, Gerrit Renker
In-Reply-To: <11971083882049-git-send-email-gerrit@erg.abdn.ac.uk>
This moves two inlines back to packet_history.h: these are not private
to packet_history.c, but are needed by CCID3/4 to detect whether a new
loss is indicated, or whether a loss is already pending.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/lib/packet_history.c | 26 --------------------------
net/dccp/ccids/lib/packet_history.h | 28 ++++++++++++++++++++++++++--
2 files changed, 26 insertions(+), 28 deletions(-)
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c
index a421032..760631e 100644
--- a/net/dccp/ccids/lib/packet_history.c
+++ b/net/dccp/ccids/lib/packet_history.c
@@ -188,32 +188,6 @@ void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h,
}
EXPORT_SYMBOL_GPL(tfrc_rx_hist_add_packet);
-/* initialise loss detection and disable RTT sampling */
-static inline void tfrc_rx_hist_loss_indicated(struct tfrc_rx_hist *h)
-{
- h->loss_count = 1;
-}
-
-/* indicate whether previously a packet was detected missing */
-static inline int tfrc_rx_hist_loss_pending(const struct tfrc_rx_hist *h)
-{
- return h->loss_count;
-}
-
-/* any data packets missing between last reception and skb ? */
-int tfrc_rx_hist_new_loss_indicated(struct tfrc_rx_hist *h,
- const struct sk_buff *skb, u32 ndp)
-{
- int delta = dccp_delta_seqno(tfrc_rx_hist_last_rcv(h)->tfrchrx_seqno,
- DCCP_SKB_CB(skb)->dccpd_seq);
-
- if (delta > 1 && ndp < delta)
- tfrc_rx_hist_loss_indicated(h);
-
- return tfrc_rx_hist_loss_pending(h);
-}
-EXPORT_SYMBOL_GPL(tfrc_rx_hist_new_loss_indicated);
-
static void tfrc_rx_hist_swap(struct tfrc_rx_hist_entry **a,
struct tfrc_rx_hist_entry **b)
{
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h
index 6df9582..cb3220f 100644
--- a/net/dccp/ccids/lib/packet_history.h
+++ b/net/dccp/ccids/lib/packet_history.h
@@ -115,12 +115,36 @@ static inline struct tfrc_rx_hist_entry *
return h->ring[h->loss_start];
}
+/* initialise loss detection and disable RTT sampling */
+static inline void tfrc_rx_hist_loss_indicated(struct tfrc_rx_hist *h)
+{
+ h->loss_count = 1;
+}
+
+/* indicate whether previously a packet was detected missing */
+static inline int tfrc_rx_hist_loss_pending(const struct tfrc_rx_hist *h)
+{
+ return h->loss_count;
+}
+
+/* any data packets missing between last reception and skb ? */
+static inline int tfrc_rx_hist_new_loss_indicated(struct tfrc_rx_hist *h,
+ const struct sk_buff *skb, u32 ndp)
+{
+ int delta = dccp_delta_seqno(tfrc_rx_hist_last_rcv(h)->tfrchrx_seqno,
+ DCCP_SKB_CB(skb)->dccpd_seq);
+
+ if (delta > 1 && ndp < delta)
+ tfrc_rx_hist_loss_indicated(h);
+
+ return tfrc_rx_hist_loss_pending(h);
+}
+
extern void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h,
const struct sk_buff *skb, const u32 ndp);
extern int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb);
-extern int tfrc_rx_hist_new_loss_indicated(struct tfrc_rx_hist *h,
- const struct sk_buff *skb, u32 ndp);
+
struct tfrc_loss_hist;
extern int tfrc_rx_handle_loss(struct tfrc_rx_hist *, struct tfrc_loss_hist *,
struct sk_buff *skb, u32 ndp,
^ permalink raw reply related
* [PATCH 4/8] [TFRC]: Need separate entry_from_skb routine
From: Gerrit Renker @ 2007-12-08 10:06 UTC (permalink / raw)
To: acme; +Cc: dccp, netdev, Gerrit Renker
In-Reply-To: <11971083883685-git-send-email-gerrit@erg.abdn.ac.uk>
This again separates tfrc_rx_hist_packet() from tfrc_rx_hist_entry_from_skb(), which
was the format used in the original patch submission. The reason for this is the
requirement -- used by the subsequent patches -- to be able to insert a newly arrived
skb in arbitrary places within the ringbuffer history.
The add_packet() function is only a special case of this usage: it inserts always
at the front, and thus updates the highest-received sequence number. That has been
the main reason why it was originally called tfrc_rx_hist_update() -- the old name
reflected better what the function did.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/lib/packet_history.c | 35 ++++++++++++++++++++---------------
1 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c
index 4d37396..6256bec 100644
--- a/net/dccp/ccids/lib/packet_history.c
+++ b/net/dccp/ccids/lib/packet_history.c
@@ -168,21 +168,6 @@ static inline struct tfrc_rx_hist_entry *
return h->ring[tfrc_rx_hist_index(h, h->loss_count)];
}
-void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h,
- const struct sk_buff *skb,
- const u32 ndp)
-{
- struct tfrc_rx_hist_entry *entry = tfrc_rx_hist_last_rcv(h);
- const struct dccp_hdr *dh = dccp_hdr(skb);
-
- entry->tfrchrx_seqno = DCCP_SKB_CB(skb)->dccpd_seq;
- entry->tfrchrx_ccval = dh->dccph_ccval;
- entry->tfrchrx_type = dh->dccph_type;
- entry->tfrchrx_ndp = ndp;
- entry->tfrchrx_tstamp = ktime_get_real();
-}
-EXPORT_SYMBOL_GPL(tfrc_rx_hist_add_packet);
-
/**
* tfrc_rx_hist_entry - return the n-th history entry after loss_start
*/
@@ -218,6 +203,26 @@ int tfrc_rx_hist_duplicate(struct tfrc_rx_hist *h, struct sk_buff *skb)
}
EXPORT_SYMBOL_GPL(tfrc_rx_hist_duplicate);
+static void tfrc_rx_hist_entry_from_skb(struct tfrc_rx_hist_entry *entry,
+ const struct sk_buff *skb, u32 ndp)
+{
+ const struct dccp_hdr *dh = dccp_hdr(skb);
+
+ entry->tfrchrx_seqno = DCCP_SKB_CB(skb)->dccpd_seq;
+ entry->tfrchrx_ccval = dh->dccph_ccval;
+ entry->tfrchrx_type = dh->dccph_type;
+ entry->tfrchrx_ndp = ndp;
+ entry->tfrchrx_tstamp = ktime_get_real();
+}
+
+/* commit packet details of skb to history (record highest received seqno) */
+void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h,
+ const struct sk_buff *skb, u32 ndp)
+{
+ tfrc_rx_hist_entry_from_skb(tfrc_rx_hist_last_rcv(h), skb, ndp);
+}
+EXPORT_SYMBOL_GPL(tfrc_rx_hist_add_packet);
+
/* initialise loss detection and disable RTT sampling */
static inline void tfrc_rx_hist_loss_indicated(struct tfrc_rx_hist *h)
{
^ permalink raw reply related
* [PATCH 3/8] [TFRC/CCID3]: Remove now unused functions / function calls
From: Gerrit Renker @ 2007-12-08 10:06 UTC (permalink / raw)
To: acme; +Cc: dccp, netdev, Gerrit Renker
In-Reply-To: <11971083881667-git-send-email-gerrit@erg.abdn.ac.uk>
This removes two things which now have become redundant:
1. The function tfrc_rx_hist_entry_delete() is no longer referenced anywhere.
2. The CCID3 HC-receiver still inserted timestamps, but received timestamps
are not parsed/referenced/used by the HC-sender, it serves no function.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
---
net/dccp/ccids/ccid3.c | 3 +--
net/dccp/ccids/lib/packet_history.c | 5 -----
2 files changed, 1 insertions(+), 7 deletions(-)
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index a5246f7..60fcb31 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -750,8 +750,7 @@ static int ccid3_hc_rx_insert_options(struct sock *sk, struct sk_buff *skb)
x_recv = htonl(hcrx->ccid3hcrx_x_recv);
pinv = htonl(hcrx->ccid3hcrx_pinv);
- if (dccp_insert_option_timestamp(sk, skb) ||
- dccp_insert_option(sk, skb, TFRC_OPT_LOSS_EVENT_RATE,
+ if (dccp_insert_option(sk, skb, TFRC_OPT_LOSS_EVENT_RATE,
&pinv, sizeof(pinv)) ||
dccp_insert_option(sk, skb, TFRC_OPT_RECEIVE_RATE,
&x_recv, sizeof(x_recv)))
diff --git a/net/dccp/ccids/lib/packet_history.c b/net/dccp/ccids/lib/packet_history.c
index af0db71..4d37396 100644
--- a/net/dccp/ccids/lib/packet_history.c
+++ b/net/dccp/ccids/lib/packet_history.c
@@ -183,11 +183,6 @@ void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h,
}
EXPORT_SYMBOL_GPL(tfrc_rx_hist_add_packet);
-static inline void tfrc_rx_hist_entry_delete(struct tfrc_rx_hist_entry *entry)
-{
- kmem_cache_free(tfrc_rx_hist_slab, entry);
-}
-
/**
* tfrc_rx_hist_entry - return the n-th history entry after loss_start
*/
^ permalink raw reply related
* [PATCH 0/8] [DCCP]: Updates and fixes to ensure code works with recent changes
From: Gerrit Renker @ 2007-12-08 10:06 UTC (permalink / raw)
To: acme; +Cc: dccp, netdev
Some of the recent changes in 2.6.25 cause problems with the existing implementation (i.e. break
the code). This patch set therefore provides fixes and resubmits one subsequent patch which
has not been considered so far, but which is part of the tfrc_lib package.
Patch #1: Performs whitespace cleanups.
Patch #2: Migrates all loss interval / packet history initialisation code into tfrc.c.
Patch #3: Removes two unused functions/function calls that have become obsolete now.
Patch #4: Splits rx_hist_add_packet() into its original constituents -- they are needed.
Patch #5: Restores the parts of the macro/inline conversion that broke the algorithm.
Patch #6: Is a v2 patch - the Loss Intervals code, now updated to work with the recent changes.
Patch #7: Reverts hiding inlines which are needed by the calling CCID module.
Patch #8: Also a patch v2 - shows how all the new stuff is integrated to work with CCID3.
The code compiles cleanly, all patches have been uploaded to the test tree (backported from 2.6.25),
git://eden-feed.erg.abdn.ac.uk/dccp_exp [dccp]
So far only a few quick bandwidth tests have been performed. These merely confirm that the stack
does not crash. Since most of this patch set deals with loss detection and re-ordering, some more
detailed tests are needed to ensure that the code, as before, deals well with loss, reordering,
and duplication (this requires at least one NetEm box).
Updates to the CCID4 subtree need to be suspended for a few days. There are too many fiddly changes
all over the place; until we understand exactly what is going on and if there has been a
regression, it is not a good idea to track everything.
^ permalink raw reply
* Re: [PATCH] [NET]: Remove unused "mibalign" argument for snmp_mib_init().
From: David Miller @ 2007-12-08 8:41 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev
In-Reply-To: <20071208.004128.44758266.yoshfuji@linux-ipv6.org>
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Sat, 08 Dec 2007 00:41:28 -0800 (PST)
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Applied, thanks.
^ permalink raw reply
* [PATCH] [NET]: Remove unused "mibalign" argument for snmp_mib_init().
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-12-08 8:41 UTC (permalink / raw)
To: davem; +Cc: yoshfuji, netdev
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
---
diff --git a/include/net/ip.h b/include/net/ip.h
index 840dd91..7f18819 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -169,7 +169,7 @@ DECLARE_SNMP_STAT(struct linux_mib, net_statistics);
#define NET_ADD_STATS_USER(field, adnd) SNMP_ADD_STATS_USER(net_statistics, field, adnd)
extern unsigned long snmp_fold_field(void *mib[], int offt);
-extern int snmp_mib_init(void *ptr[2], size_t mibsize, size_t mibalign);
+extern int snmp_mib_init(void *ptr[2], size_t mibsize);
extern void snmp_mib_free(void *ptr[2]);
extern void inet_get_local_port_range(int *low, int *high);
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index d2f22e7..afee63e 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -1237,7 +1237,7 @@ unsigned long snmp_fold_field(void *mib[], int offt)
}
EXPORT_SYMBOL_GPL(snmp_fold_field);
-int snmp_mib_init(void *ptr[2], size_t mibsize, size_t mibalign)
+int snmp_mib_init(void *ptr[2], size_t mibsize)
{
BUG_ON(ptr == NULL);
ptr[0] = __alloc_percpu(mibsize);
@@ -1291,32 +1291,25 @@ static struct net_protocol icmp_protocol = {
static int __init init_ipv4_mibs(void)
{
if (snmp_mib_init((void **)net_statistics,
- sizeof(struct linux_mib),
- __alignof__(struct linux_mib)) < 0)
+ sizeof(struct linux_mib)) < 0)
goto err_net_mib;
if (snmp_mib_init((void **)ip_statistics,
- sizeof(struct ipstats_mib),
- __alignof__(struct ipstats_mib)) < 0)
+ sizeof(struct ipstats_mib)) < 0)
goto err_ip_mib;
if (snmp_mib_init((void **)icmp_statistics,
- sizeof(struct icmp_mib),
- __alignof__(struct icmp_mib)) < 0)
+ sizeof(struct icmp_mib)) < 0)
goto err_icmp_mib;
if (snmp_mib_init((void **)icmpmsg_statistics,
- sizeof(struct icmpmsg_mib),
- __alignof__(struct icmpmsg_mib)) < 0)
+ sizeof(struct icmpmsg_mib)) < 0)
goto err_icmpmsg_mib;
if (snmp_mib_init((void **)tcp_statistics,
- sizeof(struct tcp_mib),
- __alignof__(struct tcp_mib)) < 0)
+ sizeof(struct tcp_mib)) < 0)
goto err_tcp_mib;
if (snmp_mib_init((void **)udp_statistics,
- sizeof(struct udp_mib),
- __alignof__(struct udp_mib)) < 0)
+ sizeof(struct udp_mib)) < 0)
goto err_udp_mib;
if (snmp_mib_init((void **)udplite_statistics,
- sizeof(struct udp_mib),
- __alignof__(struct udp_mib)) < 0)
+ sizeof(struct udp_mib)) < 0)
goto err_udplite_mib;
tcp_mib_init();
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index d9a59e0..9d4896f 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -257,16 +257,13 @@ static void addrconf_mod_timer(struct inet6_ifaddr *ifp,
static int snmp6_alloc_dev(struct inet6_dev *idev)
{
if (snmp_mib_init((void **)idev->stats.ipv6,
- sizeof(struct ipstats_mib),
- __alignof__(struct ipstats_mib)) < 0)
+ sizeof(struct ipstats_mib)) < 0)
goto err_ip;
if (snmp_mib_init((void **)idev->stats.icmpv6,
- sizeof(struct icmpv6_mib),
- __alignof__(struct icmpv6_mib)) < 0)
+ sizeof(struct icmpv6_mib)) < 0)
goto err_icmp;
if (snmp_mib_init((void **)idev->stats.icmpv6msg,
- sizeof(struct icmpv6msg_mib),
- __alignof__(struct icmpv6msg_mib)) < 0)
+ sizeof(struct icmpv6msg_mib)) < 0)
goto err_icmpmsg;
return 0;
--
YOSHIFUJI Hideaki @ USAGI Project <yoshfuji@linux-ipv6.org>
GPG-FP : 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
^ permalink raw reply related
* Re: [PATCH 2.6.25 3/3] ipv4: last default route is a fib table property
From: David Miller @ 2007-12-08 8:32 UTC (permalink / raw)
To: den; +Cc: containers, devel, netdev
In-Reply-To: <20071207161118.GA21722@iris.sw.ru>
From: "Denis V. Lunev" <den@openvz.org>
Date: Fri, 7 Dec 2007 19:11:18 +0300
> ipv4: last default route is a fib table property
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Applied, thanks!
^ permalink raw reply
* Re: [PATCH 2.6.25 2/3] ipv4: unify assignment of fi to fib_result
From: David Miller @ 2007-12-08 8:31 UTC (permalink / raw)
To: den; +Cc: containers, devel, netdev
In-Reply-To: <20071207161014.GA21704@iris.sw.ru>
From: "Denis V. Lunev" <den@openvz.org>
Date: Fri, 7 Dec 2007 19:10:14 +0300
> ipv4: unify assignment of fi to fib_result
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH 2.6.25 1/3] ipv4: no need pass pointer to a default into fib_detect_death
From: David Miller @ 2007-12-08 8:23 UTC (permalink / raw)
To: den; +Cc: containers, devel, netdev
In-Reply-To: <20071207160919.GA21678@iris.sw.ru>
From: "Denis V. Lunev" <den@openvz.org>
Date: Fri, 7 Dec 2007 19:09:19 +0300
> ipv4: no need pass pointer to a default into fib_detect_death
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
> Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Applied, thanks.
^ permalink raw reply
* Re: [patch 3/3][IPV6]: route6 remove ifdef for fib_rules
From: David Miller @ 2007-12-08 8:15 UTC (permalink / raw)
To: dlezcano; +Cc: yoshfuji, pekkas, netdev
In-Reply-To: <20071207131813.975600292@ICON-9-164-138-215.megacenter.de.ibm.com>
From: Daniel Lezcano <dlezcano@fr.ibm.com>
Date: Fri, 07 Dec 2007 14:13:28 +0100
> The patch defines the usual static inline functions when the code is
> disabled for fib6_rules. That's allow to remove some ifdef in route.c
> file and make the code a little more clear.
>
> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Applied, thanks.
^ permalink raw reply
* Re: [patch 2/3][IPV6]: remove ifdef in route6 for xfrm6
From: David Miller @ 2007-12-08 8:14 UTC (permalink / raw)
To: dlezcano; +Cc: yoshfuji, pekkas, netdev
In-Reply-To: <20071207131812.456058639@ICON-9-164-138-215.megacenter.de.ibm.com>
From: Daniel Lezcano <dlezcano@fr.ibm.com>
Date: Fri, 07 Dec 2007 14:13:27 +0100
> The following patch create the usual static inline functions to disable
> the xfrm6_init and xfrm6_fini function when XFRM is off.
> That's allow to remove some ifdef and make the code a little more clear.
>
> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Applied.
^ permalink raw reply
* Re: 'default' vs. 'all'
From: YOSHIFUJI Hideaki / 吉藤英明 @ 2007-12-08 8:14 UTC (permalink / raw)
To: davem; +Cc: herbert, netdev, yoshfuji
In-Reply-To: <20071208.000429.66028544.davem@davemloft.net>
In article <20071208.000429.66028544.davem@davemloft.net> (at Sat, 08 Dec 2007 00:04:29 -0800 (PST)), David Miller <davem@davemloft.net> says:
> Herbert, Yoshifuji and I were just discussing the
> sysfs device attribute issue.
>
> It's seems sane to me that if we had some kind of
> 'dirty' bit per attribute we could propagate default
> settings everywhere except where the dirty bit had
> been set.
One good event to propagate is the NETDEV_UP; if the dirty bit is
not set when the device is brought up, copy the default values to
the device.
Regards,
--yoshfuji @ Seattle
^ permalink raw reply
* Re: [patch 1/3][IPV6]: create route6 proc init-fini functions
From: David Miller @ 2007-12-08 8:13 UTC (permalink / raw)
To: dlezcano; +Cc: yoshfuji, pekkas, netdev
In-Reply-To: <20071207131810.854735805@ICON-9-164-138-215.megacenter.de.ibm.com>
From: Daniel Lezcano <dlezcano@fr.ibm.com>
Date: Fri, 07 Dec 2007 14:13:26 +0100
> Make the proc creation/destruction to be a separate function. That allows to
> remove the #ifdef CONFIG_PROC_FS in the init/fini function and make them more
> readable.
>
> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-2.6.25 3/3]sysctl: make sysctl_somaxconn per-namespace
From: David Miller @ 2007-12-08 8:12 UTC (permalink / raw)
To: xemul; +Cc: netdev, containers, devel
In-Reply-To: <475946D0.7020104@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 16:12:48 +0300
> Just move the variable on the struct net and adjust
> its usage.
>
> Others sysctls from sys.net.core table are more
> difficult to virtualize (i.e. make them per-namespace),
> but I'll look at them as well a bit later.
>
> Signed-off-by: Pavel Emelyanov <xemul@oenvz.org>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-2.6.25 2/3]sysctl: prepare core tables to point to netns variables
From: David Miller @ 2007-12-08 8:12 UTC (permalink / raw)
To: xemul; +Cc: netdev, containers, devel
In-Reply-To: <47594659.2050505@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 16:10:49 +0300
> Some of ctl variables are going to be on the struct
> net. Here's the way to adjust the ->data pointer on the
> ctl_table-s to point on the right variable.
>
> Since some pointers still point on the global variables,
> I keep turning the write bits off on such tables.
>
> This looks to become a common procedure for net sysctls,
> so later parts of this code may migrate to some more
> generic place.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied, but please see if you can find a more pretty way to
do this, thanks.
^ permalink raw reply
* Re: [PATCH net-2.6.25] qdisc: new rate limiter
From: Bill Fink @ 2007-12-08 8:11 UTC (permalink / raw)
To: Patrick McHardy; +Cc: Stephen Hemminger, David S. Miller, netdev
In-Reply-To: <475A0959.20701@trash.net>
On Sat, 08 Dec 2007, Patrick McHardy wrote:
> Patrick McHardy wrote:
> > Stephen Hemminger wrote:
> >>
> >> +struct tc_rlim_qopt
> >> +{
> >> + __u32 limit; /* fifo limit (packets) */
> >> + __u32 rate; /* bits per sec */
> >>
> >
> > This seems a bit small, 512mbit is the maximum rate.
>
> Its 4gbit of course, so I guess its enough :)
Actually, since we already have 10-Gbps nets, with 40-Gbps and
100-Gbps nets upcoming, it maybe should be __u64.
-Bill
^ permalink raw reply
* Re: [PATCH net-2.6.25 1/3]sysctl: make the sys.net.core sysctls per-namespace
From: David Miller @ 2007-12-08 8:10 UTC (permalink / raw)
To: xemul; +Cc: netdev, containers, devel
In-Reply-To: <47594587.6060308@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 16:07:19 +0300
> Making them per-namespace is required for the following
> two reasons:
>
> First, some ctl values have a per-namespace meaning.
> Second, making them writable from the sub-namespace
> is an isolation hole.
>
> So I introduce the pernet operations to create these
> tables. For init_net I use the existing statically
> declared tables, for sub-namespace they are duplicated
> and the write bits are removed from the mode.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied to net-2.6.25, but I fear you're going to need to do something
similar for ipv4, ipv6, and who knows what other protocols. And as a
result we'll end up with all kinds of protocol specific things in the
net namespace structure which totally stinks.
Such things will need to be registered dynamically just like the
protocols themselves are into the kernel.
^ permalink raw reply
* 'default' vs. 'all'
From: David Miller @ 2007-12-08 8:04 UTC (permalink / raw)
To: herbert; +Cc: netdev, yoshifuji
Herbert, Yoshifuji and I were just discussing the
sysfs device attribute issue.
It's seems sane to me that if we had some kind of
'dirty' bit per attribute we could propagate default
settings everywhere except where the dirty bit had
been set.
The question is how to implement this nicely.
What do you think?
^ permalink raw reply
* Re: [PATCH net-2.6.25] Remove unused devconf macros
From: David Miller @ 2007-12-08 7:57 UTC (permalink / raw)
To: xemul; +Cc: netdev, devel, herbert
In-Reply-To: <47591D8B.7000808@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 13:16:43 +0300
> The SNMP_INC_STATS_OFFSET_BH is used only by ICMP6_INC_STATS_OFFSET_BH.
> The ICMP6_INC_STATS_OFFSET_BH is unused.
>
> Can we drop them?
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Sure, applied to net-2.6.25, thanks.
^ permalink raw reply
* Re: [PATCH][IPV4] Swap the ifa allocation with the"ipv4_devconf_setall" call
From: David Miller @ 2007-12-08 7:55 UTC (permalink / raw)
To: xemul; +Cc: herbert, netdev, devel
In-Reply-To: <475910F1.1010007@openvz.org>
From: Pavel Emelyanov <xemul@openvz.org>
Date: Fri, 07 Dec 2007 12:22:57 +0300
> According to Herbert, the ipv4_devconf_setall should be called
> only when the ifa is added to the device. However, failed
> ifa allocation may bring things into inconsistent state.
>
> Move the call to ipv4_devconf_setall after the ifa allocation.
>
> Fits both net-2.6 (with offsets) and net-2.6.25 (cleanly).
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied to net-2.6, thanks Pavel.
^ permalink raw reply
* Re: [PATCH] [IPV6] XFRM: Fix auditing rt6i_flags; use RTF_xxx flags instead of RTCF_xxx.
From: David Miller @ 2007-12-08 7:51 UTC (permalink / raw)
To: yoshfuji; +Cc: netdev
In-Reply-To: <20071207.104148.112502523.yoshfuji@linux-ipv6.org>
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Date: Fri, 07 Dec 2007 10:41:48 -0800 (PST)
> RTCF_xxx flags, defined in include/linux/in_route.h) are available for
> IPv4 route (rtable) entries only. Use RTF_xxx flags instead,
> defined in include/linux/ipv6_route.h, for IPv6 route entries (rt6_info).
>
> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Applied, thank you.
^ permalink raw reply
* 2.6.24 net driver mis-patch
From: David Miller @ 2007-12-08 7:43 UTC (permalink / raw)
To: jeff; +Cc: netdev
Jeff, this belonged in netdev-2.6, Linus's tree doesn't have the BNX2X
driver yet, your 2.6.25 bound tree does.
As a result you added the ZLIB_INFLATE dependency to the TEHUTI driver
in 2.6.24 instead of BNX2X where it belongs, please fix this, thanks
:-)
commit 70eba18b5664f90d7620905e005b89388e5fd94b
Author: Eliezer Tamir <eliezert@broadcom.com>
Date: Wed Dec 5 16:12:39 2007 +0200
make bnx2x select ZLIB_INFLATE
The bnx2x module depends on the zlib_inflate functions. The
build will fail if ZLIB_INFLATE has not been selected manually
or by building another module that automatically selects it.
Modify BNX2X config option to 'select ZLIB_INFLATE' like BNX2
and others. This seems to fix it.
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Acked-by: Eliezer Tamir <eliezert@broadcom.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index d9107e5..6cde4ed 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2588,6 +2588,7 @@ config MLX4_DEBUG
config TEHUTI
tristate "Tehuti Networks 10G Ethernet"
depends on PCI
+ select ZLIB_INFLATE
help
Tehuti Networks 10G Ethernet NIC
^ permalink raw reply related
* Re: [PATCH net-2.6.25] qdisc: new rate limiter
From: Patrick McHardy @ 2007-12-08 3:02 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, netdev
In-Reply-To: <475A0804.1060006@trash.net>
Patrick McHardy wrote:
> Stephen Hemminger wrote:
>>
>> +struct tc_rlim_qopt
>> +{
>> + __u32 limit; /* fifo limit (packets) */
>> + __u32 rate; /* bits per sec */
>>
>
> This seems a bit small, 512mbit is the maximum rate.
Its 4gbit of course, so I guess its enough :)
^ permalink raw reply
* Re: [PATCH net-2.6.25] qdisc: new rate limiter
From: Patrick McHardy @ 2007-12-08 2:57 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, netdev
In-Reply-To: <20071207162618.35715892@freepuppy.rosehill>
Stephen Hemminger wrote:
> This is a time based rate limiter for use in network testing. When doing
> network tests it is often useful to test at reduced bandwidths. The existing
> Token Bucket Filter provides rate control, but causes bursty traffic that
> can cause different performance than real world. Another alternative is
> the PSPacer, but it depends on pause frames which may also cause issues.
>
> The qdisc depends on high resolution timers and clocks, so it will probably
> use more CPU than others making it a poor choice for use when doing traffic
> shaping for QOS.
>
> Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
>
> --- a/include/linux/pkt_sched.h 2007-10-30 09:18:29.000000000 -0700
> +++ b/include/linux/pkt_sched.h 2007-12-07 13:37:50.000000000 -0800
> @@ -475,4 +475,10 @@ struct tc_netem_corrupt
>
> #define NETEM_DIST_SCALE 8192
>
> +struct tc_rlim_qopt
> +{
> + __u32 limit; /* fifo limit (packets) */
> + __u32 rate; /* bits per sec */
>
This seems a bit small, 512mbit is the maximum rate.
> --- /dev/null 1970-01-01 00:00:00.000000000 +0000
> +++ b/net/sched/sch_rlim.c 2007-12-07 16:22:10.000000000 -0800
> @@ -0,0 +1,350 @@
> +static struct sk_buff *rlim_dequeue(struct Qdisc *sch)
> +{
> + struct rlim_sched_data *q = qdisc_priv(sch);
> + struct sk_buff *skb;
> + ktime_t now = ktime_get();
> +
> + /* if haven't reached the correct time slot, start timer */
> + if (now.tv64 < q->next_send.tv64) {
> + sch->flags |= TCQ_F_THROTTLED;
> + hrtimer_start(&q->watchdog.timer, q->next_send,
> + HRTIMER_MODE_ABS);
> + return NULL;
> + }
> +
> + skb = q->qdisc->dequeue(q->qdisc);
> + if (skb) {
> + q->next_send = ktime_add_ns(now, pkt_time(q, skb));
> + sch->flags &= ~TCQ_F_THROTTLED;
>
qlen is not decremented here.
> + }
> + return skb;
> +}
> +
> +static int rlim_requeue(struct sk_buff *skb, struct Qdisc *sch)
> +{
> + struct rlim_sched_data *q = qdisc_priv(sch);
> + int ret;
> +
> + ret = q->qdisc->ops->requeue(skb, q->qdisc);
> + if (!ret) {
> + q->next_send = ktime_sub_ns(q->next_send, pkt_time(q, skb));
> + sch->q.qlen++;
> + sch->qstats.requeues++;
> + }
> +
> + return ret;
> +}
> +
> +static void rlim_reset(struct Qdisc *sch)
> +{
> + struct rlim_sched_data *q = qdisc_priv(sch);
> +
> + qdisc_reset_queue(sch);
This should reset the child.
> +
> + q->next_send = ktime_get();
> + qdisc_watchdog_cancel(&q->watchdog);
> +}
> +
> +static int rlim_change(struct Qdisc *sch, struct rtattr *opt)
> +{
> + struct rlim_sched_data *q = qdisc_priv(sch);
> + const struct tc_rlim_qopt *qopt;
> + int err;
> +
> + if (opt == NULL || RTA_PAYLOAD(opt) < sizeof(struct tc_rlim_qopt))
> + return -EINVAL;
> +
> + qopt = RTA_DATA(opt);
>
Using nested attributes would make sure we don't run into
problems with extensibility.
> + err = set_fifo_limit(q->qdisc, qopt->limit);
> + if (err)
> + return err;
> +
> + q->limit = qopt->limit;
> + if (qopt->rate == 0)
> + q->cost = 0; /* unlimited */
> + else {
> + q->cost = (u64)NSEC_PER_SEC << NSEC_SCALE;
> + do_div(q->cost, qopt->rate);
> + }
> +
> + pr_debug("rlim_change: rate=%u cost=%llu\n",
> + qopt->rate, q->cost);
> +
> + return 0;
> +}
> +
> +static struct Qdisc_class_ops rlim_class_ops = {
>
This can be const.
> + .graft = rlim_graft,
> + .leaf = rlim_leaf,
> + .get = rlim_get,
> + .put = rlim_put,
> + .change = rlim_change_class,
> + .delete = rlim_delete,
> + .walk = rlim_walk,
> + .tcf_chain = rlim_find_tcf,
> + .dump = rlim_dump_class,
> +};
>
>
>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox