Re: [PATCH] libertas: Don't mark exported symbols as static
On Fri, Feb 08, 2008 at 06:01:02PM -0800, Roland Dreier wrote: > > Why not pull the exports? they aren't used anywhere in the existing kernel. > > I'm guessing there's some not-(yet-)merged mesh networking stuff that > uses the symbols, but it doesn't matter much to me... The general rule is to not keep symbols for out of tree stuff, so removing the exports makes more sense. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [Bugme-new] [Bug 9920] New: kernel panic when using ebtables redirect target
On Fri, 8 Feb 2008 17:40:20 -0800 (PST) [EMAIL PROTECTED] wrote: > http://bugzilla.kernel.org/show_bug.cgi?id=9920 > >Summary: kernel panic when using ebtables redirect target >Product: Networking >Version: 2.5 > KernelVersion: 2.6.24 and 2.6.24-git > Platform: All > OS/Version: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: Other > AssignedTo: [EMAIL PROTECTED] > ReportedBy: [EMAIL PROTECTED] > > > Latest working kernel version: 2.6.22 ( did not test 2.6.23 ) > Earliest failing kernel version: 2.6.24 > Distribution: > Hardware Environment: > Software Environment: bridge working as a router > Problem Description: when using ebtables to set up target-redirect, there will > be kernel panic > > Steps to reproduce: > 1. set up a basic bridge br0 with slaves eth0, eth1 > 2. on the bridge setup a default router to route traffic > 3. use ebtables to setup target redirect, > > ebtables -t broute -A BROUTING --logical-in br0 \ > -p ipv4 --ip-protocol tcp --ip-destination-port 80 \ > -j redirect --redirect-target ACCEPT > > 4. from a client which is connect to the bridge, > send some traffic to allow the BROUTE chain to be > traversed :- > > lynx http://www.google.com > > 5. Kernel panic :- > > Pid: 0, comm: swapper Not tainted (2.6.24-tmc #1) > EIP: 0060:[] EFLAGS: 0217 CPU: 0 > EIP is at ebt_do_table+0x4ea/0x5d0 [ebtables] > EAX: EBX: ECX: EDX: 0001 > ESI: c69f1178 EDI: c69f1108 EBP: c69f1000 ESP: c0315e20 > DS: 007b ES: 007b FS: 00d8 GS: SS: 0068 > Process swapper (pid: 0, ti=c0314000 task=c02f1300 task.ti=c0314000) > Stack: c69f11dc 0004 c28c7800 c2b79c20 0005 c69de350 > 0001 0002 c69ed040 c69ed040 c69f1000 00b0 > 00b0 c29b0812 c69f1122 a0c3 c29b0812 > Call Trace: > [] ebt_broute+0x22/0x30 [ebtable_broute] > [] br_handle_frame+0xb8/0x220 [bridge] > [] netif_receive_skb+0x19c/0x440 > [] process_backlog+0x6b/0xd0 > [] net_rx_action+0x105/0x1b0 > [] __do_softirq+0x75/0xf0 > [] do_softirq+0x37/0x40 > [] irq_exit+0x75/0x80 > [] smp_apic_timer_interrupt+0x57/0x90 > [] apic_timer_interrupt+0x28/0x30 > [] default_idle+0x0/0x40 > [] default_idle+0x2f/0x40 > [] cpu_idle+0x73/0xa0 > [] start_kernel+0x2c5/0x340 > [] unknown_bootoption+0x0/0x1e0 > === > Code: 00 00 83 f9 fe 74 64 83 f9 fc 0f 84 d7 fb ff ff 83 f9 fd 0f 84 bb fc ff > ff 8b 5c 24 30 8b 54 24 34 8d 04 5b 8d 04 82 8b 54 24 20 <89> 28 42 89 50 08 > 8b > 5f 6c 01 df 89 78 04 8b 6c 24 38 8b 54 24 > EIP: [] ebt_do_table+0x4ea/0x5d0 [ebtables] SS:ESP 0068:c0315e20 > > -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libertas: Don't mark exported symbols as static
> Why not pull the exports? they aren't used anywhere in the existing kernel. I'm guessing there's some not-(yet-)merged mesh networking stuff that uses the symbols, but it doesn't matter much to me... - R. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ematch: oops from uninitialized variable (resend)
Setting up a meta match causes a kernel OOPS because of uninitialized elements in tree. [ 37.322381] BUG: unable to handle kernel NULL pointer dereference at [ 37.322381] IP: [] :em_meta:em_meta_destroy+0x17/0x80 [ 37.322381] Call Trace: [ 37.322381] [] tcf_em_tree_destroy+0x2d/0xa0 [ 37.322381] [] tcf_em_tree_validate+0x2dc/0x4a0 [ 37.322381] [] nla_parse+0x92/0xe0 [ 37.322381] [] :cls_basic:basic_change+0x202/0x3c0 [ 37.322381] [] kmem_cache_alloc+0x67/0xa0 [ 37.322381] [] tc_ctl_tfilter+0x3b1/0x580 [ 37.322381] [] rtnetlink_rcv_msg+0x0/0x260 [ 37.322381] [] netlink_rcv_skb+0x74/0xa0 [ 37.322381] [] rtnetlink_rcv+0x18/0x20 [ 37.322381] [] netlink_unicast+0x263/0x290 [ 37.322381] [] __alloc_skb+0x96/0x160 [ 37.322381] [] netlink_sendmsg+0x274/0x340 [ 37.322381] [] sock_sendmsg+0x12b/0x140 [ 37.322381] [] autoremove_wake_function+0x0/0x30 [ 37.322381] [] autoremove_wake_function+0x0/0x30 [ 37.322381] [] sock_sendmsg+0x12b/0x140 [ 37.322381] [] zone_statistics+0xb1/0xc0 [ 37.322381] [] sys_sendmsg+0x20e/0x360 [ 37.322381] [] sockfd_lookup_light+0x41/0x80 [ 37.322381] [] handle_mm_fault+0x3eb/0x7f0 [ 37.322381] [] system_call_after_swapgs+0x7b/0x80 Signed-off-by: Stephen Hemminger <[EMAIL PROTECTED]> --- net/sched/ematch.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/net/sched/ematch.c b/net/sched/ematch.c index 74ff918..d421ec7 100644 --- a/net/sched/ematch.c +++ b/net/sched/ematch.c @@ -312,10 +312,9 @@ int tcf_em_tree_validate(struct tcf_proto *tp, struct nlattr *nla, struct tcf_ematch_tree_hdr *tree_hdr; struct tcf_ematch *em; - if (!nla) { - memset(tree, 0, sizeof(*tree)); + memset(tree, 0, sizeof(*tree)); + if (!nla) return 0; - } err = nla_parse_nested(tb, TCA_EMATCH_TREE_MAX, nla, em_policy); if (err < 0 -- Stephen Hemminger <[EMAIL PROTECTED]> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] libertas: Don't mark exported symbols as static
On Fri, 08 Feb 2008 16:07:26 -0800 Roland Dreier <[EMAIL PROTECTED]> wrote: > Marking exported symbols as static causes the following build error on > ia64 with gcc 4.2.3: > > drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh > causes a section type conflict > drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh > causes a section type conflict > > Therefore, remove the static marking on lbs_remove_mesh and lbs_add_mesh. > > Signed-off-by: Roland Dreier <[EMAIL PROTECTED]> > --- > diff --git a/drivers/net/wireless/libertas/main.c > b/drivers/net/wireless/libertas/main.c > index 84fb49c..a688ce8 100644 > --- a/drivers/net/wireless/libertas/main.c > +++ b/drivers/net/wireless/libertas/main.c > @@ -253,8 +253,8 @@ static ssize_t lbs_anycast_set(struct device *dev, > > static int lbs_add_rtap(struct lbs_private *priv); > static void lbs_remove_rtap(struct lbs_private *priv); > -static int lbs_add_mesh(struct lbs_private *priv); > -static void lbs_remove_mesh(struct lbs_private *priv); > +int lbs_add_mesh(struct lbs_private *priv); > +void lbs_remove_mesh(struct lbs_private *priv); > > > /** > @@ -1296,7 +1296,7 @@ EXPORT_SYMBOL_GPL(lbs_stop_card); > * @param privA pointer to the struct lbs_private structure > * @return 0 if successful, -X otherwise > */ > -static int lbs_add_mesh(struct lbs_private *priv) > +int lbs_add_mesh(struct lbs_private *priv) > { > struct net_device *mesh_dev = NULL; > int ret = 0; > @@ -1354,7 +1354,7 @@ done: > EXPORT_SYMBOL_GPL(lbs_add_mesh); > > > -static void lbs_remove_mesh(struct lbs_private *priv) > +void lbs_remove_mesh(struct lbs_private *priv) > { > struct net_device *mesh_dev; > > -- > To unsubscribe from this list: send the line "unsubscribe netdev" in > the body of a message to [EMAIL PROTECTED] > More majordomo info at http://vger.kernel.org/majordomo-info.html > Why not pull the exports? they aren't used anywhere in the existing kernel. -- Stephen Hemminger <[EMAIL PROTECTED]> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libertas: Don't mark exported symbols as static
Marking exported symbols as static causes the following build error on ia64 with gcc 4.2.3: drivers/net/wireless/libertas/main.c:1375: error: __ksymtab_lbs_remove_mesh causes a section type conflict drivers/net/wireless/libertas/main.c:1354: error: __ksymtab_lbs_add_mesh causes a section type conflict Therefore, remove the static marking on lbs_remove_mesh and lbs_add_mesh. Signed-off-by: Roland Dreier <[EMAIL PROTECTED]> --- diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 84fb49c..a688ce8 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c @@ -253,8 +253,8 @@ static ssize_t lbs_anycast_set(struct device *dev, static int lbs_add_rtap(struct lbs_private *priv); static void lbs_remove_rtap(struct lbs_private *priv); -static int lbs_add_mesh(struct lbs_private *priv); -static void lbs_remove_mesh(struct lbs_private *priv); +int lbs_add_mesh(struct lbs_private *priv); +void lbs_remove_mesh(struct lbs_private *priv); /** @@ -1296,7 +1296,7 @@ EXPORT_SYMBOL_GPL(lbs_stop_card); * @param privA pointer to the struct lbs_private structure * @return 0 if successful, -X otherwise */ -static int lbs_add_mesh(struct lbs_private *priv) +int lbs_add_mesh(struct lbs_private *priv) { struct net_device *mesh_dev = NULL; int ret = 0; @@ -1354,7 +1354,7 @@ done: EXPORT_SYMBOL_GPL(lbs_add_mesh); -static void lbs_remove_mesh(struct lbs_private *priv) +void lbs_remove_mesh(struct lbs_private *priv) { struct net_device *mesh_dev; -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT-PULL Request]: SCTP fixes
Hi David The following changes since commit 3113e88c3cb3c0a22920b621f8e4d1f2ccc07f1e: Stephen Hemminger (1): [PKT_SCHED]: vlan tag match are available in the git repository at: [EMAIL PROTECTED]:/pub/scm/linux/kernel/git/vxy/lksctp-dev.git pending Vlad Yasevich (6): [SCTP]: Stop claiming that this is a "reference implementation" [SCTP]: Do not increase rwnd when reading partial notification. [SCTP]: Kill silly inlines in ulpqueue.c [SCTP]: Correctly reap SSNs when processing FORWARD_TSN chunk [SCTP]: Set ports in every address returned by sctp_getladdrs() [SCTP]: Make sure the chunk is off the transmitted list prior to freeing. Wei Yongjun (1): [SCTP]: Fix kernel panic while received ASCONF chunk with bad serial number include/linux/sctp.h |4 +- include/net/sctp/auth.h |8 +++--- include/net/sctp/command.h |8 +++--- include/net/sctp/constants.h |8 +++--- include/net/sctp/sctp.h |8 +++--- include/net/sctp/sm.h|8 +++--- include/net/sctp/structs.h |8 +++--- include/net/sctp/tsnmap.h|8 +++--- include/net/sctp/ulpevent.h |8 +++--- include/net/sctp/ulpqueue.h |6 ++-- include/net/sctp/user.h |8 +++--- net/sctp/associola.c | 14 ++-- net/sctp/auth.c |8 +++--- net/sctp/bind_addr.c |8 +++--- net/sctp/chunk.c |8 +++--- net/sctp/command.c |8 +++--- net/sctp/debug.c | 12 +++--- net/sctp/endpointola.c | 12 +++--- net/sctp/input.c |8 +++--- net/sctp/inqueue.c |8 +++--- net/sctp/ipv6.c |8 +++--- net/sctp/objcnt.c|8 +++--- net/sctp/output.c|8 +++--- net/sctp/outqueue.c | 12 ++ net/sctp/primitive.c |8 +++--- net/sctp/proc.c |8 +++--- net/sctp/protocol.c |8 +++--- net/sctp/sm_make_chunk.c |9 --- net/sctp/sm_sideeffect.c |8 +++--- net/sctp/sm_statefuns.c | 10 +++- net/sctp/sm_statetable.c |8 +++--- net/sctp/socket.c| 17 +++ net/sctp/ssnmap.c|8 +++--- net/sctp/sysctl.c|8 +++--- net/sctp/transport.c |8 +++--- net/sctp/tsnmap.c|8 +++--- net/sctp/ulpevent.c |7 +++-- net/sctp/ulpqueue.c | 43 + 38 files changed, 190 insertions(+), 172 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] isdn: fix section mismatch warnings from hisax_cs_setup_card
Fix the following warnings: WARNING: drivers/isdn/hisax/built-in.o(.text+0x722): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_teles3() WARNING: drivers/isdn/hisax/built-in.o(.text+0x72c): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_s0box() WARNING: drivers/isdn/hisax/built-in.o(.text+0x736): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_telespci() WARNING: drivers/isdn/hisax/built-in.o(.text+0x747): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_avm_pcipnp() WARNING: drivers/isdn/hisax/built-in.o(.text+0x74e): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_elsa() WARNING: drivers/isdn/hisax/built-in.o(.text+0x755): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_diva() WARNING: drivers/isdn/hisax/built-in.o(.text+0x75c): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_sedlbauer() WARNING: drivers/isdn/hisax/built-in.o(.text+0x763): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_netjet_s() WARNING: drivers/isdn/hisax/built-in.o(.text+0x76a): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_hfcpci() WARNING: drivers/isdn/hisax/built-in.o(.text+0x771): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_hfcsx() WARNING: drivers/isdn/hisax/built-in.o(.text+0x778): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_niccy() WARNING: drivers/isdn/hisax/built-in.o(.text+0x77f): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_bkm_a4t() WARNING: drivers/isdn/hisax/built-in.o(.text+0x786): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_sct_quadro() WARNING: drivers/isdn/hisax/built-in.o(.text+0x78d): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_gazel() WARNING: drivers/isdn/hisax/built-in.o(.text+0x794): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_w6692() WARNING: drivers/isdn/hisax/built-in.o(.text+0x79b): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_netjet_u() WARNING: drivers/isdn/hisax/built-in.o(.text+0x7a2): Section mismatch in reference from the function hisax_cs_setup_card() to the function .devinit.text:setup_enternow_pci() checkcard() are the only user of hisax_cs_setup_card(). And checkcard is only used during init or when hot plugging ISDN devices. So annotate hisax_cs_setup_card() with __devinit. checkcard() is used by exported functions so it cannot be annotated __devinit. Annotate it with __ref so modpost ignore references to _devinit section. Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]> Acked-by: Karsten Keil <[EMAIL PROTECTED]> Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: David Miller <[EMAIL PROTECTED]> --- --- drivers/isdn/hisax/config.c |7 +-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/isdn/hisax/config.c b/drivers/isdn/hisax/config.c index 97097ef..a0ee43c 100644 --- a/drivers/isdn/hisax/config.c +++ b/drivers/isdn/hisax/config.c @@ -847,7 +847,7 @@ static int init_card(struct IsdnCardState *cs) return 3; } -static int hisax_cs_setup_card(struct IsdnCard *card) +static int __devinit hisax_cs_setup_card(struct IsdnCard *card) { int ret; @@ -1166,7 +1166,10 @@ outf_cs: return 0; } -static int checkcard(int cardnr, char *id, int *busy_flag, struct module *lockowner) +/* Used from an exported function but calls __devinit functions. + * Tell modpost not to warn (__ref) + */ +static int __ref checkcard(int cardnr, char *id, int *busy_flag, struct module *lockowner) { int ret; struct IsdnCard *card = cards + cardnr; -- 1.5.4.rc3.14.g44397 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] isdn: fix section mismatch warning for ISACVer
Fix following warnings: WARNING: drivers/isdn/hisax/built-in.o(.text+0x19723): Section mismatch in reference from the function ISACVersion() to the variable .devinit.data:ISACVer WARNING: drivers/isdn/hisax/built-in.o(.text+0x2005b): Section mismatch in reference from the function setup_avm_a1_pcmcia() to the function .devinit.text:setup_isac() ISACVer were only used from function annotated __devinit so add same annotation to ISACVer. One af the fererencing functions missed __devinit so add it and kill an additional warning. Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]> Acked-by: Karsten Keil <[EMAIL PROTECTED]> Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: David Miller <[EMAIL PROTECTED]> --- drivers/isdn/hisax/avm_a1p.c |3 +-- drivers/isdn/hisax/isac.c|3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/isdn/hisax/avm_a1p.c b/drivers/isdn/hisax/avm_a1p.c index c87fa3f..3039c6d 100644 --- a/drivers/isdn/hisax/avm_a1p.c +++ b/drivers/isdn/hisax/avm_a1p.c @@ -213,8 +213,7 @@ AVM_card_msg(struct IsdnCardState *cs, int mt, void *arg) return 0; } -int -setup_avm_a1_pcmcia(struct IsdnCard *card) +int __devinit setup_avm_a1_pcmcia(struct IsdnCard *card) { u_char model, vers; struct IsdnCardState *cs = card->cs; diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c index 4e9f238..6ae9dde 100644 --- a/drivers/isdn/hisax/isac.c +++ b/drivers/isdn/hisax/isac.c @@ -27,8 +27,7 @@ static char *ISACVer[] __devinitdata = {"2086/2186 V1.1", "2085 B1", "2085 B2", "2085 V2.3"}; -void -ISACVersion(struct IsdnCardState *cs, char *s) +void __devinit ISACVersion(struct IsdnCardState *cs, char *s) { int val; -- 1.5.4.rc3.14.g44397 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] isdn: fix section mismatch warning in hfc_sx.c
Fix the following warning: WARNING: drivers/isdn/hisax/built-in.o(.text+0x35818): Section mismatch in reference from the function hfcsx_card_msg() to the function .devinit.text:inithfcsx() hfcsx_card_msg() may be called outside __devinit context. Following the program logic is looks like the CARD_INIT branch will only be taken under __devinit context but to be consistent remove the __devinit annotation of inithfcsx() so we do not mix non-__devinit and __devinit code. Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]> Acked-by: Karsten Keil <[EMAIL PROTECTED]> Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: David Miller <[EMAIL PROTECTED]> --- drivers/isdn/hisax/hfc_sx.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/isdn/hisax/hfc_sx.c b/drivers/isdn/hisax/hfc_sx.c index 4fd09d2..05482d2 100644 --- a/drivers/isdn/hisax/hfc_sx.c +++ b/drivers/isdn/hisax/hfc_sx.c @@ -1330,8 +1330,7 @@ hfcsx_bh(struct work_struct *work) // /* called for card init message */ // -static void __devinit -inithfcsx(struct IsdnCardState *cs) +static void inithfcsx(struct IsdnCardState *cs) { cs->setstack_d = setstack_hfcsx; cs->BC_Send_Data = &hfcsx_send_data; -- 1.5.4.rc3.14.g44397 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] isdn: fix section mismatch warnings in isac.c and isar.c
Fix the following warnings: WARNING: drivers/isdn/hisax/built-in.o(.text+0x1b276): Section mismatch in reference from the function inithscxisac() to the function .devinit.text:clear_pending_isac_ints() WARNING: drivers/isdn/hisax/built-in.o(.text+0x1b286): Section mismatch in reference from the function inithscxisac() to the function .devinit.text:initisac() WARNING: drivers/isdn/hisax/built-in.o(.text+0x1fec7): Section mismatch in reference from the function AVM_card_msg() to the function .devinit.text:clear_pending_isac_ints() WARNING: drivers/isdn/hisax/built-in.o(.text+0x21669): Section mismatch in reference from the function AVM_card_msg() to the function .devinit.text:clear_pending_isac_ints() WARNING: drivers/isdn/hisax/built-in.o(.text+0x21671): Section mismatch in reference from the function AVM_card_msg() to the function .devinit.text:initisac() WARNING: drivers/isdn/hisax/built-in.o(.text+0x2991e): Section mismatch in reference from the function Sedl_card_msg() to the function .devinit.text:clear_pending_isac_ints() WARNING: drivers/isdn/hisax/built-in.o(.text+0x29936): Section mismatch in reference from the function Sedl_card_msg() to the function .devinit.text:initisac() WARNING: drivers/isdn/hisax/built-in.o(.text+0x2993e): Section mismatch in reference from the function Sedl_card_msg() to the function .devinit.text:initisar() WARNING: drivers/isdn/hisax/built-in.o(.text+0x2e026): Section mismatch in reference from the function NETjet_S_card_msg() to the function .devinit.text:clear_pending_isac_ints() WARNING: drivers/isdn/hisax/built-in.o(.text+0x2e02e): Section mismatch in reference from the function NETjet_S_card_msg() to the function .devinit.text:initisac() WARNING: drivers/isdn/hisax/built-in.o(.text+0x37813): Section mismatch in reference from the function BKM_card_msg() to the function .devinit.text:clear_pending_isac_ints() WARNING: drivers/isdn/hisax/built-in.o(.text+0x37823): Section mismatch in reference from the function BKM_card_msg() to the function .devinit.text:initisac() initisar(), initisac() and clear_pending_isac_ints() were all used via a cardmsg fnction - which may be called ouside __devinit context. So remove the bogus __devinit annotation of the above three functions to fix the warnings. Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]> Acked-by: Karsten Keil <[EMAIL PROTECTED]> Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: David Miller <[EMAIL PROTECTED]> --- drivers/isdn/hisax/isac.c |6 ++ drivers/isdn/hisax/isar.c |3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/isdn/hisax/isac.c b/drivers/isdn/hisax/isac.c index 6ae9dde..07b1673 100644 --- a/drivers/isdn/hisax/isac.c +++ b/drivers/isdn/hisax/isac.c @@ -615,8 +615,7 @@ dbusy_timer_handler(struct IsdnCardState *cs) } } -void __devinit -initisac(struct IsdnCardState *cs) +void initisac(struct IsdnCardState *cs) { cs->setstack_d = setstack_isac; cs->DC_Close = DC_Close_isac; @@ -647,8 +646,7 @@ initisac(struct IsdnCardState *cs) cs->writeisac(cs, ISAC_MASK, 0x0); } -void __devinit -clear_pending_isac_ints(struct IsdnCardState *cs) +void clear_pending_isac_ints(struct IsdnCardState *cs) { int val, eval; diff --git a/drivers/isdn/hisax/isar.c b/drivers/isdn/hisax/isar.c index c547a66..bfeb9b6 100644 --- a/drivers/isdn/hisax/isar.c +++ b/drivers/isdn/hisax/isar.c @@ -1894,8 +1894,7 @@ isar_auxcmd(struct IsdnCardState *cs, isdn_ctrl *ic) { return(0); } -void __devinit -initisar(struct IsdnCardState *cs) +void initisar(struct IsdnCardState *cs) { cs->bcs[0].BC_SetStack = setstack_isar; cs->bcs[1].BC_SetStack = setstack_isar; -- 1.5.4.rc3.14.g44397 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Broadcom 5708 taking a few seconds to get link-up
On Fri, 2008-02-08 at 14:29 -0500, Brian Haley wrote: > Hi Michael, > > I'm working on a system that has two on-board 5708's. We've noticed > that it takes about 3 seconds for the link to come up - is this > considered normal? I've tried this with the latest davem tree with > similar results to older kernels/drivers. Yes, 2 - 3 seconds are normal for autoneg to link up on 10/100/1000baseT. Sometimes it can take even longer, but generally less than 5 seconds. SerDes is much faster. > > # uname -r > 2.6.24 > > # ethtool -i eth3 > driver: bnx2 > version: 1.7.3 > firmware-version: 1.9.3 > bus-info: :42:00.0 > > # lspci -v > 42:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 > Gigabit Ethernet (rev 11) > Subsystem: Hewlett-Packard Company Unknown device 7038 > Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 34 > Memory at fa00 (64-bit, non-prefetchable) [size=32M] > Capabilities: [40] PCI-X non-bridge device > Capabilities: [48] Power Management version 2 > Capabilities: [50] Vital Product Data > Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ > Queue=0/0 Enable- > > # ip link set eth3 up; mii-tool eth3; sleep 1; mii-tool eth3; sleep 1; > mii-tool eth3; sleep 1; mii-tool eth3 > eth3: no link > eth3: no link > eth3: no link > eth3: negotiated 100baseTx-FD, link ok > > Other drivers I've tried - e1000 and tg3, get up in < 1 second. I'm > asking becuase any packet I try to transmit out this interface before > link-up never gets out. > In BNX2 and TG3, we always reset the PHY when we bring up the device, causing the link to drop and to renegotiate. The link-up time for TG3 should be about the same (2 - 3 seconds). Other drivers may not reset the PHY and so the link may be able to come up instantly. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/5] Tsi108_eth: fix detection of 1000Mb mode
Bug fix for tsi108_eth network driver. This patch fixes a problem with detection of 1000Mb speed. Signed-off-by: Alexandre Bounine <[EMAIL PROTECTED]> --- diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c linux-2.6.24-fix/drivers/net/tsi108_eth.c --- linux-2.6.24/drivers/net/tsi108_eth.c 2008-02-06 15:09:19.0 -0500 +++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06 15:34:12.0 -0500 @@ -1287,6 +1287,7 @@ static void tsi108_init_phy(struct net_d spin_lock_irqsave(&phy_lock, flags); } + data->mii_if.supports_gmii = mii_check_gmii_support(&data->mii_if); printk(KERN_DEBUG "PHY_STAT reg contains %08x\n", phyval); data->phy_ok = 1; data->init_media = 1; @@ -1584,7 +1585,6 @@ tsi108_init_one(struct platform_device * data->mii_if.phy_id = einfo->phy; data->mii_if.phy_id_mask = 0x1f; data->mii_if.reg_num_mask = 0x1f; - data->mii_if.supports_gmii = mii_check_gmii_support(&data->mii_if); data->phy = einfo->phy; data->phy_type = einfo->phy_type; --- Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 0/5] Tsi108_eth: set of driver fix-ups
This is set of small fixes for Tsi108 Ethernet driver. Based on kernel version 2.6.24 --- Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/5] Tsi108_eth: add missing linking to driver data
Bug fix for tsi108_eth network driver. This patch adds missing linking to driver data. Signed-off-by: Alexandre Bounine <[EMAIL PROTECTED]> --- diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c linux-2.6.24-fix/drivers/net/tsi108_eth.c --- linux-2.6.24/drivers/net/tsi108_eth.c 2008-01-24 17:58:37.0 -0500 +++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06 14:30:04.0 -0500 @@ -1629,6 +1629,7 @@ tsi108_init_one(struct platform_device * goto register_fail; } + platform_set_drvdata(pdev, dev); printk(KERN_INFO "%s: Tsi108 Gigabit Ethernet, MAC: %s\n", dev->name, print_mac(mac, dev->dev_addr)); #ifdef DEBUG --- Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/5] Tsi108_eth: remove not needed code
Code clean-up for tsi108_eth network driver. This patch removes not needed dummy read and the corresponding comment. The PHY logic requires two reads from the status register to get current link status. This is done correctly inside mii_check_media(). Signed-off-by: Alexandre Bounine <[EMAIL PROTECTED]> --- diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c linux-2.6.24-fix/drivers/net/tsi108_eth.c --- linux-2.6.24/drivers/net/tsi108_eth.c 2008-02-06 15:47:35.0 -0500 +++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06 15:54:14.0 -0500 @@ -297,18 +297,11 @@ static void tsi108_check_phy(struct net_ u32 speed; unsigned long flags; - /* Do a dummy read, as for some reason the first read -* after a link becomes up returns link down, even if -* it's been a while since the link came up. -*/ - spin_lock_irqsave(&phy_lock, flags); if (!data->phy_ok) goto out; - tsi108_read_mii(data, MII_BMSR); - duplex = mii_check_media(&data->mii_if, netif_msg_link(data), data->init_media); data->init_media = 0; --- Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/5] Tsi108_eth: fix link recovery after disconnect
Bug fix for tsi108_eth network driver. This patch fixes a problem with link recovery after connection was lost. Signed-off-by: Alexandre Bounine <[EMAIL PROTECTED]> --- diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c linux-2.6.24-fix/drivers/net/tsi108_eth.c --- linux-2.6.24/drivers/net/tsi108_eth.c 2008-02-06 16:16:00.0 -0500 +++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06 16:57:41.0 -0500 @@ -338,22 +338,21 @@ static void tsi108_check_phy(struct net_ TSI_WRITE(TSI108_MAC_CFG2, mac_cfg2_reg); TSI_WRITE(TSI108_EC_PORTCTRL, portctrl_reg); + } - if (data->link_up == 0) { - /* The manual says it can take 3-4 usecs for the speed change -* to take effect. -*/ - udelay(5); - - spin_lock(&data->txlock); - if (is_valid_ether_addr(dev->dev_addr) && data->txfree) - netif_wake_queue(dev); + if (data->link_up == 0) { + /* The manual says it can take 3-4 usecs for the speed change +* to take effect. +*/ + udelay(5); - data->link_up = 1; - spin_unlock(&data->txlock); - } - } + spin_lock(&data->txlock); + if (is_valid_ether_addr(dev->dev_addr) && data->txfree) + netif_wake_queue(dev); + data->link_up = 1; + spin_unlock(&data->txlock); + } } else { if (data->link_up == 1) { netif_stop_queue(dev); @@ -1267,12 +1266,11 @@ static void tsi108_init_phy(struct net_d * PHY_STAT register before the link up status bit is set. */ - data->link_up = 1; + data->link_up = 0; while (!((phyval = tsi108_read_mii(data, MII_BMSR)) & BMSR_LSTATUS)) { if (i++ > (MII_READ_DELAY / 10)) { - data->link_up = 0; break; } spin_unlock_irqrestore(&phy_lock, flags); --- Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 5/5] Tsi108_eth: Add ethtool support
Add ethtool support to tsi108_eth network driver. Signed-off-by: Alexandre Bounine <[EMAIL PROTECTED]> --- diff -pNur linux-2.6.24/drivers/net/tsi108_eth.c linux-2.6.24-fix/drivers/net/tsi108_eth.c --- linux-2.6.24/drivers/net/tsi108_eth.c 2008-02-06 17:10:53.0 -0500 +++ linux-2.6.24-fix/drivers/net/tsi108_eth.c 2008-02-06 18:09:43.0 -0500 @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -1519,12 +1520,46 @@ static void tsi108_init_mac(struct net_d TSI_WRITE(TSI108_EC_INTMASK, ~0); } +static int tsi108_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct tsi108_prv_data *data = netdev_priv(dev); + unsigned long flags; + int rc; + + spin_lock_irqsave(&data->txlock, flags); + rc = mii_ethtool_gset(&data->mii_if, cmd); + spin_unlock_irqrestore(&data->txlock, flags); + + return rc; +} + +static int tsi108_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) +{ + struct tsi108_prv_data *data = netdev_priv(dev); + unsigned long flags; + int rc; + + spin_lock_irqsave(&data->txlock, flags); + rc = mii_ethtool_sset(&data->mii_if, cmd); + spin_unlock_irqrestore(&data->txlock, flags); + + return rc; +} + static int tsi108_do_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) { struct tsi108_prv_data *data = netdev_priv(dev); + if (!netif_running(dev)) + return -EINVAL; return generic_mii_ioctl(&data->mii_if, if_mii(rq), cmd, NULL); } +static const struct ethtool_ops tsi108_ethtool_ops = { + .get_link = ethtool_op_get_link, + .get_settings = tsi108_get_settings, + .set_settings = tsi108_set_settings, +}; + static int tsi108_init_one(struct platform_device *pdev) { @@ -1589,6 +1624,7 @@ tsi108_init_one(struct platform_device * dev->get_stats = tsi108_get_stats; netif_napi_add(dev, &data->napi, tsi108_poll, 64); dev->do_ioctl = tsi108_do_ioctl; + dev->ethtool_ops = &tsi108_ethtool_ops; /* Apparently, the Linux networking code won't use scatter-gather * if the hardware doesn't do checksums. However, it's faster --- Important Notice: This message is intended for the use of the individual to whom it is addressed and may contain information which is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, or is not the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender immediately by telephone or return e-mail and delete the original message from your systems. Thank you. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Broadcom 5708 taking a few seconds to get link-up
Hi Michael, I'm working on a system that has two on-board 5708's. We've noticed that it takes about 3 seconds for the link to come up - is this considered normal? I've tried this with the latest davem tree with similar results to older kernels/drivers. # uname -r 2.6.24 # ethtool -i eth3 driver: bnx2 version: 1.7.3 firmware-version: 1.9.3 bus-info: :42:00.0 # lspci -v 42:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708 Gigabit Ethernet (rev 11) Subsystem: Hewlett-Packard Company Unknown device 7038 Flags: bus master, 66MHz, medium devsel, latency 64, IRQ 34 Memory at fa00 (64-bit, non-prefetchable) [size=32M] Capabilities: [40] PCI-X non-bridge device Capabilities: [48] Power Management version 2 Capabilities: [50] Vital Product Data Capabilities: [58] Message Signalled Interrupts: Mask- 64bit+ Queue=0/0 Enable- # ip link set eth3 up; mii-tool eth3; sleep 1; mii-tool eth3; sleep 1; mii-tool eth3; sleep 1; mii-tool eth3 eth3: no link eth3: no link eth3: no link eth3: negotiated 100baseTx-FD, link ok Other drivers I've tried - e1000 and tg3, get up in < 1 second. I'm asking becuase any packet I try to transmit out this interface before link-up never gets out. Thanks for any info, -Brian -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 1/7] typhoon section fix
On Fri, Feb 08, 2008 at 01:21:57PM -0500, David Dillow wrote: > > On Fri, 2008-02-08 at 09:52 -0800, Andrew Morton wrote: > > On Fri, 08 Feb 2008 08:59:10 -0500 David Dillow <[EMAIL PROTECTED]> wrote: > > > On Fri, 2008-02-08 at 03:11 -0800, [EMAIL PROTECTED] wrote: > > > > From: Andrew Morton <[EMAIL PROTECTED]> > > > > > > > > gcc-3.4.4 on powerpc: > > > > > > > > drivers/net/typhoon.c:137: error: version causes a section type conflict > > > > > > > > Cc: Jeff Garzik <[EMAIL PROTECTED]> > > > > Cc: Sam Ravnborg <[EMAIL PROTECTED]> > > > > Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> > > > > > > > -static const char version[] __devinitdata = > > > > +static char version[] __devinitdata = > > > > "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE > > > > ")\n"; > > > > > > Wouldn't going to __devinitconst be better? I'll try to whip up a patch > > > and test-compile it. > > > > Sam told me that doesn't work right, that this approach is the one to use > > and, iirc, that __devinitcont and friends will be removed. > > > > I'm not sure why, actually. I think I missed that dicussion. After introducing dedicated sections for __devinit, __devinitdata & friends and introducing __devinitconst for const data we started to see section type conflict _errors_ emitted from gcc for certain architectures. 64bit powerpc and ia64 being two of them. That was rooted down by Al to the following: === ; cat >a.c <<'EOF' const char foo[] __attribute__ ((__section__(".blah"))) = ""; const char * const bar __attribute__((__section__(".blah"))) = ""; EOF ; gcc -m32 -S a.c ; gcc -m64 -S a.c a.c:2: error: bar causes a section type conflict ; === Which tells us that the same data in some cases are put in a readonly section and in other cases not. And when we force data for tow different variables where gcc thinks one is const and the other is not const to the same section gcc errros out with the "section type conflict" error. And this is becoming increasingly visible when people start to constify the data all around and do test build on x86 64bit that does not exhibit this behaviour. The rationale behind the increased constification of data is to get improved use of the DEBUG_RODATA thing. Another good reason s that this is a good way to let gcc catch accidental writes to data that otherwise should have been read-only. But if we advocate for constification of data than we should have a reliable way to detect the section type conflict errors on x86 (at least 64 bit) which we do not have. Missing that will casue us to see an increasing flood of error reports from our power pc and ia64 builders. The rationale behind __devinitconst was to create a dedicated section for data marked read-only by gcc and thus avoiding the section type conflict. But as shown by the above code snippet this is not easy. For x86 (32 + 64bit) both variables end up in READ-ONLY section. For Powerpc 64 bit the variable bar end up in a read-write section. And I see no way to check this for a x86 build so we warn early and with the most widely used tool-chain. So do we have other options that to drop the constification and thus dropping the __devinitconst and the other __*const annotations - I think not :-( Sam -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 1/7] typhoon section fix
On Fri, 2008-02-08 at 09:52 -0800, Andrew Morton wrote: > On Fri, 08 Feb 2008 08:59:10 -0500 David Dillow <[EMAIL PROTECTED]> wrote: > > On Fri, 2008-02-08 at 03:11 -0800, [EMAIL PROTECTED] wrote: > > > From: Andrew Morton <[EMAIL PROTECTED]> > > > > > > gcc-3.4.4 on powerpc: > > > > > > drivers/net/typhoon.c:137: error: version causes a section type conflict > > > > > > Cc: Jeff Garzik <[EMAIL PROTECTED]> > > > Cc: Sam Ravnborg <[EMAIL PROTECTED]> > > > Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> > > > > > -static const char version[] __devinitdata = > > > +static char version[] __devinitdata = > > > "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE > > > ")\n"; > > > > Wouldn't going to __devinitconst be better? I'll try to whip up a patch > > and test-compile it. > > Sam told me that doesn't work right, that this approach is the one to use > and, iirc, that __devinitcont and friends will be removed. > > I'm not sure why, actually. I think I missed that dicussion. Thanks for the searchable terms -- this is the thread, I think: http://lkml.org/lkml/2008/2/3/99 It looks like Jan had an idea to fold the const into the __devinitconst marker, and if that seems to be viable, then I'd prefer that route to keep the const'ness where it is possible. Otherwise, your patch is fine as-is. Acked-by: David Dillow <[EMAIL PROTECTED]> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: oops with ipcomp
On Fri, Feb 08, 2008 at 11:45:33AM +0100, Beschorner Daniel wrote: > > No I meant the exact output of ip x p and ip x s. > > I know, but as I end up every time with a tainted kernel on our > production server I didn't turn ipcomp on, but now I got it. Hmm, that's pretty much what I've got (but I'm on 32-bit still). Does every packet from A trigger the crash? Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [NET/IPv6] Race condition with flow_cache_genid?
Kyle Moffett <[EMAIL PROTECTED]> wrote: > > Basically either there is some missing locking here or it does not > need to be "atomic_t". Judging from the way it *appears* to be used > to check if cache entries are up-to-date with the latest changes in > policy, I would guess the former. You're right that it doesn't really have to be an atomic since all the writers are from xfrm currently. However, the fact that it is atomic is used by the current code since sometimes they increment the value without holding the xfrm policy lock. Yes it is racy but that is fine for the purpose that this variable serves. All it does is to make sure that extant flow objects get killed at some point after the increment. There is absolutely no requirement that the killing be immediate or synchronised. Cheers, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: ipv6_chk_acast_addr remove unused loop
David Stevens wrote: NACK. Daniel, This code is part of the in-kernel API for anycast, which is intended to be the same as for multicast. By removing support for NULL there, you're making a special case for the anycast code that isn't there in the multicast code (can't support a NULL dev), and you really aren't buying all that much for it. I was hesitating to send this patch exactly for the reason you are explaining. Apparently I did the bad choice :) Thanks. -- Daniel -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 1/7] typhoon section fix
On Fri, 08 Feb 2008 08:59:10 -0500 David Dillow <[EMAIL PROTECTED]> wrote: > > On Fri, 2008-02-08 at 03:11 -0800, [EMAIL PROTECTED] wrote: > > From: Andrew Morton <[EMAIL PROTECTED]> > > > > gcc-3.4.4 on powerpc: > > > > drivers/net/typhoon.c:137: error: version causes a section type conflict > > > > Cc: Jeff Garzik <[EMAIL PROTECTED]> > > Cc: Sam Ravnborg <[EMAIL PROTECTED]> > > Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> > > > -static const char version[] __devinitdata = > > +static char version[] __devinitdata = > > "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; > > Wouldn't going to __devinitconst be better? I'll try to whip up a patch > and test-compile it. Sam told me that doesn't work right, that this approach is the one to use and, iirc, that __devinitcont and friends will be removed. I'm not sure why, actually. I think I missed that dicussion. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: ipv6_chk_acast_addr remove unused loop
NACK. Daniel, This code is part of the in-kernel API for anycast, which is intended to be the same as for multicast. By removing support for NULL there, you're making a special case for the anycast code that isn't there in the multicast code (can't support a NULL dev), and you really aren't buying all that much for it. +-DLS -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: + smack-unlabeled-outgoing-ambient-packets.patch added to -mm tree
> > > -- > > > Subject: Smack: unlabeled outgoing ambient packets > > > From: Casey Schaufler <[EMAIL PROTECTED]> > > > > > > Smack uses CIPSO labeling, but allows for unlabeled packets by > > > specifying an "ambient" label that is applied to incoming > > > unlabeled packets. Because the other end of the connection may > > > dislike IP options, and ssh is one know application that behaves > > > thus ... I forgot to mention this earlier, but RHEL/Fedora/Rawhide has a patched version of SSH (see RH bugzilla #202856 for the discussion/patch) that fixes the problem of IPv4 options causing SSH to reject the connection. It turns out that SSH is being a bit overzealous (rejecting all IPv4 options) in trying to reject source-routed packets. -- paul moore linux security @ hp -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
ipv6_chk_acast_addr remove unused loop
Subject: ipv6_chk_acast_addr remove unused loop From: Daniel Lezcano <[EMAIL PROTECTED]> The ipv6_chk_acast_addr is called with a netdev pointer parameter which can be NULL. This value is used as a wildcard to browse the netdev list and search if a device is owning the address. But when looking closely to the code, this function is only called one time in ndisc.c and the netdev parameter is never NULL. The code browsing the netdev list is pointless in this case. This patch removes netdev list browsing code. Signed-off-by: Daniel Lezcano <[EMAIL PROTECTED]> --- net/ipv6/anycast.c | 22 +- 1 file changed, 1 insertion(+), 21 deletions(-) Index: net-2.6-fixes/net/ipv6/anycast.c === --- net-2.6-fixes.orig/net/ipv6/anycast.c +++ net-2.6-fixes/net/ipv6/anycast.c @@ -401,7 +401,7 @@ static int ipv6_dev_ac_dec(struct net_de /* * check if the interface has this anycast address */ -static int ipv6_chk_acast_dev(struct net_device *dev, struct in6_addr *addr) +int ipv6_chk_acast_addr(struct net_device *dev, struct in6_addr *addr) { struct inet6_dev *idev; struct ifacaddr6 *aca; @@ -419,26 +419,6 @@ static int ipv6_chk_acast_dev(struct net return 0; } -/* - * check if given interface (or any, if dev==0) has this anycast address - */ -int ipv6_chk_acast_addr(struct net_device *dev, struct in6_addr *addr) -{ - int found = 0; - - if (dev) - return ipv6_chk_acast_dev(dev, addr); - read_lock(&dev_base_lock); - for_each_netdev(&init_net, dev) - if (ipv6_chk_acast_dev(dev, addr)) { - found = 1; - break; - } - read_unlock(&dev_base_lock); - return found; -} - - #ifdef CONFIG_PROC_FS struct ac6_iter_state { struct net_device *dev;
[PATCH 2.6.24] pcnet32: Use print_mac
Signed-off-by: Joe Perches <[EMAIL PROTECTED]> Acked-by: Don Fry <[EMAIL PROTECTED]> --- Originally sent by Joe Dec 14, 2007 Tested by Don on amd_64 --- linux-2.6.24-git13/drivers/net/orig.pcnet32.c 2008-02-04 10:05:48.0 -0800 +++ linux-2.6.24-git18/drivers/net/pcnet32.c2008-02-04 10:59:08.0 -0800 @@ -1774,8 +1774,8 @@ pcnet32_probe1(unsigned long ioaddr, int memset(dev->dev_addr, 0, sizeof(dev->dev_addr)); if (pcnet32_debug & NETIF_MSG_PROBE) { - for (i = 0; i < 6; i++) - printk(" %2.2x", dev->dev_addr[i]); + DECLARE_MAC_BUF(mac); + printk(" %s", print_mac(mac, dev->dev_addr)); /* Version 0x2623 and 0x2624 */ if (((chip_version + 1) & 0xfffe) == 0x2624) { -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [IPV6]: dst_entry leak in ip4ip6_err.
The result of the ip_route_output is not assigned to skb. This means that - it is leaked - possible OOPS below dereferrencing skb->dst - no ICMP message for this case Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]> --- net/ipv6/ip6_tunnel.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 9031e52..cd94064 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c @@ -550,6 +550,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ip_rt_put(rt); goto out; } + skb2->dst = (struct dst_entry *)rt; } else { ip_rt_put(rt); if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, -- 1.5.3.rc5 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [XFRM] Beet: Fix output for ipv6
Hi, This patch fixes the ipv6 mode of ipsec beet. It has been using logic similar to tunnel mode, making it crash during esp packaging. Signed-off-by: Joakim Koskela <[EMAIL PROTECTED]> --- net/ipv6/xfrm6_mode_beet.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/net/ipv6/xfrm6_mode_beet.c b/net/ipv6/xfrm6_mode_beet.c index 0527d11..0395800 100644 --- a/net/ipv6/xfrm6_mode_beet.c +++ b/net/ipv6/xfrm6_mode_beet.c @@ -40,11 +40,14 @@ static void xfrm6_beet_make_header(struct sk_buff *skb) static int xfrm6_beet_output(struct xfrm_state *x, struct sk_buff *skb) { struct ipv6hdr *top_iph; + u8 *prevhdr; + int hdr_len; + hdr_len = x->type->hdr_offset(x, skb, &prevhdr); + skb_set_mac_header(skb, (prevhdr - x->props.header_len) - skb->data); skb_set_network_header(skb, -x->props.header_len); - skb->mac_header = skb->network_header + - offsetof(struct ipv6hdr, nexthdr); - skb->transport_header = skb->network_header + sizeof(*top_iph); + skb->transport_header = skb->network_header + hdr_len; + __skb_pull(skb, hdr_len); xfrm6_beet_make_header(skb); -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
2.6.24?: WARNING: at net/core/dev.c: skb_gso_segment()
FYI, this happened several times with OpenVZ kernel here, though one user reported against v2.6.24 but without calltrace: http://marc.info/?l=linux-kernel&m=120155594432027&w=2 Anyway... Driver is tg3. [ 403.240511] WARNING: at net/core/dev.c:1407 skb_gso_segment() if (WARN_ON(skb->ip_summed != CHECKSUM_PARTIAL)) { [ 403.240653] Pid: 6114, comm: bash Tainted: G M2.6.24-openvz #30 [ 403.240779] [ 403.240781] Call Trace: [ 403.240987][] skb_gso_segment+0x19b/0x250 [ 403.241194] [] dev_hard_start_xmit+0x219/0x2d0 [ 403.241318] [] dev_queue_xmit+0x2b5/0x370 [ 403.241440] [] ip_queue_xmit+0x323/0x4c0 [ 403.241565] [] init_object+0x89/0xa0 [ 403.241684] [] __slab_alloc+0x394/0x3f0 [ 403.241805] [] tso_fragment+0x7d/0x260 [ 403.241927] [] tso_fragment+0x7d/0x260 [ 403.242048] [] tcp_transmit_skb+0x526/0x950 [ 403.242170] [] tso_fragment+0x168/0x260 [ 403.242290] [] __tcp_push_pending_frames+0x145/0x9a0 [ 403.242415] [] __slab_free+0x9c/0x2d0 [ 403.242533] [] tcp_rcv_established+0x481/0x880 [ 403.242657] [] tcp_rcv_established+0x4a1/0x880 [ 403.242783] [] tcp_v4_do_rcv+0x3ab/0x790 [ 403.242904] [] ip_route_input+0x153/0x1200 [ 403.243044] [] tcp_v4_rcv+0xa0d/0xb60 [ 403.243165] [] ip_local_deliver_finish+0xfd/0x2c0 [ 403.243288] [] ip_rcv_finish+0x128/0x4a0 [ 403.243409] [] netif_receive_skb+0x2e6/0x390 [ 403.243531] [] process_backlog+0x85/0xf0 [ 403.243654] [] net_rx_action+0x170/0x200 [ 403.243777] [] __do_softirq+0xb9/0x160 [ 403.243898] [] call_softirq+0x1c/0x30 [ 403.244017] [] do_softirq+0x55/0xb0 [ 403.244134] [] irq_exit+0xe5/0xf0 [ 403.244252] [] do_IRQ+0x80/0x100 [ 403.244368] [] ret_from_intr+0x0/0xf [ 403.244489] -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ipvs: Make the synchronization interval controllable
On Fri, 8 Feb 2008, Andi Kleen wrote: Sven Wegener <[EMAIL PROTECTED]> writes: The default synchronization interval of 1000 milliseconds is too high for a heavily loaded director. Collecting the connection information from one second and then sending it out in a burst will overflow the socket buffer and lead to synchronization information being dropped. Make the interval controllable by a sysctl variable so that users can tune it. It would be better if the defaults just worked under all circumstances. So why not just lower the default? Or the code could detect overflowing socket buffers and lower the value dynamically. We can also start sending when amount of data reaches defined level. Best regards, Krzysztof Olędzki
Re: [patch 1/2] qeth: new qeth device driver
On Fri, Feb 08, 2008 at 03:10:00PM +0100, [EMAIL PROTECTED] wrote: > From: Frank Blaschka <[EMAIL PROTECTED]> > > List of major changes and improvements: > no manipulation of the global ARP constructor > clean code split into core, layer 2 and layer 3 functionality > better exploitation of the ethtool interface > better representation of the various hardware capabilities > fix packet socket support (tcpdump), no fake_ll required > osasnmpd notification via udev events > coding style and beautification One question below... > Signed-off-by: Frank Blaschka <[EMAIL PROTECTED]> > --- [ . . . ] > +static void qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short > vid) > +{ > + struct net_device *vlandev; > + struct qeth_card *card = (struct qeth_card *) dev->priv; > + struct in_device *in_dev; > + > + if (card->info.type == QETH_CARD_TYPE_IQD) > + return; > + > + vlandev = vlan_group_get_device(card->vlangrp, vid); > + vlandev->neigh_setup = qeth_l3_neigh_setup; > + > + in_dev = __in_dev_get_rcu(vlandev); Is this really in an RCU read-side critical section? Or is this just using common code? Thanx, Paul -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 7/7] pppol2tp: fix printk warnings
[EMAIL PROTECTED] wrote: From: Andrew Morton <[EMAIL PROTECTED]> drivers/net/pppol2tp.c: In function `pppol2tp_seq_tunnel_show': drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 4) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 5) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 6) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 7) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 8) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 9) drivers/net/pppol2tp.c: In function `pppol2tp_seq_session_show': drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 5) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 6) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 7) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 8) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 9) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 10) Not all platforms implement u64 with unsigned long long. eg: powerpc. Cc: Jeff Garzik <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Acked-by: James Chapman <[EMAIL PROTECTED]> -- James Chapman Katalix Systems Ltd http://www.katalix.com Catalysts for your Embedded Linux software development -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2.6.24] pcnet32: use NET_IP_ALIGN instead of 2
Change hard coded 2 to NET_IP_ALIGN. Added new #define with comments. Tested amd_64 Signed-off-by: Don Fry <[EMAIL PROTECTED]> --- --- linux-2.6.24-git13/drivers/net/joe.pcnet32.c2008-02-04 10:59:08.0 -0800 +++ linux-2.6.24-git18/drivers/net/pcnet32.c2008-02-08 07:20:44.0 -0800 @@ -174,7 +174,11 @@ static int homepna[MAX_UNITS]; #define RX_RING_SIZE (1 << (PCNET32_LOG_RX_BUFFERS)) #define RX_MAX_RING_SIZE (1 << (PCNET32_LOG_MAX_RX_BUFFERS)) -#define PKT_BUF_SZ 1544 +#define PKT_BUF_SKB1544 +/* actual buffer length after being aligned */ +#define PKT_BUF_SIZE (PKT_BUF_SKB - NET_IP_ALIGN) +/* chip wants twos complement of the (aligned) buffer length */ +#define NEG_BUF_SIZE (NET_IP_ALIGN - PKT_BUF_SKB) /* Offsets from base I/O address. */ #define PCNET32_WIO_RDP0x10 @@ -604,7 +608,7 @@ static void pcnet32_realloc_rx_ring(stru /* now allocate any new buffers needed */ for (; new < size; new++ ) { struct sk_buff *rx_skbuff; - new_skb_list[new] = dev_alloc_skb(PKT_BUF_SZ); + new_skb_list[new] = dev_alloc_skb(PKT_BUF_SKB); if (!(rx_skbuff = new_skb_list[new])) { /* keep the original lists and buffers */ if (netif_msg_drv(lp)) @@ -613,20 +617,20 @@ static void pcnet32_realloc_rx_ring(stru dev->name); goto free_all_new; } - skb_reserve(rx_skbuff, 2); + skb_reserve(rx_skbuff, NET_IP_ALIGN); new_dma_addr_list[new] = pci_map_single(lp->pci_dev, rx_skbuff->data, - PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); + PKT_BUF_SIZE, PCI_DMA_FROMDEVICE); new_rx_ring[new].base = cpu_to_le32(new_dma_addr_list[new]); - new_rx_ring[new].buf_length = cpu_to_le16(2 - PKT_BUF_SZ); + new_rx_ring[new].buf_length = cpu_to_le16(NEG_BUF_SIZE); new_rx_ring[new].status = cpu_to_le16(0x8000); } /* and free any unneeded buffers */ for (; new < lp->rx_ring_size; new++) { if (lp->rx_skbuff[new]) { pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[new], -PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); +PKT_BUF_SIZE, PCI_DMA_FROMDEVICE); dev_kfree_skb(lp->rx_skbuff[new]); } } @@ -651,7 +655,7 @@ static void pcnet32_realloc_rx_ring(stru for (; --new >= lp->rx_ring_size; ) { if (new_skb_list[new]) { pci_unmap_single(lp->pci_dev, new_dma_addr_list[new], -PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); +PKT_BUF_SIZE, PCI_DMA_FROMDEVICE); dev_kfree_skb(new_skb_list[new]); } } @@ -678,7 +682,7 @@ static void pcnet32_purge_rx_ring(struct wmb(); /* Make sure adapter sees owner change */ if (lp->rx_skbuff[i]) { pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[i], -PKT_BUF_SZ - 2, PCI_DMA_FROMDEVICE); +PKT_BUF_SIZE, PCI_DMA_FROMDEVICE); dev_kfree_skb_any(lp->rx_skbuff[i]); } lp->rx_skbuff[i] = NULL; @@ -1201,7 +1205,7 @@ static void pcnet32_rx_entry(struct net_ pkt_len = (le32_to_cpu(rxp->msg_length) & 0xfff) - 4; /* Discard oversize frames. */ - if (unlikely(pkt_len > PKT_BUF_SZ - 2)) { + if (unlikely(pkt_len > PKT_BUF_SIZE)) { if (netif_msg_drv(lp)) printk(KERN_ERR "%s: Impossible packet size %d!\n", dev->name, pkt_len); @@ -1218,26 +1222,26 @@ static void pcnet32_rx_entry(struct net_ if (pkt_len > rx_copybreak) { struct sk_buff *newskb; - if ((newskb = dev_alloc_skb(PKT_BUF_SZ))) { - skb_reserve(newskb, 2); + if ((newskb = dev_alloc_skb(PKT_BUF_SKB))) { + skb_reserve(newskb, NET_IP_ALIGN); skb = lp->rx_skbuff[entry]; pci_unmap_single(lp->pci_dev, lp->rx_dma_addr[entry], -PKT_BUF_SZ - 2, +PKT_BUF_SIZE, PCI_DMA_FROMDEVICE); skb_put(skb, pkt_len); lp->rx_skbuff[entry] = newskb; lp->rx_dma_addr[entry] =
Re: [PATCH 2/2][SCTP]: Convert sctp_dbg_objcnt to seq files.
Pavel Emelyanov wrote: This makes the code use a good proc API and the text ~50 bytes shorter. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Acked-by: Vlad Yasevich <[EMAIL PROTECTED]> --- net/sctp/objcnt.c | 85 +++- 1 files changed, 44 insertions(+), 41 deletions(-) diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c index 2cf6ad6..2b9ac00 100644 --- a/net/sctp/objcnt.c +++ b/net/sctp/objcnt.c @@ -80,61 +80,64 @@ static sctp_dbg_objcnt_entry_t sctp_dbg_objcnt[] = { /* Callback from procfs to read out objcount information. * Walk through the entries in the sctp_dbg_objcnt array, dumping * the raw object counts for each monitored type. - * - * This code was modified from similar code in route.c */ -static int sctp_dbg_objcnt_read(char *buffer, char **start, off_t offset, - int length, int *eof, void *data) +static int sctp_objcnt_seq_show(struct seq_file *seq, void *v) { - int len = 0; - off_t pos = 0; - int entries; int i; char temp[128]; - /* How many entries? */ - entries = ARRAY_SIZE(sctp_dbg_objcnt); - - /* Walk the entries and print out the debug information -* for proc fs. -*/ - for (i = 0; i < entries; i++) { - pos += 128; - - /* Skip ahead. */ - if (pos <= offset) { - len = 0; - continue; - } - /* Print out each entry. */ - sprintf(temp, "%s: %d", - sctp_dbg_objcnt[i].label, - atomic_read(sctp_dbg_objcnt[i].counter)); - - sprintf(buffer + len, "%-127s\n", temp); - len += 128; - if (pos >= offset+length) - goto done; - } - -done: - *start = buffer + len - (pos - offset); - len = pos - offset; - if (len > length) - len = length; - - return len; + i = (int)*(loff_t *)v; + sprintf(temp, "%s: %d", sctp_dbg_objcnt[i].label, + atomic_read(sctp_dbg_objcnt[i].counter)); + seq_printf(seq, "%-127s\n", temp); + return 0; +} + +static void *sctp_objcnt_seq_start(struct seq_file *seq, loff_t *pos) +{ + return (*pos >= ARRAY_SIZE(sctp_dbg_objcnt)) ? NULL : (void *)pos; +} + +static void sctp_objcnt_seq_stop(struct seq_file *seq, void *v) +{ +} + +static void * sctp_objcnt_seq_next(struct seq_file *seq, void *v, loff_t *pos) +{ + ++*pos; + return (*pos >= ARRAY_SIZE(sctp_dbg_objcnt)) ? NULL : (void *)pos; } +static const struct seq_operations sctp_objcnt_seq_ops = { + .start = sctp_objcnt_seq_start, + .next = sctp_objcnt_seq_next, + .stop = sctp_objcnt_seq_stop, + .show = sctp_objcnt_seq_show, +}; + +static int sctp_objcnt_seq_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &sctp_objcnt_seq_ops); +} + +static const struct file_operations sctp_objcnt_ops = { + .open= sctp_objcnt_seq_open, + .read= seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + /* Initialize the objcount in the proc filesystem. */ void sctp_dbg_objcnt_init(void) { struct proc_dir_entry *ent; - ent = create_proc_read_entry("sctp_dbg_objcnt", 0, proc_net_sctp, - sctp_dbg_objcnt_read, NULL); + + ent = create_proc_entry("sctp_dbg_objcnt", 0, proc_net_sctp); if (!ent) printk(KERN_WARNING "sctp_dbg_objcnt: Unable to create /proc entry.\n"); + else + ent->proc_fops = &sctp_objcnt_ops; } /* Cleanup the objcount entry in the proc filesystem. */ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2][SCTP]: Use snmp_fold_field instead of a homebrew analogue.
Pavel Emelyanov wrote: SCPT already depends in INET, so this doesn't create additional dependencies. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> Acked-by: Vlad Yasevich <[EMAIL PROTECTED]> --- net/sctp/proc.c | 23 ++- 1 files changed, 2 insertions(+), 21 deletions(-) diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 2499732..974350b 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c @@ -38,6 +38,7 @@ #include #include #include +#include /* for snmp_fold_field */ static struct snmp_mib sctp_snmp_list[] = { SNMP_MIB_ITEM("SctpCurrEstab", SCTP_MIB_CURRESTAB), @@ -75,26 +76,6 @@ static struct snmp_mib sctp_snmp_list[] = { SNMP_MIB_SENTINEL }; -/* Return the current value of a particular entry in the mib by adding its - * per cpu counters. - */ -static unsigned long -fold_field(void *mib[], int nr) -{ - unsigned long res = 0; - int i; - - for_each_possible_cpu(i) { - res += - *((unsigned long *) (((void *) per_cpu_ptr(mib[0], i)) + -sizeof (unsigned long) * nr)); - res += - *((unsigned long *) (((void *) per_cpu_ptr(mib[1], i)) + -sizeof (unsigned long) * nr)); - } - return res; -} - /* Display sctp snmp mib statistics(/proc/net/sctp/snmp). */ static int sctp_snmp_seq_show(struct seq_file *seq, void *v) { @@ -102,7 +83,7 @@ static int sctp_snmp_seq_show(struct seq_file *seq, void *v) for (i = 0; sctp_snmp_list[i].name != NULL; i++) seq_printf(seq, "%-32s\t%ld\n", sctp_snmp_list[i].name, - fold_field((void **)sctp_statistics, + snmp_fold_field((void **)sctp_statistics, sctp_snmp_list[i].entry)); return 0; -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ipvs: Make the synchronization interval controllable
Sven Wegener <[EMAIL PROTECTED]> writes: > The default synchronization interval of 1000 milliseconds is too high for a > heavily loaded director. Collecting the connection information from one second > and then sending it out in a burst will overflow the socket buffer and lead to > synchronization information being dropped. Make the interval controllable by a > sysctl variable so that users can tune it. It would be better if the defaults just worked under all circumstances. So why not just lower the default? Or the code could detect overflowing socket buffers and lower the value dynamically. -Andi -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] Reg Review of changes flush all routing table entries in side kernel
Problem : Need to clean up routing table entries in side the Linux kernel. But kernel is not providing single command to clear all routing table entries at once. Modified the kernel to take of the changesDefined new net link message under NETLINK_ROUTE family RTM_FLUSHROUTE. At the receiving end in side kernel, removed all routing table entries related with each device. Changed the code so that only the corresponding device reference will be incremented and perform the flush of entries related to that device and reduce the reference count. In side fib_sync_flush(This function is same as fib_sync_down, except that checking for protocol) , checking whether the route entry is installed by protocol, and marking them only as dead. These are the changes . (2.6-18 linux kernel) --- linux26/include/net/ip_fib.h 2008-01-04 04:41:45.326857000 -0800 +++ linux26/include/net/modified_ip_fib.h 2008-01-21 04:46:55.0 -0800 @@ -233,6 +233,9 @@ extern void ip_fib_init(void); +extern int inet_rtm_flushroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg); +extern int fib_sync_flush(u32 local, struct net_device *dev, int force, int protocol); --- linux26/include/linux/rtnetlink.h 2008-01-04 02:57:57.487754000 -0800 +++ linux26/include/linux/modified_rtnetlink.h 2008-01-21 04:46:56.0 -0800 @@ -35,7 +35,11 @@ enum { #define RTM_DELROUTE RTM_DELROUTE RTM_GETROUTE, #define RTM_GETROUTE RTM_GETROUTE - +RTM_FLUSHROUTE, +#define RTM_FLUSHROUTE RTM_FLUSHROUTE + RTM_NEWNEIGH= 28, #define RTM_NEWNEIGH RTM_NEWNEIGH RTM_DELNEIGH, @@ -199,7 +203,9 @@ enum ~ --- linux26/net/ipv4/fib_frontend.c 2008-01-04 03:07:17.964607000 -0800 +++ linux26/net/ipv4/modified_fib_frontend.c2008-01-21 04:46:53.0 -0800 +/* + * Added For flushing all the routes when clear ip route is issued from user space + */ +int inet_rtm_flushroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) +{ +struct net_device *dev; +struct in_device *in_dev; +struct rtattr **rta = arg; +struct rtmsg *r = NLMSG_DATA(nlh); + +if (inet_check_attr(r, rta)) + return -EINVAL; + +for (dev = dev_base; dev; dev = dev->next) { +in_dev = in_dev_get(dev); +if (!in_dev) +continue; +if(fib_sync_flush(0, dev, 0, r->rtm_protocol)) { +fib_flush(); +rt_cache_flush(0); +} +in_dev_put(in_dev); +} + +return 0; +} This fib_sync_flush is same as fib_sync_down, except for each entry it compares the protocol type of the routing entry to be removed. --- linux26/net/ipv4/fib_semantics.c2008-01-09 02:22:49.819492000 -0800 +++ linux26/net/ipv4/modified_fib_semantics.c1 2008-01-21 04:46:52.0 -0800 +/* + * FLUSH all the routing table entries related to a + * device + */ + +int fib_sync_flush(u32 local, struct net_device *dev, int force, int protocol) +{ +int ret = 0; +int scope = RT_SCOPE_NOWHERE; + +if (force) +scope = -1; + +if (local && fib_info_laddrhash) { +unsigned int hash = fib_laddr_hashfn(local); +struct hlist_head *head = &fib_info_laddrhash[hash]; +struct hlist_node *node; +struct fib_info *fi; +hlist_for_each_entry(fi, node, head, fib_lhash) { +if (fi->fib_prefsrc == local) { +fi->fib_flags |= RTNH_F_DEAD; +ret++; +} +} +} + +if (dev) { +struct fib_info *prev_fi = NULL; +unsigned int hash = fib_devindex_hashfn(dev->ifindex); +struct hlist_head *head = &fib_info_devhash[hash]; +struct hlist_node *node; +struct fib_nh *nh; +hlist_for_each_entry(nh, node, head, nh_hash) { +struct fib_info *fi = nh->nh_parent; +if(fi->fib_protocol == protocol) { +int dead; +BUG_ON(!fi->fib_nhs); +if (nh->nh_dev != dev || fi == prev_fi) +continue; +prev_fi = fi; +dead = 0; +change_nexthops(fi) { +if (nh->nh_flags&RTNH_F_DEAD) +dead++; +else if (nh->nh_dev == dev && +nh->nh_scope != scope) { +nh->nh_flags |= RTNH_F_DEAD; +#ifdef CONFIG_IP_ROUTE_MULTIPATH +spin_lock_bh(&fib_multipath_lock); +fi->fib_power -= nh->nh_power; +nh->nh_power = 0; +spin_unlock_bh(&fib_multipath_lock); +#endif +dead++; +} +#ifdef CONFIG_IP_ROUTE_MULTIPATH +if (force > 1 && nh->nh_dev == dev) { +dead = fi->fib_nhs; +break; +} +#endif +} endfor_nexthops(fi) +if (dead == fi->fib_nhs) { + fi->fib_flags
[patch 0/2] s390: new qeth driver for 2.6.25
-- Jeff, the following patch set is intended for 2.6.25. It contains a new qeth device driver implementation separating the layer 2 from the layer 3 functions. There are also some new functions and bug fixes. Kconfig and Makefile apply on top of the latest patch Ursula Braun send for ctc. Regards, Frank Blaschka -- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [IGMP]: Optimize kfree_skb in igmp_rcv.
Merge error paths inside igmp_rcv. Signed-off-by: Denis V. Lunev <[EMAIL PROTECTED]> --- net/ipv4/igmp.c | 13 ++--- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index fe2e6cd..d3f34a7 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c @@ -922,13 +922,11 @@ int igmp_rcv(struct sk_buff *skb) struct in_device *in_dev = in_dev_get(skb->dev); int len = skb->len; - if (in_dev==NULL) { - kfree_skb(skb); - return 0; - } + if (in_dev == NULL) + goto drop; if (!pskb_may_pull(skb, sizeof(struct igmphdr))) - goto drop; + goto drop_ref; switch (skb->ip_summed) { case CHECKSUM_COMPLETE: @@ -938,7 +936,7 @@ int igmp_rcv(struct sk_buff *skb) case CHECKSUM_NONE: skb->csum = 0; if (__skb_checksum_complete(skb)) - goto drop; + goto drop_ref; } ih = igmp_hdr(skb); @@ -972,8 +970,9 @@ int igmp_rcv(struct sk_buff *skb) break; } -drop: +drop_ref: in_dev_put(in_dev); +drop: kfree_skb(skb); return 0; } -- 1.5.3.rc5 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [patch 1/7] typhoon section fix
On Fri, 2008-02-08 at 03:11 -0800, [EMAIL PROTECTED] wrote: > From: Andrew Morton <[EMAIL PROTECTED]> > > gcc-3.4.4 on powerpc: > > drivers/net/typhoon.c:137: error: version causes a section type conflict > > Cc: Jeff Garzik <[EMAIL PROTECTED]> > Cc: Sam Ravnborg <[EMAIL PROTECTED]> > Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> > -static const char version[] __devinitdata = > +static char version[] __devinitdata = > "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; Wouldn't going to __devinitconst be better? I'll try to whip up a patch and test-compile it. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
openswan broken between 2.6.24rc8 and final
Hi, Since I updated a system here from 2.6.24rc8 (+ some unrelated patches) to 2.6.24 openswan in tunnel mode is rather unhappy now. It works initially for a few minutes, but then when it comes to renew a key (I think) the connection always hangs. This means on 2.6.24-final the kernel can now finally reboot again with active ipsec (previously there were always leaked reference counts), but it cannot hold them up for a longer time. I first thought it was caused by commit d4782c323d10d3698b71b6a6b3c7bdad33824658 Author: Patrick McHardy <[EMAIL PROTECTED]> Date: Sun Jan 20 17:24:29 2008 -0800 [AF_KEY]: Fix skb leak on pfkey_send_migrate() error but when I just revert just this patch it still doesn't work (and obviously the reboot problem is back) Before I do a full bisect; is there already a fix for this? Thanks, -Andi -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [NETNS] Remove unused member (dst_net) of dst_ops.
From: Daniel Lezcano <[EMAIL PROTECTED]> Date: Fri, 08 Feb 2008 13:33:49 +0100 > Denis V. Lunev wrote: > > This has been added by the Daniel Lezcano <[EMAIL PROTECTED]> in the > > commit d4fa26ff44e31c2636a985e3092e2cd55d8045de. It looks to me a > > preparatory staff for IPv6 namespacing. > > > > I think this is not needed in 2.6.25 but will be required in 2.6.26 > > very soon. > > Yes, this is right, I posted this one just before sending ipv6 routing. > Unfortunately, I posted ipv6 routing per namespace when net-2.6.25 closed. > > We can remove it for net-2.6 and I can repost it for net-2.6.26, if you > want. Or we can just keep it ... Let's just keep it in there for now. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [NETNS] Remove unused member (dst_net) of dst_ops.
Denis V. Lunev wrote: This has been added by the Daniel Lezcano <[EMAIL PROTECTED]> in the commit d4fa26ff44e31c2636a985e3092e2cd55d8045de. It looks to me a preparatory staff for IPv6 namespacing. I think this is not needed in 2.6.25 but will be required in 2.6.26 very soon. Yes, this is right, I posted this one just before sending ipv6 routing. Unfortunately, I posted ipv6 routing per namespace when net-2.6.25 closed. We can remove it for net-2.6 and I can repost it for net-2.6.26, if you want. Or we can just keep it ... -- Daniel ps : thanks Denis :) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 3/5] netiucv: change name of nop function
From: Ursula Braun <[EMAIL PROTECTED]> Dummy NOP actions for fsm-statemachines have to be defined separately for every using module of fsm-statemachines. Thus the generic name fsm_action_nop is replaced by module specific name netiucv_action_nop. Signed-off-by: Ursula Braun <[EMAIL PROTECTED]> --- drivers/s390/net/netiucv.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux-2.6-uschi/drivers/s390/net/netiucv.c === --- linux-2.6-uschi.orig/drivers/s390/net/netiucv.c +++ linux-2.6-uschi/drivers/s390/net/netiucv.c @@ -573,9 +573,9 @@ static void netiucv_callback_connres(str } /** - * Dummy NOP action for all statemachines + * NOP action for statemachines */ -static void fsm_action_nop(fsm_instance *fi, int event, void *arg) +static void netiucv_action_nop(fsm_instance *fi, int event, void *arg) { } @@ -,7 +,7 @@ static const fsm_node dev_fsm[] = { { DEV_STATE_RUNNING,DEV_EVENT_STOP,dev_action_stop }, { DEV_STATE_RUNNING,DEV_EVENT_CONDOWN, dev_action_conndown }, - { DEV_STATE_RUNNING,DEV_EVENT_CONUP, fsm_action_nop }, + { DEV_STATE_RUNNING,DEV_EVENT_CONUP, netiucv_action_nop }, }; static const int DEV_FSM_LEN = sizeof(dev_fsm) / sizeof(fsm_node); -- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 1/5] claw: removal of volatile variables
From: Ursula Braun <[EMAIL PROTECTED]> Volatile variables queme_switch and pk_delay are not used anyway. They are just a left over from an unused timer based packing logic. Signed-off-by: Ursula Braun <[EMAIL PROTECTED]> --- drivers/s390/net/claw.h |2 -- 1 file changed, 2 deletions(-) Index: linux-2.6-uschi/drivers/s390/net/claw.h === --- linux-2.6-uschi.orig/drivers/s390/net/claw.h +++ linux-2.6-uschi/drivers/s390/net/claw.h @@ -278,8 +278,6 @@ struct claw_env { __u16 write_size; /* write buffer size */ __u16 dev_id; /* device ident */ __u8packing;/* are we packing? */ - volatile __u8 queme_switch; /* gate for imed packing */ - volatile unsigned long pk_delay; /* Delay for adaptive packing */ __u8in_use; /* device active flag */ struct net_device *ndev; /* backward ptr to the net dev*/ }; -- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 5/5] claw/lcs/netiucv: check s390dbf level before sprints
From: Peter Tiedemann <[EMAIL PROTECTED]> additional check of s390dbf level results in better performance if the default low debugging level is active. Signed-off-by: Peter Tiedemann <[EMAIL PROTECTED]> Signed-off-by: Ursula Braun <[EMAIL PROTECTED]> --- drivers/s390/net/claw.h| 17 + drivers/s390/net/lcs.h | 16 drivers/s390/net/netiucv.c | 22 -- 3 files changed, 41 insertions(+), 14 deletions(-) Index: linux-2.6-uschi/drivers/s390/net/claw.h === --- linux-2.6-uschi.orig/drivers/s390/net/claw.h +++ linux-2.6-uschi/drivers/s390/net/claw.h @@ -114,11 +114,20 @@ do { \ debug_event(claw_dbf_##name,level,(void*)(addr),len); \ } while (0) +/* Allow to sort out low debug levels early to avoid wasted sprints */ +static inline int claw_dbf_passes(debug_info_t *dbf_grp, int level) +{ + return (level <= dbf_grp->level); +} + #define CLAW_DBF_TEXT_(level,name,text...) \ -do { \ - sprintf(debug_buffer, text); \ - debug_text_event(claw_dbf_##name,level, debug_buffer);\ -} while (0) + do { \ + if (claw_dbf_passes(claw_dbf_##name, level)) { \ + sprintf(debug_buffer, text); \ + debug_text_event(claw_dbf_##name, level, \ + debug_buffer); \ + } \ + } while (0) /*** * Define Control Blocks * Index: linux-2.6-uschi/drivers/s390/net/lcs.h === --- linux-2.6-uschi.orig/drivers/s390/net/lcs.h +++ linux-2.6-uschi/drivers/s390/net/lcs.h @@ -16,11 +16,19 @@ do { \ debug_event(lcs_dbf_##name,level,(void*)(addr),len); \ } while (0) +/* Allow to sort out low debug levels early to avoid wasted sprints */ +static inline int lcs_dbf_passes(debug_info_t *dbf_grp, int level) +{ + return (level <= dbf_grp->level); +} + #define LCS_DBF_TEXT_(level,name,text...) \ -do { \ - sprintf(debug_buffer, text); \ - debug_text_event(lcs_dbf_##name,level, debug_buffer);\ -} while (0) + do { \ + if (lcs_dbf_passes(lcs_dbf_##name, level)) { \ + sprintf(debug_buffer, text); \ + debug_text_event(lcs_dbf_##name, level, debug_buffer); \ + } \ + } while (0) /** * sysfs related stuff Index: linux-2.6-uschi/drivers/s390/net/netiucv.c === --- linux-2.6-uschi.orig/drivers/s390/net/netiucv.c +++ linux-2.6-uschi/drivers/s390/net/netiucv.c @@ -97,12 +97,22 @@ MODULE_DESCRIPTION ("Linux for S/390 IUC DECLARE_PER_CPU(char[256], iucv_dbf_txt_buf); -#define IUCV_DBF_TEXT_(name,level,text...) \ - do {\ - char* iucv_dbf_txt_buf = get_cpu_var(iucv_dbf_txt_buf); \ - sprintf(iucv_dbf_txt_buf, text);\ - debug_text_event(iucv_dbf_##name,level,iucv_dbf_txt_buf); \ - put_cpu_var(iucv_dbf_txt_buf); \ +/* Allow to sort out low debug levels early to avoid wasted sprints */ +static inline int iucv_dbf_passes(debug_info_t *dbf_grp, int level) +{ + return (level <= dbf_grp->level); +} + +#define IUCV_DBF_TEXT_(name, level, text...) \ + do { \ + if (iucv_dbf_passes(iucv_dbf_##name, level)) { \ + char* iucv_dbf_txt_buf = \ + get_cpu_var(iucv_dbf_txt_buf); \ + sprintf(iucv_dbf_txt_buf, text); \ + debug_text_event(iucv_dbf_##name, level, \ + iucv_dbf_txt_buf); \ + put_cpu_var(iucv_dbf_txt_buf); \ + } \ } while (0) #define IUCV_DBF_SPRINTF(name,level,text...) \ -- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 4/5] lcs: avoid/reduce unused s390dbf debug areas.
From: Peter Tiedemann <[EMAIL PROTECTED]> Since lcs makes use of 1 debug area only, the number of debug areas is reduced, while the number of pages per area is increased. Signed-off-by: Peter Tiedemann <[EMAIL PROTECTED]> Signed-off-by: Ursula Braun <[EMAIL PROTECTED]> --- drivers/s390/net/lcs.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6-uschi/drivers/s390/net/lcs.c === --- linux-2.6-uschi.orig/drivers/s390/net/lcs.c +++ linux-2.6-uschi/drivers/s390/net/lcs.c @@ -94,7 +94,7 @@ static int lcs_register_debug_facility(void) { lcs_dbf_setup = debug_register("lcs_setup", 2, 1, 8); - lcs_dbf_trace = debug_register("lcs_trace", 2, 2, 8); + lcs_dbf_trace = debug_register("lcs_trace", 4, 1, 8); if (lcs_dbf_setup == NULL || lcs_dbf_trace == NULL) { PRINT_ERR("Not enough memory for debug facility.\n"); lcs_unregister_debug_facility(); -- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 0/5] s390: claw/lcs/netiucv network driver patches for 2.6.25
-- Jeff, The following patches are intended for 2.6.25. They affect the s390 network drivers claw, lcs, and netiucv. Patch summary: claw:remove unused volatile variables netiucv: define module owner in device_driver structure netiucv: renaming of NOP action lcs: improvement for debug area setup claw/lcs/netiucv: optimize a debugging macro Regards, Ursula Braun -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2/5] netiucv: Remember to set driver->owner.
From: Cornelia Huck <[EMAIL PROTECTED]> Signed-off-by: Cornelia Huck <[EMAIL PROTECTED]> Signed-off-by: Ursula Braun <[EMAIL PROTECTED]> --- drivers/s390/net/netiucv.c |1 + 1 file changed, 1 insertion(+) Index: linux-2.6-uschi/drivers/s390/net/netiucv.c === --- linux-2.6-uschi.orig/drivers/s390/net/netiucv.c +++ linux-2.6-uschi/drivers/s390/net/netiucv.c @@ -137,6 +137,7 @@ PRINT_##importance(header "%02x %02x %02 #define PRINTK_HEADER " iucv: " /* for debugging */ static struct device_driver netiucv_driver = { + .owner = THIS_MODULE, .name = "netiucv", .bus = &iucv_bus, }; -- -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2][KEY]: Convert net/pfkey to use seq files.
The seq files API disposes the caller of the difficulty of checking file position, the length of data to produce and the size of provided buffer. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- net/key/af_key.c | 94 + 1 files changed, 58 insertions(+), 36 deletions(-) diff --git a/net/key/af_key.c b/net/key/af_key.c index 162fcea..9793511 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -3734,21 +3734,15 @@ static struct net_proto_family pfkey_family_ops = { }; #ifdef CONFIG_PROC_FS -static int pfkey_read_proc(char *buffer, char **start, off_t offset, - int length, int *eof, void *data) +static int pfkey_seq_show(struct seq_file *f, void *v) { - off_t pos = 0; - off_t begin = 0; - int len = 0; struct sock *s; - struct hlist_node *node; - - len += sprintf(buffer,"sk RefCnt Rmem Wmem User Inode\n"); - - read_lock(&pfkey_table_lock); - - sk_for_each(s, node, &pfkey_table) { - len += sprintf(buffer+len,"%p %-6d %-6u %-6u %-6u %-6lu", + + s = (struct sock *)v; + if (v == SEQ_START_TOKEN) + seq_printf(f ,"sk RefCnt Rmem Wmem User Inode\n"); + else + seq_printf(f ,"%p %-6d %-6u %-6u %-6u %-6lu\n", s, atomic_read(&s->sk_refcnt), atomic_read(&s->sk_rmem_alloc), @@ -3756,40 +3750,68 @@ static int pfkey_read_proc(char *buffer, char **start, off_t offset, sock_i_uid(s), sock_i_ino(s) ); + return 0; +} - buffer[len++] = '\n'; +static void *pfkey_seq_start(struct seq_file *f, loff_t *ppos) +{ + struct sock *s; + struct hlist_node *node; + loff_t pos = *ppos; - pos = begin + len; - if (pos < offset) { - len = 0; - begin = pos; - } - if(pos > offset + length) - goto done; - } - *eof = 1; + read_lock(&pfkey_table_lock); + if (pos == 0) + return SEQ_START_TOKEN; -done: - read_unlock(&pfkey_table_lock); + sk_for_each(s, node, &pfkey_table) + if (pos-- == 1) + return s; - *start = buffer + (offset - begin); - len -= (offset - begin); + return NULL; +} - if (len > length) - len = length; - if (len < 0) - len = 0; +static void *pfkey_seq_next(struct seq_file *f, void *v, loff_t *ppos) +{ + ++*ppos; + return (v == SEQ_START_TOKEN) ? + sk_head(&pfkey_table) : + sk_next((struct sock *)v); +} + +static void pfkey_seq_stop(struct seq_file *f, void *v) +{ + read_unlock(&pfkey_table_lock); +} + +static struct seq_operations pfkey_seq_ops = { + .start = pfkey_seq_start, + .next = pfkey_seq_next, + .stop = pfkey_seq_stop, + .show = pfkey_seq_show, +}; - return len; +static int pfkey_seq_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &pfkey_seq_ops); } +static struct file_operations pfkey_proc_ops = { + .open= pfkey_seq_open, + .read= seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + static int pfkey_init_proc(void) { - if (create_proc_read_entry("pfkey", 0, init_net.proc_net, - pfkey_read_proc, NULL) == NULL) + struct proc_dir_entry *e; + + e = create_proc_entry("pfkey", 0, init_net.proc_net); + if (e == NULL) return -ENOMEM; - else - return 0; + + e->proc_fops = &pfkey_proc_ops; + return 0; } static void pfkey_exit_proc(void) -- 1.5.3.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2][KEY]: Clean up proc files creation a bit.
Mainly this removes ifdef-s from inside the ipsec_pfkey_init. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- net/key/af_key.c | 35 +++ 1 files changed, 27 insertions(+), 8 deletions(-) diff --git a/net/key/af_key.c b/net/key/af_key.c index 45c3c27..162fcea 100644 --- a/net/key/af_key.c +++ b/net/key/af_key.c @@ -3782,6 +3782,29 @@ done: return len; } + +static int pfkey_init_proc(void) +{ + if (create_proc_read_entry("pfkey", 0, init_net.proc_net, + pfkey_read_proc, NULL) == NULL) + return -ENOMEM; + else + return 0; +} + +static void pfkey_exit_proc(void) +{ + remove_proc_entry("net/pfkey", NULL); +} +#else +static inline int pfkey_init_proc(void) +{ + return 0; +} + +static inline void pfkey_exit_proc(void) +{ +} #endif static struct xfrm_mgr pfkeyv2_mgr = @@ -3798,7 +3821,7 @@ static struct xfrm_mgr pfkeyv2_mgr = static void __exit ipsec_pfkey_exit(void) { xfrm_unregister_km(&pfkeyv2_mgr); - remove_proc_entry("pfkey", init_net.proc_net); + pfkey_exit_proc(); sock_unregister(PF_KEY); proto_unregister(&key_proto); } @@ -3813,21 +3836,17 @@ static int __init ipsec_pfkey_init(void) err = sock_register(&pfkey_family_ops); if (err != 0) goto out_unregister_key_proto; -#ifdef CONFIG_PROC_FS - err = -ENOMEM; - if (create_proc_read_entry("pfkey", 0, init_net.proc_net, pfkey_read_proc, NULL) == NULL) + err = pfkey_init_proc(); + if (err != 0) goto out_sock_unregister; -#endif err = xfrm_register_km(&pfkeyv2_mgr); if (err != 0) goto out_remove_proc_entry; out: return err; out_remove_proc_entry: -#ifdef CONFIG_PROC_FS - remove_proc_entry("net/pfkey", NULL); + pfkey_exit_proc(); out_sock_unregister: -#endif sock_unregister(PF_KEY); out_unregister_key_proto: proto_unregister(&key_proto); -- 1.5.3.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [NETNS] Remove unused member (dst_net) of dst_ops.
This has been added by the Daniel Lezcano <[EMAIL PROTECTED]> in the commit d4fa26ff44e31c2636a985e3092e2cd55d8045de. It looks to me a preparatory staff for IPv6 namespacing. I think this is not needed in 2.6.25 but will be required in 2.6.26 very soon. Regards, Den On Fri, 2008-02-08 at 13:24 +0200, Rami Rosen wrote: > Hi, > This patches removes dst_net member (a pointer to struct net) > of dst_ops (/include/net/dst.h). > > Current network namespace implementation does not use it at all. > > Denis - any comments ? > > > Regards, > Rami Rosen > > > Signed-off-by: Rami Rosen <[EMAIL PROTECTED]> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] Add IPv6 support to TCP SYN cookies
On Thu, Feb 07, 2008 at 02:44:46PM -0500, Ross Vandegrift wrote: > On Wed, Feb 06, 2008 at 09:53:57AM +0100, Andi Kleen wrote: > > That would be useful yes -- for different bandwidths. > > My initial test is end-to-end 1000Mbps, but I've got a few different > packet rates. > > > If the young/old heuristics do not work well enough anymore most > > likely we should try readding RED to the syn queue again. That used > > to be pretty effective in the early days. I don't quite remember why > > Linux didn't end up using it in fact. > > I'm running juno-z with 2, 4, & 8 threads of syn flood to port 80. > wireshark measures 2 threads at 350pps, 4 threads at 750pps, and 8 What's the total bandwidth of the attack? > threads at 1200pps. Under no SYN flood, the server handles 750 HTTP > requests per second, measured via httping in flood mode. Thanks for the tests. Could you please do an additional experiment? Use sch_em or similar to add a jittering longer latency in the connection (as would be realistic in a real distributed DOS). Does it make a difference? > With a default tcp_max_syn_backlog of 1024, I can trivially prevent > any inbound client connections with 2 threads of syn flood. > Enabling tcp_syncookies brings the connection handling back up to 725 > fetches per second. Yes the defaults are probably too low. That's something that should be fixed. > > At these levels the CPU impact of tcp_syncookies is nothing. I can't CPU impact of syncookies was never a concern. The problems are rather missing flow control and disabling of valuable TCP features. > BUG: soft lockup detected on CPU#1! > [] softlockup_tick+0x96/0xa4 > [] update_process_times+0x39/0x5c > [] smp_apic_timer_interrupt+0x5b/0x6c > [] apic_timer_interrupt+0x1f/0x24 > [] taskstats_exit_send+0x152/0x371 > [] netlink_kernel_create+0x5/0x11c > [] reqsk_queue_alloc+0x32/0x81 > [] lock_sock+0x8e/0x96 I think the softirqs are starving user context through the socket lock. Probably should be fixed too. Something like softirq should detect when there is a user and it is looping too long and should give up the lock for some time. -Andi -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [NETNS] Remove unused member (dst_net) of dst_ops.
Hi, This patches removes dst_net member (a pointer to struct net) of dst_ops (/include/net/dst.h). Current network namespace implementation does not use it at all. Denis - any comments ? Regards, Rami Rosen Signed-off-by: Rami Rosen <[EMAIL PROTECTED]> diff --git a/include/net/dst.h b/include/net/dst.h index e3ac7d0..ad06622 100644 --- a/include/net/dst.h +++ b/include/net/dst.h @@ -102,7 +102,6 @@ struct dst_ops atomic_tentries; struct kmem_cache *kmem_cachep; - struct net *dst_net; }; #ifdef __KERNEL__
[patch 4/7] bnx2.c section fix
From: Andrew Morton <[EMAIL PROTECTED]> gcc-3.4.4 on powerpc: drivers/net/bnx2.c:67: error: version causes a section type conflict Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: Sam Ravnborg <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/net/bnx2.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/net/bnx2.c~bnx2c-section-fix drivers/net/bnx2.c --- a/drivers/net/bnx2.c~bnx2c-section-fix +++ a/drivers/net/bnx2.c @@ -64,7 +64,7 @@ /* Time in jiffies before concluding the transmitter is hung. */ #define TX_TIMEOUT (5*HZ) -static const char version[] __devinitdata = +static char version[] __devinitdata = "Broadcom NetXtreme II Gigabit Ethernet Driver " DRV_MODULE_NAME " v" DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; MODULE_AUTHOR("Michael Chan <[EMAIL PROTECTED]>"); @@ -90,7 +90,7 @@ typedef enum { } board_t; /* indexed by board_t, above */ -static const struct { +static struct { char *name; } board_info[] __devinitdata = { { "Broadcom NetXtreme II BCM5706 1000Base-T" }, _ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 3/7] bnx2x section fix
From: Andrew Morton <[EMAIL PROTECTED]> gcc-3.4.4 on powerpc: drivers/net/bnx2x.c:73: error: version causes a section type conflict Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: Sam Ravnborg <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/net/bnx2x.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/net/bnx2x.c~bnx2x-section-fix drivers/net/bnx2x.c --- a/drivers/net/bnx2x.c~bnx2x-section-fix +++ a/drivers/net/bnx2x.c @@ -70,7 +70,7 @@ /* Time in jiffies before concluding the transmitter is hung. */ #define TX_TIMEOUT (5*HZ) -static const char version[] __devinitdata = +static char version[] __devinitdata = "Broadcom NetXtreme II 577xx 10Gigabit Ethernet Driver " DRV_MODULE_NAME " " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; @@ -107,7 +107,7 @@ enum bnx2x_board_type { }; /* indexed by board_t, above */ -static const struct { +static struct { char *name; } board_info[] __devinitdata = { { "Broadcom NetXtreme II BCM57710 XGb" } _ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 6/7] starfire secton fix
From: Andrew Morton <[EMAIL PROTECTED]> gcc-3.4.4 on powerpc: drivers/net/starfire.c:219: error: version causes a section type conflict Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: Sam Ravnborg <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/net/starfire.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/net/starfire.c~starfire-secton-fix drivers/net/starfire.c --- a/drivers/net/starfire.c~starfire-secton-fix +++ a/drivers/net/starfire.c @@ -216,7 +216,7 @@ do { \ /* These identify the driver base version and may not be removed. */ -static const char version[] __devinitdata = +static char version[] = KERN_INFO "starfire.c:v1.03 7/26/2000 Written by Donald Becker <[EMAIL PROTECTED]>\n" KERN_INFO " (unofficial 2.2/2.4 kernel port, version " DRV_VERSION ", " DRV_RELDATE ")\n"; _ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 5/7] via-velocity section fix
From: Andrew Morton <[EMAIL PROTECTED]> gcc-3.4.4 on powerpc: drivers/net/via-velocity.c:443: error: chip_info_table causes a section type conflict on this one I had to remove the __devinitdata too. Don't know why. Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: Sam Ravnborg <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/net/via-velocity.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -puN drivers/net/via-velocity.c~via-velocity-section-fix drivers/net/via-velocity.c --- a/drivers/net/via-velocity.c~via-velocity-section-fix +++ a/drivers/net/via-velocity.c @@ -440,7 +440,7 @@ static void velocity_unregister_notifier * Internal board variants. At the moment we have only one */ -static const struct velocity_info_tbl chip_info_table[] __devinitdata = { +static struct velocity_info_tbl chip_info_table[] = { {CHIP_TYPE_VT6110, "VIA Networking Velocity Family Gigabit Ethernet Adapter", 1, 0x00FFUL}, { } }; _ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 1/7] typhoon section fix
From: Andrew Morton <[EMAIL PROTECTED]> gcc-3.4.4 on powerpc: drivers/net/typhoon.c:137: error: version causes a section type conflict Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: Sam Ravnborg <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/net/typhoon.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -puN drivers/net/typhoon.c~typhoon-section-fix drivers/net/typhoon.c --- a/drivers/net/typhoon.c~typhoon-section-fix +++ a/drivers/net/typhoon.c @@ -134,7 +134,7 @@ static const int multicast_filter_limit #include "typhoon.h" #include "typhoon-firmware.h" -static const char version[] __devinitdata = +static char version[] __devinitdata = "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n"; MODULE_AUTHOR("David Dillow <[EMAIL PROTECTED]>"); @@ -178,7 +178,7 @@ enum typhoon_cards { }; /* directly indexed by enum typhoon_cards, above */ -static const struct typhoon_card_info typhoon_card_info[] __devinitdata = { +static struct typhoon_card_info typhoon_card_info[] __devinitdata = { { "3Com Typhoon (3C990-TX)", TYPHOON_CRYPTO_NONE}, { "3Com Typhoon (3CR990-TX-95)", _ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 2/7] natsemi section fix
From: Andrew Morton <[EMAIL PROTECTED]> gcc-3.4.4 on powerpc: drivers/net/natsemi.c:245: error: natsemi_pci_info causes a section type conflict Cc: Jeff Garzik <[EMAIL PROTECTED]> Cc: Sam Ravnborg <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/net/natsemi.c |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -puN drivers/net/natsemi.c~natsemi-section-fix drivers/net/natsemi.c --- a/drivers/net/natsemi.c~natsemi-section-fix +++ a/drivers/net/natsemi.c @@ -127,7 +127,7 @@ static int full_duplex[MAX_UNITS]; #define NATSEMI_RX_LIMIT 2046/* maximum supported by hardware */ /* These identify the driver base version and may not be removed. */ -static const char version[] __devinitdata = +static char version[] __devinitdata = KERN_INFO DRV_NAME " dp8381x driver, version " DRV_VERSION ", " DRV_RELDATE "\n" KERN_INFO " originally by Donald Becker <[EMAIL PROTECTED]>\n" @@ -238,7 +238,7 @@ enum { }; /* array of board data directly indexed by pci_tbl[x].driver_data */ -static const struct { +static struct { const char *name; unsigned long flags; unsigned int eeprom_size; @@ -247,7 +247,7 @@ static const struct { { "NatSemi DP8381[56]", 0, 24 }, }; -static const struct pci_device_id natsemi_pci_tbl[] __devinitdata = { +static struct pci_device_id natsemi_pci_tbl[] __devinitdata = { { PCI_VENDOR_ID_NS, 0x0020, 0x12d9, 0x000c, 0, 0, 0 }, { PCI_VENDOR_ID_NS, 0x0020, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, { } /* terminate list */ _ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[patch 7/7] pppol2tp: fix printk warnings
From: Andrew Morton <[EMAIL PROTECTED]> drivers/net/pppol2tp.c: In function `pppol2tp_seq_tunnel_show': drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 4) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 5) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 6) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 7) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 8) drivers/net/pppol2tp.c:2295: warning: long long unsigned int format, __u64 arg (arg 9) drivers/net/pppol2tp.c: In function `pppol2tp_seq_session_show': drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 5) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 6) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 7) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 8) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 9) drivers/net/pppol2tp.c:2328: warning: long long unsigned int format, __u64 arg (arg 10) Not all platforms implement u64 with unsigned long long. eg: powerpc. Cc: Jeff Garzik <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> --- drivers/net/pppol2tp.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff -puN drivers/net/pppol2tp.c~pppol2tp-fix-printk-warnings drivers/net/pppol2tp.c --- a/drivers/net/pppol2tp.c~pppol2tp-fix-printk-warnings +++ a/drivers/net/pppol2tp.c @@ -2289,10 +2289,12 @@ static void pppol2tp_seq_tunnel_show(str atomic_read(&tunnel->ref_count) - 1); seq_printf(m, " %08x %llu/%llu/%llu %llu/%llu/%llu\n", tunnel->debug, - tunnel->stats.tx_packets, tunnel->stats.tx_bytes, - tunnel->stats.tx_errors, - tunnel->stats.rx_packets, tunnel->stats.rx_bytes, - tunnel->stats.rx_errors); + (unsigned long long)tunnel->stats.tx_packets, + (unsigned long long)tunnel->stats.tx_bytes, + (unsigned long long)tunnel->stats.tx_errors, + (unsigned long long)tunnel->stats.rx_packets, + (unsigned long long)tunnel->stats.rx_bytes, + (unsigned long long)tunnel->stats.rx_errors); } static void pppol2tp_seq_session_show(struct seq_file *m, void *v) @@ -2320,12 +2322,12 @@ static void pppol2tp_seq_session_show(st jiffies_to_msecs(session->reorder_timeout)); seq_printf(m, " %hu/%hu %llu/%llu/%llu %llu/%llu/%llu\n", session->nr, session->ns, - session->stats.tx_packets, - session->stats.tx_bytes, - session->stats.tx_errors, - session->stats.rx_packets, - session->stats.rx_bytes, - session->stats.rx_errors); + (unsigned long long)session->stats.tx_packets, + (unsigned long long)session->stats.tx_bytes, + (unsigned long long)session->stats.tx_errors, + (unsigned long long)session->stats.rx_packets, + (unsigned long long)session->stats.rx_bytes, + (unsigned long long)session->stats.rx_errors); } static int pppol2tp_seq_show(struct seq_file *m, void *v) _ -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2][SCTP]: Convert sctp_dbg_objcnt to seq files.
This makes the code use a good proc API and the text ~50 bytes shorter. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- net/sctp/objcnt.c | 85 +++- 1 files changed, 44 insertions(+), 41 deletions(-) diff --git a/net/sctp/objcnt.c b/net/sctp/objcnt.c index 2cf6ad6..2b9ac00 100644 --- a/net/sctp/objcnt.c +++ b/net/sctp/objcnt.c @@ -80,61 +80,64 @@ static sctp_dbg_objcnt_entry_t sctp_dbg_objcnt[] = { /* Callback from procfs to read out objcount information. * Walk through the entries in the sctp_dbg_objcnt array, dumping * the raw object counts for each monitored type. - * - * This code was modified from similar code in route.c */ -static int sctp_dbg_objcnt_read(char *buffer, char **start, off_t offset, - int length, int *eof, void *data) +static int sctp_objcnt_seq_show(struct seq_file *seq, void *v) { - int len = 0; - off_t pos = 0; - int entries; int i; char temp[128]; - /* How many entries? */ - entries = ARRAY_SIZE(sctp_dbg_objcnt); - - /* Walk the entries and print out the debug information -* for proc fs. -*/ - for (i = 0; i < entries; i++) { - pos += 128; - - /* Skip ahead. */ - if (pos <= offset) { - len = 0; - continue; - } - /* Print out each entry. */ - sprintf(temp, "%s: %d", - sctp_dbg_objcnt[i].label, - atomic_read(sctp_dbg_objcnt[i].counter)); - - sprintf(buffer + len, "%-127s\n", temp); - len += 128; - if (pos >= offset+length) - goto done; - } - -done: - *start = buffer + len - (pos - offset); - len = pos - offset; - if (len > length) - len = length; - - return len; + i = (int)*(loff_t *)v; + sprintf(temp, "%s: %d", sctp_dbg_objcnt[i].label, + atomic_read(sctp_dbg_objcnt[i].counter)); + seq_printf(seq, "%-127s\n", temp); + return 0; +} + +static void *sctp_objcnt_seq_start(struct seq_file *seq, loff_t *pos) +{ + return (*pos >= ARRAY_SIZE(sctp_dbg_objcnt)) ? NULL : (void *)pos; +} + +static void sctp_objcnt_seq_stop(struct seq_file *seq, void *v) +{ +} + +static void * sctp_objcnt_seq_next(struct seq_file *seq, void *v, loff_t *pos) +{ + ++*pos; + return (*pos >= ARRAY_SIZE(sctp_dbg_objcnt)) ? NULL : (void *)pos; } +static const struct seq_operations sctp_objcnt_seq_ops = { + .start = sctp_objcnt_seq_start, + .next = sctp_objcnt_seq_next, + .stop = sctp_objcnt_seq_stop, + .show = sctp_objcnt_seq_show, +}; + +static int sctp_objcnt_seq_open(struct inode *inode, struct file *file) +{ + return seq_open(file, &sctp_objcnt_seq_ops); +} + +static const struct file_operations sctp_objcnt_ops = { + .open= sctp_objcnt_seq_open, + .read= seq_read, + .llseek = seq_lseek, + .release = seq_release, +}; + /* Initialize the objcount in the proc filesystem. */ void sctp_dbg_objcnt_init(void) { struct proc_dir_entry *ent; - ent = create_proc_read_entry("sctp_dbg_objcnt", 0, proc_net_sctp, - sctp_dbg_objcnt_read, NULL); + + ent = create_proc_entry("sctp_dbg_objcnt", 0, proc_net_sctp); if (!ent) printk(KERN_WARNING "sctp_dbg_objcnt: Unable to create /proc entry.\n"); + else + ent->proc_fops = &sctp_objcnt_ops; } /* Cleanup the objcount entry in the proc filesystem. */ -- 1.5.3.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2][SCTP]: Use snmp_fold_field instead of a homebrew analogue.
SCPT already depends in INET, so this doesn't create additional dependencies. Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED]> --- net/sctp/proc.c | 23 ++- 1 files changed, 2 insertions(+), 21 deletions(-) diff --git a/net/sctp/proc.c b/net/sctp/proc.c index 2499732..974350b 100644 --- a/net/sctp/proc.c +++ b/net/sctp/proc.c @@ -38,6 +38,7 @@ #include #include #include +#include /* for snmp_fold_field */ static struct snmp_mib sctp_snmp_list[] = { SNMP_MIB_ITEM("SctpCurrEstab", SCTP_MIB_CURRESTAB), @@ -75,26 +76,6 @@ static struct snmp_mib sctp_snmp_list[] = { SNMP_MIB_SENTINEL }; -/* Return the current value of a particular entry in the mib by adding its - * per cpu counters. - */ -static unsigned long -fold_field(void *mib[], int nr) -{ - unsigned long res = 0; - int i; - - for_each_possible_cpu(i) { - res += - *((unsigned long *) (((void *) per_cpu_ptr(mib[0], i)) + -sizeof (unsigned long) * nr)); - res += - *((unsigned long *) (((void *) per_cpu_ptr(mib[1], i)) + -sizeof (unsigned long) * nr)); - } - return res; -} - /* Display sctp snmp mib statistics(/proc/net/sctp/snmp). */ static int sctp_snmp_seq_show(struct seq_file *seq, void *v) { @@ -102,7 +83,7 @@ static int sctp_snmp_seq_show(struct seq_file *seq, void *v) for (i = 0; sctp_snmp_list[i].name != NULL; i++) seq_printf(seq, "%-32s\t%ld\n", sctp_snmp_list[i].name, - fold_field((void **)sctp_statistics, + snmp_fold_field((void **)sctp_statistics, sctp_snmp_list[i].entry)); return 0; -- 1.5.3.4 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: oops with ipcomp
> No I meant the exact output of ip x p and ip x s. I know, but as I end up every time with a tainted kernel on our production server I didn't turn ipcomp on, but now I got it. src Net_B dst A dir in priority 2088 tmpl src B dst A proto comp reqid 16394 mode tunnel level use tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid 16393 mode transport src Net_B dst Net_A dir in priority 2344 tmpl src B dst A proto comp reqid 16390 mode tunnel level use tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid 16389 mode transport src A dst Net_B dir out priority 2088 tmpl src A dst B proto comp reqid 16394 mode tunnel tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid 16393 mode transport src Net_A dst Net_B dir out priority 2344 tmpl src A dst B proto comp reqid 16390 mode tunnel tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid 16389 mode transport src Net_B dst A dir fwd priority 2088 tmpl src B dst A proto comp reqid 16394 mode tunnel level use tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid 16393 mode transport src Net_B dst Net_A dir fwd priority 2344 tmpl src B dst A proto comp reqid 16390 mode tunnel level use tmpl src 0.0.0.0 dst 0.0.0.0 proto esp reqid 16389 mode transport src A dst B proto comp spi 0x427e reqid 16390 mode tunnel replay-window 0 comp deflate 0x sel src 0.0.0.0/0 dst 0.0.0.0/0 src B dst A proto comp spi 0xecf0 reqid 16390 mode tunnel replay-window 0 comp deflate 0x sel src 0.0.0.0/0 dst 0.0.0.0/0 src A dst B proto esp spi 0x53f15e96 reqid 16389 mode transport replay-window 32 auth hmac(sha1) 0x... enc cbc(aes) 0x... sel src 0.0.0.0/0 dst 0.0.0.0/0 src B dst A proto esp spi 0x7b329066 reqid 16389 mode transport replay-window 32 auth hmac(sha1) 0... enc cbc(aes) 0x... sel src 0.0.0.0/0 dst 0.0.0.0/0 src A dst B proto (null) spi 0x53ec987a reqid 0 mode tunnel replay-window 0 sel src 0.0.0.0/0 dst 0.0.0.0/0 src B dst A proto (null) spi 0xc19ef67c reqid 0 mode tunnel replay-window 0 sel src 0.0.0.0/0 dst 0.0.0.0/0 src A dst B proto comp spi 0x1314 reqid 16394 mode tunnel replay-window 0 comp deflate 0x sel src 0.0.0.0/0 dst 0.0.0.0/0 src B dst A proto comp spi 0x32ff reqid 16394 mode tunnel replay-window 0 comp deflate 0x sel src 0.0.0.0/0 dst 0.0.0.0/0 src A dst B proto esp spi 0xec7d12de reqid 16393 mode transport replay-window 32 auth hmac(sha1) 0x... enc cbc(aes) 0x... sel src 0.0.0.0/0 dst 0.0.0.0/0 src B dst A proto esp spi 0x75016d2d reqid 16393 mode transport replay-window 32 auth hmac(sha1) 0x... enc cbc(aes) 0x... sel src 0.0.0.0/0 dst 0.0.0.0/0 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCHv2] net: sh_eth: Add support for Renesas SuperH Ethernet
Andrew Morton wrote: > On Thu, 07 Feb 2008 17:39:23 +0900 Yoshihiro Shimoda <[EMAIL PROTECTED]> > wrote: > >> Add support for Renesas SuperH Ethernet controller. >> This driver supported SH7710 and SH7712. >> > > Nice looking driver. > > Quick comments: Thank you very much for your comment. >> +static void __init update_mac_address(struct net_device *ndev) >> >> --- snip --- >> >> +static void __init read_mac_address(struct net_device *ndev) > > Both the above functions are called from non-__init code and hence cannot > be __init. sh_eth_tsu_init() is wrong too. Please check all section > annotations in the driver. I understood it. I will modify it. >> +struct bb_info { >> +struct mdiobb_ctrl ctrl; >> +u32 addr; >> +u32 mmd_msk;/* MMD */ >> +u32 mdo_msk; >> +u32 mdi_msk; >> +u32 mdc_msk; >> +}; > > Please cc David Brownell on updates to this driver - perhaps he will find > time to review the bit-banging interface usage. > >> +/* PHY bit set */ >> +static void bb_set(u32 addr, u32 msk) >> +{ >> +ctrl_outl(ctrl_inl(addr) | msk, addr); >> +} >> + >> +/* PHY bit clear */ >> +static void bb_clr(u32 addr, u32 msk) >> +{ >> +ctrl_outl((ctrl_inl(addr) & ~msk), addr); >> +} >> + >> +/* PHY bit read */ >> +static int bb_read(u32 addr, u32 msk) >> +{ >> +return (ctrl_inl(addr) & msk) != 0; >> +} >> + >> +/* Data I/O pin control */ >> +static inline void sh__mmd_ctrl(struct mdiobb_ctrl *ctrl, int bit) >> +{ >> +struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); >> +if (bit) >> +bb_set(bitbang->addr, bitbang->mmd_msk); >> +else >> +bb_clr(bitbang->addr, bitbang->mmd_msk); >> +} >> + >> +/* Set bit data*/ >> +static inline void sh__set_mdio(struct mdiobb_ctrl *ctrl, int bit) >> +{ >> +struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); >> + >> +if (bit) >> +bb_set(bitbang->addr, bitbang->mdo_msk); >> +else >> +bb_clr(bitbang->addr, bitbang->mdo_msk); >> +} >> + >> +/* Get bit data*/ >> +static inline int sh__get_mdio(struct mdiobb_ctrl *ctrl) >> +{ >> +struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); >> +return bb_read(bitbang->addr, bitbang->mdi_msk); >> +} > > There seems to be a fairly random mixture of inline and non-inline here. > I'd suggest that you just remove all the `inline's. The compiler does a > pretty good job of working doing this for you. I understood it. I will remove inline. I will not use inline in future as far as there is not a special reason. >> +/* MDC pin control */ >> +static inline void sh__mdc_ctrl(struct mdiobb_ctrl *ctrl, int bit) >> +{ >> +struct bb_info *bitbang = container_of(ctrl, struct bb_info, ctrl); >> + >> +if (bit) >> +bb_set(bitbang->addr, bitbang->mdc_msk); >> +else >> +bb_clr(bitbang->addr, bitbang->mdc_msk); >> +} >> + >> +/* mdio bus control struct */ >> +static struct mdiobb_ops bb_ops = { >> +.owner = THIS_MODULE, >> +.set_mdc = sh__mdc_ctrl, >> +.set_mdio_dir = sh__mmd_ctrl, >> +.set_mdio_data = sh__set_mdio, >> +.get_mdio_data = sh__get_mdio, >> +}; > > It's particularly inappropriate that sh__mdc_ctrl() was inlined - it is > only ever called via a function pointer and hence will never be inlined! I understood it. >> ... >> >> +static void sh_eth_timer(unsigned long data) >> +{ >> +struct net_device *ndev = (struct net_device *)data; >> +struct sh_eth_private *mdp = netdev_priv(ndev); >> +int next_tick = 10 * HZ; >> + >> +/* We could do something here... nah. */ >> +mdp->timer.expires = jiffies + next_tick; >> +add_timer(&mdp->timer); > > mod_timer() would be neater here. > >> +} >> >> --- snip --- >> >> +/* Set the timer to check for link beat. */ >> +init_timer(&mdp->timer); >> +mdp->timer.expires = (jiffies + (24 * HZ)) / 10;/* 2.4 sec. */ >> +mdp->timer.data = (u32) ndev; >> +mdp->timer.function = sh_eth_timer; /* timer handler */ > > setup_timer() I understood it. I will modify these. >> +} >> + >> >> +#ifdef __LITTLE_ENDIAN__ >> +static inline void swaps(char *src, int len) >> +{ >> +u32 *p = (u32 *)src; >> +u32 *maxp; >> +maxp = p + ((len + sizeof(u32) - 1) / sizeof(u32)); >> + >> +for (; p < maxp; p++) >> +*p = swab32(*p); >> +} >> +#else >> +#define swaps(x, y) >> +#endif >> + > > I'd say that the big-endian version of swaps() should be a C function > rather than a macro. It's nicer to look at, consistent, provides > typechecking, > can help avoid unused-variable warnings (an inline function provides a > reference to the arguments whereas a macro does not). > > The little-endian version of this function is too large to be inlined. > > This function looks fairly generic. Are we sure there isn't some library > function which does this? > I looked for lib/ and include/linux/ and include/linux/byteorder/, but such function was not found.
tg3 kernel BUG at include/linux/netdevice.h:918!
FWIW, kernel 2.6.22.10, tainted with nvidia and vmware. BUG triggered twice now when a large number of processes (unrelated to vmware) tried to send lots of TCP data to other linux boxes (real, not virtual). tg3 TSO has been disabled with ethtool. kernel BUG at include/linux/netdevice.h:918! invalid opcode: [#1] SMP Modules linked in: nvidia(P) vmnetfilter vmnet(P) vmmon(P) vmthrottle sysprof CPU:0 EIP:0060:[]Tainted: P VLI EFLAGS: 00010046 (2.6.22.10-x168 #1) EIP is at tg3_poll+0x161/0x1c0 eax: 0006 ebx: f7445000 ecx: edx: f7532000 esi: f7445600 edi: 0202 ebp: e1f55bcc esp: e1f55bb4 ds: 007b es: 007b fs: 00d8 gs: 0033 ss: 0068 Process fcp (pid: 13068, ti=e1f54000 task=dc6fb400 task.ti=e1f54000) Stack: e1f55bcc 0001 e1f55bdc f7445000 c2b3aa80 c2a22d2c e1f55bec c04b8e4d 0ae106dd c2a22d00 012c 0005 c0796b18 c07fb820 e1f55c08 c0128de8 000a 0246 f7445000 c7a179ac e1f55c14 c0128eac f7445200 Call Trace: [] show_trace_log_lvl+0x1a/0x30 [] show_stack_log_lvl+0x9a/0xc0 [] show_registers+0x1d6/0x2e0 [] die+0x106/0x240 [] do_trap+0x91/0xd0 [] do_invalid_op+0x89/0xa0 [] error_code+0x72/0x80 [] net_rx_action+0x8d/0x170 [] __do_softirq+0x78/0x100 [] do_softirq+0x3c/0x40 [] local_bh_enable+0x80/0xb0 [] dev_queue_xmit+0x222/0x310 [] ip_output+0x1d4/0x350 [] ip_queue_xmit+0x45c/0x480 [] tcp_transmit_skb+0x2b6/0x490 [] tcp_write_xmit+0x18a/0x260 [] __tcp_push_pending_frames+0x17/0x80 [] tcp_sendmsg+0x780/0xbe0 [] do_sock_write+0x97/0xb0 [] sock_aio_write+0x6a/0x80 [] do_sync_write+0xc7/0x120 [] vfs_write+0x11f/0x130 [] sys_write+0x3d/0x70 [] syscall_call+0x7/0xb === Code: e0 fd 83 c8 01 89 07 8d 83 04 06 00 00 89 45 e8 e8 c5 0a 23 00 31 d2 89 f0 e8 7c f4 ff ff 8b 45 e8 e8 c4 0b 23 00 e9 c9 fe ff ff <0f> 0b eb fe 9c 5f fa 8b 43 2c a8 20 74 40 8d 8b 80 01 00 00 8b EIP: [] tg3_poll+0x161/0x1c0 SS:ESP 0068:e1f55bb4 Kernel panic - not syncing: Fatal exception in interrupt 913 /* same as netif_rx_complete, except that local_irq_save(flags) 914 * has already been issued 915 */ 916 static inline void __netif_rx_complete(struct net_device *dev) 917 { >918 BUG_ON(!test_bit(__LINK_STATE_RX_SCHED, &dev->state)); 919 list_del(&dev->poll_list); 920 smp_mb__before_clear_bit(); 921 clear_bit(__LINK_STATE_RX_SCHED, &dev->state); 922 } -- Frank -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] [IPV6] Replace using the magic constant "1024" with IP6_RT_PRIO_USER for fc_metric.
Hi, This patch replaces the explicit usage of the magic constant "1024" with IP6_RT_PRIO_USER in the IPV6 tree. Regards, Rami Rosen Signed-off-by: Rami Rosen <[EMAIL PROTECTED]> diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 513f72e..6e7b56e 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -1620,7 +1620,7 @@ static struct rt6_info *rt6_add_route_info(struct in6_addr *prefix, int prefixle { struct fib6_config cfg = { .fc_table = RT6_TABLE_INFO, - .fc_metric = 1024, + .fc_metric = IP6_RT_PRIO_USER, .fc_ifindex = ifindex, .fc_dst_len = prefixlen, .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_ROUTEINFO | @@ -1670,7 +1670,7 @@ struct rt6_info *rt6_add_dflt_router(struct in6_addr *gwaddr, { struct fib6_config cfg = { .fc_table = RT6_TABLE_DFLT, - .fc_metric = 1024, + .fc_metric = IP6_RT_PRIO_USER, .fc_ifindex = dev->ifindex, .fc_flags = RTF_GATEWAY | RTF_ADDRCONF | RTF_DEFAULT | RTF_UP | RTF_EXPIRES | RTF_PREF(pref),
[PATCH] smc91x: Add MigoR board support
This patch adds MigoR board support to the smc91x driver. Signed-off-by: Magnus Damm <[EMAIL PROTECTED]> --- drivers/net/smc91x.h | 14 ++ 1 file changed, 14 insertions(+) --- 0001/drivers/net/smc91x.h +++ work/drivers/net/smc91x.h 2008-02-06 23:13:55.0 +0900 @@ -306,6 +306,20 @@ SMC_outw(u16 val, void __iomem *ioaddr, #define SMC_insw(a, r, p, l) insw((a) + (r), p, l) #define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l) +#elif defined(CONFIG_SH_MIGOR) + +#define SMC_IRQ_FLAGS (-1) +#define SMC_CAN_USE_8BIT 0 +#define SMC_CAN_USE_16BIT 1 +#define SMC_CAN_USE_32BIT 0 +#define SMC_IO_SHIFT 0 +#define SMC_NOWAIT 1 + +#define SMC_inw(a, r) inw((a) + (r)) +#define SMC_outw(v, a, r) outw(v, (a) + (r)) +#define SMC_insw(a, r, p, l) insw((a) + (r), p, l) +#define SMC_outsw(a, r, p, l) outsw((a) + (r), p, l) + #else /* BOARDS */ #define SMC_CAN_USE_8BIT 1 -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: ipcomp regression in 2.6.24
From: "Marco Berizzi" <[EMAIL PROTECTED]> Date: Fri, 8 Feb 2008 10:12:25 +0100 > I haven't seen this patch in Greg 2.6.24-stable > review message. Due to having just returned from LCA08 I haven't made any -stable submissions in a while, and I notified Greg of this tonight. The networking fixes will make it into the next 2.6.24.x release. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: ipcomp regression in 2.6.24
David Miller wrote: > From: Herbert Xu <[EMAIL PROTECTED]> > Date: Wed, 30 Jan 2008 14:15:33 +1100 > > > Marco Berizzi <[EMAIL PROTECTED]> wrote: > > > > > >> > With 2.6.24 IPSEC/ESP tunnels to older kernels establish fine, data > > >> > flows in both directions, but no data comes out of the tunnel. > > >> > Needed to disable ipcomp. > > > > > > Same problem here: linux 2.6.24 driven by openswan 2.4.11 > > > on Slackware 11.0 > > > > My bad. This patch should fix it. > > > > [IPCOMP]: Fetch nexthdr before ipch is destroyed > > > > When I moved the nexthdr setting out of IPComp I accidently moved > > the reading of ipch->nexthdr after the decompression. Unfortunately > > this means that we'd be reading from a stale ipch pointer which > > doesn't work very well. > > > > This patch moves the reading up so that we get the correct nexthdr > > value. > > > > Signed-off-by: Herbert Xu <[EMAIL PROTECTED]> > > Applied, and queued for -stable, thanks! Hi David, I haven't seen this patch in Greg 2.6.24-stable review message. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: oops with ipcomp
On Thu, Feb 07, 2008 at 07:01:32PM +0100, Beschorner Daniel wrote: > > > Could you show me the exact policies/SAs of the tunnel involved > > in the crash? > > esp/cbc(aes128)/hmac(sha1) No I meant the exact output of ip x p and ip x s. Thanks, -- Visit Openswan at http://www.openswan.org/ Email: Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH][NET_SCHED] sch_htb: htb_requeue fix
htb_requeue() enqueues skbs for which htb_classify() returns NULL. This is wrong because such skbs could be handled by NET_CLS_ACT code, and the decision could be different than earlier in htb_enqueue(). So htb_requeue() is changed to work and look more like htb_enqueue(). Signed-off-by: Jarek Poplawski <[EMAIL PROTECTED]> --- diff -Nurp 2.6.24-mm1-/net/sched/sch_htb.c 2.6.24-mm1+/net/sched/sch_htb.c --- 2.6.24-mm1-/net/sched/sch_htb.c 2008-02-05 07:45:48.0 + +++ 2.6.24-mm1+/net/sched/sch_htb.c 2008-02-08 08:19:25.0 + @@ -609,14 +609,14 @@ static int htb_enqueue(struct sk_buff *s /* TODO: requeuing packet charges it to policers again !! */ static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) { + int ret; struct htb_sched *q = qdisc_priv(sch); - int ret = NET_XMIT_SUCCESS; struct htb_class *cl = htb_classify(skb, sch, &ret); struct sk_buff *tskb; - if (cl == HTB_DIRECT || !cl) { + if (cl == HTB_DIRECT) { /* enqueue to helper queue */ - if (q->direct_queue.qlen < q->direct_qlen && cl) { + if (q->direct_queue.qlen < q->direct_qlen) { __skb_queue_head(&q->direct_queue, skb); } else { __skb_queue_head(&q->direct_queue, skb); @@ -625,6 +625,13 @@ static int htb_requeue(struct sk_buff *s sch->qstats.drops++; return NET_XMIT_CN; } +#ifdef CONFIG_NET_CLS_ACT + } else if (!cl) { + if (ret == NET_XMIT_BYPASS) + sch->qstats.drops++; + kfree_skb(skb); + return ret; +#endif } else if (cl->un.leaf.q->ops->requeue(skb, cl->un.leaf.q) != NET_XMIT_SUCCESS) { sch->qstats.drops++; -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [NET_SCHED] Traffic Control subsystem Notifier for Kernel Modules
From: Yashpal Dutta <[EMAIL PROTECTED]> Date: Fri, 8 Feb 2008 12:49:42 +0530 > The patch adds raw notifiers in Traffic Control subsystem for communicating > Queue Disciplines and Classifiers added by user via TC application. > Interested kernel modules will have to register to the TC subsystem > to be able to get new QDisc notifys asynchronously. > > Signed-off-by: Yashpal Dutta <[EMAIL PROTECTED]> > Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> You can simply listen on the appropriate netlink socket for these events already. There is no reason I can see to provide them over a different framework like this. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
[NET_SCHED] Traffic Control subsystem Notifier for Kernel Modules
The patch adds raw notifiers in Traffic Control subsystem for communicating Queue Disciplines and Classifiers added by user via TC application. Interested kernel modules will have to register to the TC subsystem to be able to get new QDisc notifys asynchronously. Signed-off-by: Yashpal Dutta <[EMAIL PROTECTED]> Signed-off-by: Kim Phillips <[EMAIL PROTECTED]> --- include/net/sch_generic.h | 11 ++- include/net/sch_notify.h | 66 +++ net/sched/cls_api.c | 42 +++ net/sched/cls_fw.c| 16 ++ net/sched/sch_api.c | 34 ++ net/sched/sch_cbq.c | 68 + net/sched/sch_prio.c | 22 ++- net/sched/sch_red.c | 29 ++- net/sched/sch_sfq.c | 15 ++ net/sched/sch_tbf.c | 29 ++- 10 files changed, 328 insertions(+), 4 deletions(-) create mode 100644 include/net/sch_notify.h diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index ab502ec..7e31279 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h @@ -9,6 +9,7 @@ #include #include #include +#include struct Qdisc_ops; struct qdisc_walker; @@ -79,6 +80,9 @@ struct Qdisc_class_ops /* rtnetlink specific */ int (*dump)(struct Qdisc *, unsigned long, struct sk_buff *skb, struct tcmsg*); + /* CLS Notifier */ + void(*notify_cls)(struct Qdisc *, unsigned long, + struct tc_cls_notify_s *); int (*dump_stats)(struct Qdisc *, unsigned long, struct gnet_dump *); }; @@ -101,6 +105,9 @@ struct Qdisc_ops int (*change)(struct Qdisc *, struct nlattr *arg); int (*dump)(struct Qdisc *, struct sk_buff *); + /* QDISC Notifier */ + void(*notify_qdisc)(struct Qdisc *, + struct qdisc_notify_s *); int (*dump_stats)(struct Qdisc *, struct gnet_dump *); struct module *owner; @@ -134,7 +141,9 @@ struct tcf_proto_ops /* rtnetlink specific */ int (*dump)(struct tcf_proto*, unsigned long, struct sk_buff *skb, struct tcmsg*); - + /* Classifier Notifier */ + void(*notify_tcf)(struct tcf_proto *, + unsigned long, struct qdisc_notify_s *); struct module *owner; }; diff --git a/include/net/sch_notify.h b/include/net/sch_notify.h new file mode 100644 index 000..cffdf0c --- /dev/null +++ b/include/net/sch_notify.h @@ -0,0 +1,66 @@ +#ifndef __SCH_NOTIFY_H__ +#define __SCH_NOTIFY_H__ + +#include +#include + +/*CBQ Notification structure */ +struct tc_cbq_notify_s { + struct tc_cbq_lssopt lssopt; + struct tc_cbq_wrropt wrropt; + struct tc_cbq_ovl ovlopt; +#ifdef CONFIG_NET_CLS_ACT + struct tc_cbq_police policeopt; +#endif + struct tc_cbq_fopt fopt; +}; + +/* Classifier Notification Structure */ +struct tc_cls_notify_s { + uint32_t type; + struct tcmsg tcm; + union { + struct tc_cbq_notify_s tc_cbq_notifier; + } u; +}; + +/* Traffic Actions notify Structure */ +struct tc_fw_notify_s { + uint32_t classid; + uint32_t mask; + uint32_t handle; + struct tc_action *action; +}; + +/* TC Main Notification Structure */ +struct qdisc_notify_s { + uint32_t type; + uint32_t parent; + uint32_t handle; + uint32_t ifindex; + union { + struct tc_fw_notify_s tc_fw_notifier; + struct tc_cbq_notify_s tc_cbq_notifier; + struct tc_tbf_qopt tbf_qdisc_opt; + struct tc_red_qopt red_qdisc_opt; + struct tc_sfq_qopt sfq_qdisc_opt; + struct tc_prio_qopt prio_qdisc_opt; /* Prio Qdisc Options */ + } u; +}; + +/*Notifier Register(unregister) function for Qdisc*/ +extern uint32_t register_qdisc_notifier(struct notifier_block *nb); +extern uint32_t unregister_qdisc_notifier(struct notifier_block *nb); + +/* Notifier Register(unregister) functions for TC Filters */ +extern uint32_t register_tcf_notifier(struct notifier_block *nb); +extern uint32_t unregister_tcf_notifier(struct notifier_block *nb); + +/* Traffic Control Notify Event Types */ +#defineTC_EVENT_PRIO 0x0001 +#defineTC_EVENT_CBQ 0x0002 +#defineTC_EVENT_RED 0x0003 +#defineTC_EVENT_SFQ 0x0004 +#defineTC_EVENT_TBF 0x0005 +#defineTC_EVENT_FW 0x0006 +#endif diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index 0fbedca..a2dc1c1 100644 --- a/ne
RE: cgroup: limit network bandwidth
Hello, Andrea! I have occasionally seen your patch on LWN (missed one in netdev@) and have two words about. May be this is not too late. I have missed my entire mailbox yesterday and have not followed the discussion. Pls forgive me. Rate-limiting message receive is nothing good at all. First, if we talk about i386, the most important resource is low memory. There are no more than 1 Gb of it. You suggest to keep it used more time than usual and this usage will not reduce network traffic to the node for UDP cases. For TCP the situation is slightly better. But not quite a big. For a case of rather slow group with a bug traffic you will just eat 64kb * Nsockets of receive buffers. So, resource usage is just increased for a case. This is unfortunate. In order to proper rate-limiting you need to calculate memory used - dropping incoming packets early for UDP - manage TCP window on the base of buffer memory used by the cgroup Regards, Den -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html