fedora-netdev.1 IPv6 freeze [Re: [ANNOUNCE] fedora-netdev kernel repository]
On Mon, 14 Nov 2005, John W. Linville wrote: http://people.redhat.com/linville/kernels/fedora-netdev/ I guess the test can be termed a 'success' because after updating from 2.6.14-1.1637_FC4 to 2.6.14-1.1637_FC4.netdev.1, I get 100% reproducible kernel hang (everything just freezes as it is, no message to /var/log/messages or anywhere) after I run '/sbin/ip -6 r l' or try to use IPv6 in basically any other way on my ThinkPad laptop with external orinoco_cs WLAN card. Any thoughts for the next steps? -- Pekka Savola You each name yourselves king, yet the Netcore Oykingdom bleeds. Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings - 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
remove Davicom DM9102 PCI id from tulip_core.c ?
Hello Jeff, I got some user reports that they have problems with a Davicom DM9102 NIC and the tulip driver. PCI ID: 1282:9102 (rev 20) Symptoms: NIC gets address via DHCP, ping works but real traffic stalls after some packets. Switching to the dmfe driver made it working for them. So I would suggest to remove this ID from the generic driver, since it seems that dmfe is the better choice for this NIC. What do you think ? --- linux-2.6.15-rc1.4/drivers/net/tulip/tulip_core.c.org 2005-11-16 14:25:57.0 +0100 +++ linux-2.6.15-rc1.4/drivers/net/tulip/tulip_core.c 2005-11-16 14:35:33.0 +0100 @@ -224,7 +224,6 @@ { 0x11F6, 0x9881, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMPEX9881 }, { 0x8086, 0x0039, PCI_ANY_ID, PCI_ANY_ID, 0, 0, I21145 }, { 0x1282, 0x9100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, - { 0x1282, 0x9102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DM910X }, { 0x1113, 0x1216, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, { 0x1113, 0x1217, PCI_ANY_ID, PCI_ANY_ID, 0, 0, MX98715 }, { 0x1113, 0x9511, PCI_ANY_ID, PCI_ANY_ID, 0, 0, COMET }, -- Karsten Keil SuSE Labs ISDN 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
ROHC over PPP patch
Hi, I would like to porpose (see attached patch) the addition of protocol values for multiplexing and demultiplexing ROHC header compression packets. The constants in this patch are compliant with RFC 3241 (ROHC over PPP). Thanks Jesus Arango diff -ruN ../linux-2.6.14.2/drivers/net/ppp_generic.c ./drivers/net/ppp_generic.c --- ../linux-2.6.14.2/drivers/net/ppp_generic.c 2005-11-10 22:33:12.0 -0700 +++ ./drivers/net/ppp_generic.c 2005-11-16 06:17:12.0 -0700 @@ -60,7 +60,9 @@ #define NP_AT 3 /* Appletalk protocol */ #define NP_MPLS_UC 4 /* MPLS unicast */ #define NP_MPLS_MC 5 /* MPLS multicast */ -#define NUM_NP 6 /* Number of NPs. */ +#define NP_ROHC_SM 6 /* ROHC small-CIDs */ +#define NP_ROHC_LG 7 /* ROHC large-CIDs */ +#define NUM_NP 8 /* Number of NPs. */ #define MPHDRLEN 6 /* multilink protocol header length */ #define MPHDRLEN_SSN 4 /* ditto with short sequence numbers */ @@ -291,6 +293,10 @@ return NP_MPLS_UC; case PPP_MPLS_MC: return NP_MPLS_MC; + case PPP_ROHC_SM: + return NP_ROHC_SM; + case PPP_ROHC_LG: + return NP_ROHC_LG; } return -EINVAL; } @@ -303,6 +309,8 @@ PPP_AT, PPP_MPLS_UC, PPP_MPLS_MC, + PPP_ROHC_SM, + PPP_ROHC_LG, }; /* Translates an ethertype into an NP index */ @@ -322,6 +330,10 @@ return NP_MPLS_UC; case ETH_P_MPLS_MC: return NP_MPLS_MC; + case ETH_P_ROHC_SM: + return NP_ROHC_SM; + case ETH_P_ROHC_LG: + return NP_ROHC_LG; } return -1; } @@ -334,6 +346,8 @@ ETH_P_PPPTALK, ETH_P_MPLS_UC, ETH_P_MPLS_MC, + ETH_P_ROHC_SM, + ETH_P_ROHC_LG, }; /* diff -ruN ../linux-2.6.14.2/include/linux/if_ether.h ./include/linux/if_ether.h --- ../linux-2.6.14.2/include/linux/if_ether.h 2005-11-10 22:33:12.0 -0700 +++ ./include/linux/if_ether.h 2005-11-16 06:00:50.0 -0700 @@ -92,6 +92,8 @@ #define ETH_P_ECONET 0x0018 /* Acorn Econet */ #define ETH_P_HDLC 0x0019 /* HDLC frames */ #define ETH_P_ARCNET 0x001A /* 1A for ArcNet :-)*/ +#define ETH_P_ROHC_SM 0x001B /* ROHC small-CIDs */ +#define ETH_P_ROHC_LG 0x001C /* ROHC large-CIDs */ /* * This is an Ethernet frame header. diff -ruN ../linux-2.6.14.2/include/linux/ppp_defs.h ./include/linux/ppp_defs.h --- ../linux-2.6.14.2/include/linux/ppp_defs.h 2005-11-10 22:33:12.0 -0700 +++ ./include/linux/ppp_defs.h 2005-11-16 06:14:08.0 -0700 @@ -67,6 +67,8 @@ /* * Protocol field values. */ +#define PPP_ROHC_SM 0x03/* ROHC small-CIDs */ +#define PPP_ROHC_LG 0x05/* ROHC large-CIDs */ #define PPP_IP 0x21/* Internet Protocol */ #define PPP_AT 0x29/* AppleTalk Protocol */ #define PPP_IPX0x2b/* IPX protocol */ diff -ruN ../linux-2.6.14.2/linux-2.6.14.2-ppp-rohc.patch ./linux-2.6.14.2-ppp-rohc.patch --- ../linux-2.6.14.2/linux-2.6.14.2-ppp-rohc.patch 1969-12-31 17:00:00.0 -0700 +++ ./linux-2.6.14.2-ppp-rohc.patch 2005-11-16 06:58:55.06688 -0700 @@ -0,0 +1,78 @@ +diff -ruN ../linux-2.6.14.2/drivers/net/ppp_generic.c ./drivers/net/ppp_generic.c +--- ../linux-2.6.14.2/drivers/net/ppp_generic.c2005-11-10 22:33:12.0 -0700 ./drivers/net/ppp_generic.c2005-11-16 06:17:12.0 -0700 +@@ -60,7 +60,9 @@ + #define NP_AT 3 /* Appletalk protocol */ + #define NP_MPLS_UC 4 /* MPLS unicast */ + #define NP_MPLS_MC 5 /* MPLS multicast */ +-#define NUM_NP6 /* Number of NPs. */ ++#define NP_ROHC_SM 6 /* ROHC small-CIDs */ ++#define NP_ROHC_LG 7 /* ROHC large-CIDs */ ++#define NUM_NP8 /* Number of NPs. */ + + #define MPHDRLEN 6 /* multilink protocol header length */ + #define MPHDRLEN_SSN 4 /* ditto with short sequence numbers */ +@@ -291,6 +293,10 @@ + return NP_MPLS_UC; + case PPP_MPLS_MC: + return NP_MPLS_MC; ++ case PPP_ROHC_SM: ++ return NP_ROHC_SM; ++ case PPP_ROHC_LG: ++ return NP_ROHC_LG; + } + return -EINVAL; + } +@@ -303,6 +309,8 @@ + PPP_AT, + PPP_MPLS_UC, + PPP_MPLS_MC, ++ PPP_ROHC_SM, ++ PPP_ROHC_LG, + }; + + /* Translates an ethertype into an NP index */ +@@ -322,6 +330,10 @@ + return NP_MPLS_UC; + case ETH_P_MPLS_MC: + return NP_MPLS_MC; ++ case ETH_P_ROHC_SM: ++ return NP_ROHC_SM; ++ case ETH_P_ROHC_LG: ++ return NP_ROHC_LG; + } + return -1; + } +@@ -334,6 +346,8 @@ + ETH_P_PPPTALK, +
Re: fedora-netdev.1 IPv6 freeze [Re: [ANNOUNCE] fedora-netdev kernel repository]
On Wed, Nov 16, 2005 at 12:42:24PM +0100, Thomas Graf wrote: * Pekka Savola [EMAIL PROTECTED] 2005-11-16 12:46 On Mon, 14 Nov 2005, John W. Linville wrote: http://people.redhat.com/linville/kernels/fedora-netdev/ I guess the test can be termed a 'success' because after updating from 2.6.14-1.1637_FC4 to 2.6.14-1.1637_FC4.netdev.1, I get 100% reproducible kernel hang (everything just freezes as it is, no message to /var/log/messages or anywhere) after I run '/sbin/ip -6 r l' or try to use IPv6 in basically any other way on my ThinkPad laptop with external orinoco_cs WLAN card. Any thoughts for the next steps? It's probably missing this patch: It was... Pekka, I have included the patch Thomas identified as part of the FC4.netdev.2 build. You may want to do a 'yum update' and try it out. Thanks! John -- John W. Linville [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
kernel-2.6.14-1.1637_FC4.netdev.2 now available
The second FC4 fedora-netdev kernel is now available. If you are already a fedora-netdev user, a simple 'yum update' should retrieve the new kernels for you. I now have a fedora-netdev-release package available. This simplifies the process of configuring yum for the fedora-netdev repository. The FC4 fedora-netdev-release package is available here: http://people.redhat.com/linville/kernels/fedora-netdev/4/fedora-netdev-release-4-0.noarch.rpm Download and install that, then you will be able to use yum to get the FC4 fedora-netdev kernels. Thanks, and good luck! :-) John P.S. What is fedora-netdev? The purpose of this repository is two-fold: 1) to make bleeding-edge linux kernel networking developments available to Fedora users who need or want access to them; and, 2) to open-up the Fedora user base as a better testing resource for the kernel netdev community. I hope this will prove to be a win-win situation for both camps. If you are a Fedora user with an interest or need for the latest developments in Linux kernel networking, then _please_ try the kernels from this repository. Your testing and feedback is greatly appreciated, desperately requested, and graciously accepted. Thanks in advance! P.P.S. What netdev patches are in it? - sky2: new experimental Marvell Yukon2 driver - 8139cp: support ETHTOOL_GPERMADDR - 8139too: support ETHTOOL_GPERMADDR - b44: support ETHTOOL_GPERMADDR - e1000: support ETHTOOL_GPERMADDR - e100: support ETHTOOL_GPERMADDR - forcedeth: support ETHTOOL_GPERMADDR - ixgb: support ETHTOOL_GPERMADDR - ne2k-pci: support ETHTOOL_GPERMADDR - pcnet32: support ETHTOOL_GPERMADDR - r8169: support ETHTOOL_GPERMADDR - skge: support ETHTOOL_GPERMADDR - sundance: support ETHTOOL_GPERMADDR - via-rhine: support ETHTOOL_GPERMADDR - drivers/net: fix-up schedule_timeout() usage - Replace drivers/net/wan custom ctype macros with standard ones - drivers/net/wan/: possible cleanups - lne390 bogus casts - C99 initializers in ray_cs.c - mii: Add test for GigE support - Add rapidio net driver - pcnet32: set_ringparam implementation - pcnet32: set min ring size to 4 - sky2: driver update. - orinoco: Remove conditionals that are useless in the kernel drivers. - orinoco: Don't include net/ieee80211.h twice. - orinoco: Update PCMCIA ID's. - Fixed some endian issues with 802.11 header usage in ieee80211_rx.c - ieee80211 quality scaling algorithm extension handler - ieee80211 Added wireless spy support - Changed 802.11 headers to use ieee80211_info_element[0] - ieee80211 Removed ieee80211_info_element_hdr - ieee80211 Cleanup memcpy parameters. - ieee80211 Switched to sscanf in store_debug_level - ieee80211 Fixed type-o of abg_ture - abg_true - Updated ipw2200 to compile with ieee80211 abg_ture to abg_true change - sky2: fix FIFO DMA alignment problems - sky2: allow ethtool debug access to all of PCI space - sky2: version 0.5 - ieee80211: Updated ipw2100 to be compatible with ieee80211_hdr changes - ieee80211: Updated ipw2100 to be compatible with ieee80211's hard_start_xmit change - ieee80211: Updated ipw2200 to be compatible with ieee80211_hdr changes - ieee80211: Updated ipw2200 to be compatible with ieee80211's hard_start_xmit change. - ieee80211: Updated atmel to be compatible with ieee80211_hdr changes - ieee80211: Fixed a kernel oops on module unload - ieee80211: Hardware crypto and fragmentation offload support - ieee80211: Fix time calculation, switching to use jiffies_to_msecs - ieee80211: Fix kernel Oops when module unload - ieee80211: Allow drivers to fix an issue when using wpa_supplicant with WEP - ieee82011: Added WE-18 support to default wireless extension handler - ieee80211: Renamed ieee80211_hdr to ieee80211_hdr_3addr - ieee80211: adds support for the creation of RTS packets - ieee82011: Added ieee80211_tx_frame to convert generic 802.11 data frames, and callbacks - ieee80211: Fix TKIP, repeated fragmentation problem, and payload_size reporting - ieee80211: Return NETDEV_TX_BUSY when QoS buffer full - ieee80211: Add QoS (WME) support to the ieee80211 subsystem - ieee80211: Added ieee80211_geo to provide helper functions - ieee80211: Added ieee80211_radiotap.h - ieee80211: Additional fixes for endian-aware types - ieee80211: extern inline to static inline - ieee80211: Type-o, capbility definition for QoS, and ERP parsing - ieee80211: Mixed PTK/GTK CCMP/TKIP support - ieee80211: Keep auth mode unchanged after iwconfig key off/on cycle - ieee80211: Updated copyright dates - ieee80211: Updated hostap to be compatible with ieee80211_hdr changes - ieee80211: Updated hostap to be compatible with extra_prefix_len changes - ieee82011: Remove WIRELESS_EXT ifdefs - forcedeth: add hardware tx checksumming - ieee80211: Added subsystem version string and reporting via MODULE_VERSION - ieee80211: Added handle_deauth() callback, enhanced tkip/ccmp support of varying hw/sw offload - ieee80211: added IE comments, reason_code to reason, removed info_element from ieee80211_disassoc -
Re: Issue 0 WAS (Re: Oustanding issues WAS(IRe: Consensus? WAS(RFC 2863)
* jamal [EMAIL PROTECTED] 2005-11-15 21:16 3) There is a kernel dev-operstate_kernel which is accessible via user space in the same manner IFF_UP flags are set etc. Just be careful about synchronization, that's one issue with the currently proposed implementation. The callers cannot be made responsible to synchronize this, therefore the set-and-test before adding to the linkwatch queue must be made atomic. The latest patch looks a lot better, even though I still don't see what we gainin exchange for the slightly reduced flexibility. What worries me in particular are checks like operstate STATE_X operstate STATE_Y which are fine for the moment but once we add new states we have to make sure that all checks remain correct which could mean that certain logically valid combinations cannot be implemented anymore. I think it would help me a lot if I'd see the actual gain from using a state variable over state flags. - 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: Issue 0 WAS (Re: Oustanding issues WAS(IRe: Consensus? WAS(RFC 2863)
jamal [EMAIL PROTECTED] writes: I am afraid I would have to agree with Stefan on this Krzysztof. Supporting false statements doesn't make them less false :-) OTOH I hope your opinions about people have no influence on your view of the code they write so it's not exactly important here. You are contributing some valuable ideas, but you are almost sounding like a broken record on your super-patch. There is nothing like a super-patch, my own or another. The facts are my patch is not invasive and doesn't change the (currently well working) mechanism. It's just an extension to it. And it actually works correctly. If you or whoever comes with a better patch I'll be more than happy to burn my own version immediately. Now all you have is endless discussions and I'm really tired of it. Your patch fixes your driver, no doubt Of course, no. No my driver is broken (at least WRT to the flags etc), it's the kernel which is (has been recently) broken. - but we have bigger issues at stake here. You keep mapping anything that isnt to clear to you as not being needed. False. The only thing I think isn't needed are the complications with automatic UP-DORMANT transitions. We are close, just stop mentioning your super-patch ;- Let me know when you're have something. Being close isn't at all worth mentioning. -- Krzysztof Halasa - 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] LSM-IPSec Network Hooks
Added Signed-off by me, and updated to latest kernel. Regards, Trent. --- This patch series implements per packet access control via the extension of the Linux Security Modules (LSM) interface by hooks in the XFRM and pfkey subsystems that leverage IPSec security associations to label packets. Extensions to the SELinux LSM are included that leverage the patch for this purpose. This patch implements the changes necessary to the XFRM subsystem, pfkey interface, ipv4/ipv6, and xfrm_user interface to restrict a socket to use only authorized security associations (or no security association) to send/receive network packets. Patch purpose: The patch is designed to enable access control per packets based on the strongly authenticated IPSec security association. Such access controls augment the existing ones based on network interface and IP address. The former are very coarse-grained, and the latter can be spoofed. By using IPSec, the system can control access to remote hosts based on cryptographic keys generated using the IPSec mechanism. This enables access control on a per-machine basis or per-application if the remote machine is running the same mechanism and trusted to enforce the access control policy. Patch design approach: The overall approach is that policy (xfrm_policy) entries set by user-level programs (e.g., setkey for ipsec-tools) are extended with a security context that is used at policy selection time in the XFRM subsystem to restrict the sockets that can send/receive packets via security associations (xfrm_states) that are built from those policies. A presentation available at www.selinux-symposium.org/2005/presentations/session2/2-3-jaeger.pdf from the SELinux symposium describes the overall approach. Patch implementation details: On output, the policy retrieved (via xfrm_policy_lookup or xfrm_sk_policy_lookup) must be authorized for the security context of the socket and the same security context is required for resultant security association (retrieved or negotiated via racoon in ipsec-tools). This is enforced in xfrm_state_find. On input, the policy retrieved must also be authorized for the socket (at __xfrm_policy_check), and the security context of the policy must also match the security association being used. The patch has virtually no impact on packets that do not use IPSec. The existing Netfilter (outgoing) and LSM rcv_skb hooks are used as before. Also, if IPSec is used without security contexts, the impact is minimal. The LSM must allow such policies to be selected for the combination of socket and remote machine, but subsequent IPSec processing proceeds as in the original case. Testing: The pfkey interface is tested using the ipsec-tools. ipsec-tools have been modified (a separate ipsec-tools patch is available for version 0.5) that supports assignment of xfrm_policy entries and security associations with security contexts via setkey and the negotiation using the security contexts via racoon. The xfrm_user interface is tested via ad hoc programs that set security contexts. These programs are also available from me, and contain programs for setting, getting, and deleting policy for testing this interface. Testing of sa functions was done by tracing kernel behavior. Signed-off-by: Trent Jaeger [EMAIL PROTECTED] --- include/linux/pfkeyv2.h | 13 ++- include/linux/security.h | 132 +++ include/linux/xfrm.h | 29 ++ include/net/flow.h |7 - include/net/xfrm.h | 27 +- net/core/flow.c |8 + net/key/af_key.c | 197 +-- net/xfrm/xfrm_policy.c | 88 net/xfrm/xfrm_state.c|9 +- net/xfrm/xfrm_user.c | 148 +-- security/Kconfig | 13 +++ security/dummy.c | 45 ++ 12 files changed, 655 insertions(+), 61 deletions(-) diff -puN include/linux/pfkeyv2.h~lsm-xfrm-nethooks include/linux/pfkeyv2.h --- linux-2.6.14/include/linux/pfkeyv2.h~lsm-xfrm-nethooks 2005-11-15 17:25:41.0 -0500 +++ linux-2.6.14-root/include/linux/pfkeyv2.h 2005-11-15 17:25:41.0 -0500 @@ -216,6 +216,16 @@ struct sadb_x_nat_t_port { } __attribute__((packed)); /* sizeof(struct sadb_x_nat_t_port) == 8 */ +/* Generic LSM security context */ +struct sadb_x_sec_ctx { + uint16_tsadb_x_sec_len; + uint16_tsadb_x_sec_exttype; + uint8_t sadb_x_ctx_alg; /* LSMs: e.g., selinux == 1 */ + uint8_t sadb_x_ctx_doi; + uint16_tsadb_x_ctx_len; +} __attribute__((packed)); +/* sizeof(struct sadb_sec_ctx) = 8 */ + /* Message types */ #define SADB_RESERVED 0 #define SADB_GETSPI1 @@ -325,7 +335,8 @@ struct sadb_x_nat_t_port { #define SADB_X_EXT_NAT_T_SPORT 21 #define SADB_X_EXT_NAT_T_DPORT 22 #define SADB_X_EXT_NAT_T_OA
[PATCH 2/2] LSM-IPSec Network Hooks
Added Signed-off by me and updated to latest kernel. Regards, Trent. -- This patch series implements per packet access control via the extension of the Linux Security Modules (LSM) interface by hooks in the XFRM and pfkey subsystems that leverage IPSec security associations to label packets. Extensions to the SELinux LSM are included that leverage the patch for this purpose. This patch implements the changes necessary to the SELinux LSM to create, deallocate, and use security contexts for policies (xfrm_policy) and security associations (xfrm_state) that enable control of a socket's ability to send and receive packets. Patch purpose: The patch is designed to enable the SELinux LSM to implement access control on individual packets based on the strongly authenticated IPSec security association. Such access controls augment the existing ones in SELinux based on network interface and IP address. The former are very coarse-grained, and the latter can be spoofed. By using IPSec, the SELinux can control access to remote hosts based on cryptographic keys generated using the IPSec mechanism. This enables access control on a per-machine basis or per-application if the remote machine is running the same mechanism and trusted to enforce the access control policy. Patch design approach: The patch's main function is to authorize a socket's access to a IPSec policy based on their security contexts. Since the communication is implemented by a security association, the patch ensures that the security association's negotiated and used have the same security context. The patch enables allocation and deallocation of such security contexts for policies and security associations. It also enables copying of the security context when policies are cloned. Lastly, the patch ensures that packets that are sent without using a IPSec security assocation with a security context are allowed to be sent in that manner. A presentation available at www.selinux-symposium.org/2005/presentations/session2/2-3-jaeger.pdf from the SELinux symposium describes the overall approach. Patch implementation details: The function which authorizes a socket to perform a requested operation (send/receive) on a IPSec policy (xfrm_policy) is selinux_xfrm_policy_lookup. The Netfilter and rcv_skb hooks ensure that if a IPSec SA with a securit y association has not been used, then the socket is allowed to send or receive the packet, respectively. The patch implements SELinux function for allocating security contexts when policies (xfrm_policy) are created via the pfkey or xfrm_user interfaces via selinux_xfrm_policy_alloc. When a security association is built, SELinux allocates the security context designated by the XFRM subsystem which is based on that of the authorized policy via selinux_xfrm_state_alloc. When a xfrm_policy is cloned, the security context of that policy, if any, is copied to the clone via selinux_xfrm_policy_clone. When a xfrm_policy or xfrm_state is freed, its security context, if any is also freed at selinux_xfrm_policy_free or selinux_xfrm_state_free. Testing: The SELinux authorization function is tested using ipsec-tools. We created policies and security associations with particular security contexts and added SELinux access control policy entries to verify the authorization decision. We also made sure that packets for which no security context was supplied (which either did or did not use security associations) were authorized using an unlabelled context. Signed-off-by: Trent Jaeger [EMAIL PROTECTED] --- security/selinux/Makefile|2 security/selinux/hooks.c | 43 +++ security/selinux/include/av_perm_to_string.h |2 security/selinux/include/av_permissions.h|2 security/selinux/include/xfrm.h | 47 +++ security/selinux/xfrm.c | 387 +++ 6 files changed, 483 insertions(+) diff -puN security/selinux/Makefile~lsm-selinux-nethooks security/selinux/Makefile --- linux-2.6.14/security/selinux/Makefile~lsm-selinux-nethooks 2005-11-15 17:25:51.0 -0500 +++ linux-2.6.14-root/security/selinux/Makefile 2005-11-15 17:25:51.0 -0500 @@ -8,5 +8,7 @@ selinux-y := avc.o hooks.o selinuxfs.o n selinux-$(CONFIG_SECURITY_NETWORK) += netif.o +selinux-$(CONFIG_SECURITY_NETWORK_XFRM) += xfrm.o + EXTRA_CFLAGS += -Isecurity/selinux/include diff -puN security/selinux/hooks.c~lsm-selinux-nethooks security/selinux/hooks.c --- linux-2.6.14/security/selinux/hooks.c~lsm-selinux-nethooks 2005-11-15 17:25:51.0 -0500 +++ linux-2.6.14-root/security/selinux/hooks.c 2005-11-15 17:25:51.0 -0500 @@ -73,6 +73,7 @@ #include avc.h #include objsec.h #include netif.h +#include xfrm.h #define XATTR_SELINUX_SUFFIX selinux #define XATTR_NAME_SELINUX XATTR_SECURITY_PREFIX XATTR_SELINUX_SUFFIX @@ -3349,6 +3350,10 @@ static int
Pull request for halasa-hdlc branch of netdev-jwl
Jeff, As requested, I separated this from the other patches for individual consideration. John --- The following changes since commit cd52d1ee9a92587b242d946a2300a3245d3b885a: Linus Torvalds: Linux v2.6.15-rc1 are found in the git repository at: git://git.tuxdriver.com/git/netdev-jwl.git halasa-hdlc Krzysztof Halasa: Generic HDLC WAN drivers - disable netif_carrier_off() drivers/net/wan/hdlc_cisco.c |6 ++ drivers/net/wan/hdlc_fr.c |4 drivers/net/wan/hdlc_generic.c |6 ++ 3 files changed, 16 insertions(+), 0 deletions(-) diff --git a/drivers/net/wan/hdlc_cisco.c b/drivers/net/wan/hdlc_cisco.c index a01efa6..1fd0466 100644 --- a/drivers/net/wan/hdlc_cisco.c +++ b/drivers/net/wan/hdlc_cisco.c @@ -192,7 +192,9 @@ static int cisco_rx(struct sk_buff *skb) uptime %ud%uh%um%us)\n, dev-name, days, hrs, min, sec); +#if 0 netif_carrier_on(dev); +#endif hdlc-state.cisco.up = 1; } } @@ -225,7 +227,9 @@ static void cisco_timer(unsigned long ar hdlc-state.cisco.settings.timeout * HZ)) { hdlc-state.cisco.up = 0; printk(KERN_INFO %s: Link down\n, dev-name); +#if 0 netif_carrier_off(dev); +#endif } cisco_keepalive_send(dev, CISCO_KEEPALIVE_REQ, @@ -261,8 +265,10 @@ static void cisco_stop(struct net_device { hdlc_device *hdlc = dev_to_hdlc(dev); del_timer_sync(hdlc-state.cisco.timer); +#if 0 if (netif_carrier_ok(dev)) netif_carrier_off(dev); +#endif hdlc-state.cisco.up = 0; hdlc-state.cisco.request_sent = 0; } diff --git a/drivers/net/wan/hdlc_fr.c b/drivers/net/wan/hdlc_fr.c index e1601d3..523afe1 100644 --- a/drivers/net/wan/hdlc_fr.c +++ b/drivers/net/wan/hdlc_fr.c @@ -545,8 +545,10 @@ static void fr_set_link_state(int reliab hdlc-state.fr.reliable = reliable; if (reliable) { +#if 0 if (!netif_carrier_ok(dev)) netif_carrier_on(dev); +#endif hdlc-state.fr.n391cnt = 0; /* Request full status */ hdlc-state.fr.dce_changed = 1; @@ -560,8 +562,10 @@ static void fr_set_link_state(int reliab } } } else { +#if 0 if (netif_carrier_ok(dev)) netif_carrier_off(dev); +#endif while (pvc) { /* Deactivate all PVCs */ pvc_carrier(0, pvc); diff --git a/drivers/net/wan/hdlc_generic.c b/drivers/net/wan/hdlc_generic.c index cdd4c09..46cef8f 100644 --- a/drivers/net/wan/hdlc_generic.c +++ b/drivers/net/wan/hdlc_generic.c @@ -79,11 +79,13 @@ static void __hdlc_set_carrier_on(struct hdlc_device *hdlc = dev_to_hdlc(dev); if (hdlc-proto.start) return hdlc-proto.start(dev); +#if 0 #ifdef DEBUG_LINK if (netif_carrier_ok(dev)) printk(KERN_ERR hdlc_set_carrier_on(): already on\n); #endif netif_carrier_on(dev); +#endif } @@ -94,11 +96,13 @@ static void __hdlc_set_carrier_off(struc if (hdlc-proto.stop) return hdlc-proto.stop(dev); +#if 0 #ifdef DEBUG_LINK if (!netif_carrier_ok(dev)) printk(KERN_ERR hdlc_set_carrier_off(): already off\n); #endif netif_carrier_off(dev); +#endif } @@ -294,8 +298,10 @@ int register_hdlc_device(struct net_devi if (result != 0) return -EIO; +#if 0 if (netif_carrier_ok(dev)) netif_carrier_off(dev); /* no carrier until DCD goes up */ +#endif return 0; } -- John W. Linville [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
Pull request for netdev-jwl
Jeff, These are simple bugfixes. They are eligible for consideration for the 2.6.15-rc train. John --- The following changes since commit cd52d1ee9a92587b242d946a2300a3245d3b885a: Linus Torvalds: Linux v2.6.15-rc1 are found in the git repository at: git://git.tuxdriver.com/git/netdev-jwl.git James Ketrenos: ipw2100: Fix 'Driver using old /proc/net/wireless...' message John W. Linville: e1000: avoid leak when e1000_setup_loopback_test fails e1000: zero-out pointers in e1000_free_desc_rings fec_8xx: make CONFIG_FEC_8XX depend on CONFIG_8xx drivers/net/e1000/e1000_ethtool.c | 16 +--- drivers/net/fec_8xx/Kconfig |2 +- drivers/net/wireless/ipw2100.c| 29 ++--- drivers/net/wireless/ipw2100.h|2 ++ 4 files changed, 34 insertions(+), 15 deletions(-) diff --git a/drivers/net/e1000/e1000_ethtool.c b/drivers/net/e1000/e1000_ethtool.c index 8eae8ba..8646914 100644 --- a/drivers/net/e1000/e1000_ethtool.c +++ b/drivers/net/e1000/e1000_ethtool.c @@ -960,13 +960,21 @@ e1000_free_desc_rings(struct e1000_adapt } } - if(txdr-desc) + if(txdr-desc) { pci_free_consistent(pdev, txdr-size, txdr-desc, txdr-dma); - if(rxdr-desc) + txdr-desc = NULL; + } + if(rxdr-desc) { pci_free_consistent(pdev, rxdr-size, rxdr-desc, rxdr-dma); + rxdr-desc = NULL; + } kfree(txdr-buffer_info); + txdr-buffer_info = NULL; + kfree(rxdr-buffer_info); + rxdr-buffer_info = NULL; + return; } @@ -1440,9 +1448,11 @@ static int e1000_loopback_test(struct e1000_adapter *adapter, uint64_t *data) { if((*data = e1000_setup_desc_rings(adapter))) goto err_loopback; - if((*data = e1000_setup_loopback_test(adapter))) goto err_loopback; + if((*data = e1000_setup_loopback_test(adapter))) + goto err_loopback_setup; *data = e1000_run_loopback_test(adapter); e1000_loopback_cleanup(adapter); +err_loopback_setup: e1000_free_desc_rings(adapter); err_loopback: return *data; diff --git a/drivers/net/fec_8xx/Kconfig b/drivers/net/fec_8xx/Kconfig index 94e7a9a..a84c232 100644 --- a/drivers/net/fec_8xx/Kconfig +++ b/drivers/net/fec_8xx/Kconfig @@ -1,6 +1,6 @@ config FEC_8XX tristate Motorola 8xx FEC driver - depends on NET_ETHERNET FEC + depends on NET_ETHERNET 8xx select MII config FEC_8XX_GENERIC_PHY diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index a2e6214..77d2a21 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c @@ -6344,7 +6344,8 @@ static struct net_device *ipw2100_alloc_ dev-ethtool_ops = ipw2100_ethtool_ops; dev-tx_timeout = ipw2100_tx_timeout; dev-wireless_handlers = ipw2100_wx_handler_def; - dev-get_wireless_stats = ipw2100_wx_wireless_stats; + priv-wireless_data.ieee80211 = priv-ieee; + dev-wireless_data = priv-wireless_data; dev-set_mac_address = ipw2100_set_address; dev-watchdog_timeo = 3 * HZ; dev-irq = 0; @@ -7178,6 +7179,11 @@ static int ipw2100_wx_get_range(struct n } range-num_frequency = val; + /* Event capability (kernel + driver) */ + range-event_capa[0] = (IW_EVENT_CAPA_K_0 | + IW_EVENT_CAPA_MASK(SIOCGIWAP)); + range-event_capa[1] = IW_EVENT_CAPA_K_1; + IPW_DEBUG_WX(GET Range\n); return 0; @@ -8446,16 +8452,6 @@ static iw_handler ipw2100_private_handle #endif /* CONFIG_IPW2100_MONITOR */ }; -static struct iw_handler_def ipw2100_wx_handler_def = { - .standard = ipw2100_wx_handlers, - .num_standard = sizeof(ipw2100_wx_handlers) / sizeof(iw_handler), - .num_private = sizeof(ipw2100_private_handler) / sizeof(iw_handler), - .num_private_args = sizeof(ipw2100_private_args) / - sizeof(struct iw_priv_args), - .private = (iw_handler *) ipw2100_private_handler, - .private_args = (struct iw_priv_args *)ipw2100_private_args, -}; - /* * Get wireless statistics. * Called by /proc/net/wireless @@ -8597,6 +8593,17 @@ static struct iw_statistics *ipw2100_wx_ return (struct iw_statistics *)NULL; } +static struct iw_handler_def ipw2100_wx_handler_def = { + .standard = ipw2100_wx_handlers, + .num_standard = sizeof(ipw2100_wx_handlers) / sizeof(iw_handler), + .num_private = sizeof(ipw2100_private_handler) / sizeof(iw_handler), + .num_private_args = sizeof(ipw2100_private_args) / + sizeof(struct iw_priv_args), + .private = (iw_handler *) ipw2100_private_handler, + .private_args = (struct iw_priv_args *)ipw2100_private_args, + .get_wireless_stats = ipw2100_wx_wireless_stats, +}; + static void ipw2100_wx_event_work(struct ipw2100_priv *priv) { union
Pull request for upstream-jgarzik branch of netdev-jwl
Jeff, These changes are outside of the bugfix category. John --- The following changes since commit cd52d1ee9a92587b242d946a2300a3245d3b885a: Linus Torvalds: Linux v2.6.15-rc1 are found in the git repository at: git://git.tuxdriver.com/git/netdev-jwl.git upstream-jgarzik Adrian Bunk: drivers/net/sk98lin/skge.c: make SkPciWriteCfgDWord() a static inline hostap: rename hostap.c to hostap_main.c Carlo Perassi: atmel: CodingStyle cleanup Christophe Lucas: atmel: audit return code of create_proc_read_entry John W. Linville: skge: fix warning from inlining SkPciWriteCfgDWord() Tobias Klauser: Remove drivers/net/wan/lmc/lmc_prot.h drivers/net/sk98lin/h/skdrv2nd.h |1 drivers/net/sk98lin/h/skvpd.h |8 drivers/net/sk98lin/skge.c| 43 - drivers/net/wan/lmc/lmc_prot.h| 15 drivers/net/wireless/atmel.c | 1490 +++-- drivers/net/wireless/hostap/Makefile |1 drivers/net/wireless/hostap/hostap_main.c |0 7 files changed, 784 insertions(+), 774 deletions(-) delete mode 100644 drivers/net/wan/lmc/lmc_prot.h rename drivers/net/wireless/hostap/{hostap.c = hostap_main.c} (100%) Patch attached as upstream-jgarzik.patch.bz2 out of size concerns. -- John W. Linville [EMAIL PROTECTED] upstream-jgarzik.patch.bz2 Description: BZip2 compressed data
Re: [PATCH] [IPV4] Fix secondary IP addresses after promotion
On Tue, Nov 08, 2005 at 03:11:15PM +0100, Patrick McHardy wrote: Yes, fixing it correctly looks very hard. Just changing the routes doesn't seem right to me, someone might have added it with exactly this prefsrc and doesn't want it to change, its also not clear how to notify on this. Taking care of correct ordering of the ifa_list is also more complicated without just deleting and readding them. I have a patch to do this, but it needs some debugging, for some unknown reason it crashes sometimes if I remove addresses without specifying the mask. Looks like I'm back on this one because just sending the NETDEV_UP for the secondaries didn't work if a primary other than the first one is removed. If you have anything that you need help testing/debugging, I'm stuck with this until it is fixed. I'd prefer not to duplicate effort on this if you're close to a fix. If not, then I'll try to come up with something and toss it out for comment. BAPper - 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: Pull request for halasa-hdlc branch of netdev-jwl
Krzysztof Halasa wrote: John W. Linville [EMAIL PROTECTED] writes: Jeff, As requested, I separated this from the other patches for individual consideration. John Krzysztof Halasa: Generic HDLC WAN drivers - disable netif_carrier_off() drivers/net/wan/hdlc_cisco.c |6 ++ drivers/net/wan/hdlc_fr.c |4 drivers/net/wan/hdlc_generic.c |6 ++ 3 files changed, 16 insertions(+), 0 deletions(-) Ekhem... May I ask who exactly requested that individual consideration? Probably you are thinking about something different, no? Jeff: as this patch should make 2.6.15, will you send it to Linus or should it be done differently? No worries, John was just helping out, separating this out at my request. This will help me fast-track the patch if need be, after review. Jeff - 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] r8169: do not abort when the power management capabilities are disabled
The capabilities of the 8169 can be disabled but it is hardly a reason to prevent the use the device. The (so far) unusual behavior has been reported on a MIPS platform by Yoichi Yuasa. Spotted-by: Yoichi Yuasa [EMAIL PROTECTED] Signed-off-by: Francois Romieu [EMAIL PROTECTED] --- drivers/net/r8169.c |4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) e53091fae52931a96dfb661f2b78e0a91e5f9978 diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1346,10 +1346,8 @@ rtl8169_init_board(struct pci_dev *pdev, } else { if (netif_msg_probe(tp)) { printk(KERN_ERR PFX - Cannot find PowerManagement capability. - Aborting.\n); + PowerManagement capability not found.\n); } - goto err_out_mwi; } /* make sure PCI base addr 1 is MMIO */ - 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/2] r8169: introduction
This serie adresses two bugs in the r8169 driver: o fix printk_ratelimit in the interrupt handler o do not abort when the power management capabilities are disabled Please consider pulling from branch 'for-jeff' at git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6.git -- Ueimor - 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] r8169: fix printk_ratelimit in the interrupt handler
I keep on getting printk: N messages suppressed messages. We need to test netif_msg_intr() _before_ running printk_ratelimit(), because the latter updates state. Cc: Jeff Garzik [EMAIL PROTECTED] Signed-off-by: Andrew Morton [EMAIL PROTECTED] Signed-off-by: Francois Romieu [EMAIL PROTECTED] --- drivers/net/r8169.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 7c8b2eb4c71d5c3d45dbfe0c81fefe81e264e9b3 diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -2516,7 +2516,7 @@ rtl8169_interrupt(int irq, void *dev_ins } while (boguscnt 0); if (boguscnt = 0) { - if (net_ratelimit() netif_msg_intr(tp)) { + if (netif_msg_intr(tp) net_ratelimit() ) { printk(KERN_WARNING %s: Too much work at interrupt!\n, dev-name); } - 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 netdev-2.6 0/8] e1000: Driver update
e1000 driver update Signed-off-by: Jeff Kirsher [EMAIL PROTECTED] Signed-off-by: John Ronciak [EMAIL PROTECTED] Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED] 1. Fixes for 8257x - TSO workaround - Fixes eeprom version reporting - Fix loopback test - Fix for WOL 2. Performance Enhancements - aggressive prefetch of rx_desc and skb-data just like we do for 10gig - align the prefetches to a dword to help speed them up - copybreak for packets 256 bytes, ideally we would like to modify ethtool to allow this value to be changed, helps small MTU, many reassemblies case - Fix RX buffer size changes - Fixed Jumbo frames and memory allocation 3. New features and devices - Print bus speed, width, and MAC when loading - Added device support for fiber adapter 4. Multiple Fixes - Fix RX fifo errors and statistics counting - Fix for SoL/IDER sessions - Fix flow control watermarks - Fix DPRINTK statement 5. Fix compilation warnings - Handle return values from functions 6. Comments/Doc/Driver Version 7. Whitespace Fix - Remove trailing whitespaces - Improve readability 8. Multique Fixes - Added ethtool stats for multiple queues - Added printout for an indication that mutliqueue is enabled/disabled - Fixed receive issue where tasks were not being assigned a cpu -- Cheers, Jeff - 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 netdev-2.6 8/8] e1000: Multique Fixes
Multique Fixes - Added ethtool stats for multiple queues - Added printout for an indication that mutliqueue is enabled/disabled - Fixed receive issue where tasks were not being assigned a cpu Signed-off-by: Jeff Kirsher [EMAIL PROTECTED] Signed-off-by: John Ronciak [EMAIL PROTECTED] Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED] diff -up linux-2.6/drivers/net/e1000/e1000.h linux-2.6.new/drivers/net/e1000/e1000.h --- linux-2.6/drivers/net/e1000/e1000.h 2005-11-14 16:20:34.0 -0800 +++ linux-2.6.new/drivers/net/e1000/e1000.h 2005-11-04 01:23:40.0 -0800 @@ -72,10 +72,6 @@ #include linux/mii.h #include linux/ethtool.h #include linux/if_vlan.h -#ifdef CONFIG_E1000_MQ -#include linux/cpu.h -#include linux/smp.h -#endif #define BAR_0 0 #define BAR_1 1 @@ -87,6 +87,10 @@ struct e1000_adapter; #include e1000_hw.h +#ifdef CONFIG_E1000_MQ +#include linux/cpu.h +#include linux/smp.h +#endif #ifdef DBG #define E1000_DBG(args...) printk(KERN_DEBUG e1000: args) @@ -169,6 +169,13 @@ struct e1000_buffer { uint16_t next_to_watch; }; +#ifdef CONFIG_E1000_MQ +struct e1000_queue_stats { + uint64_t packets; + uint64_t bytes; +}; +#endif + struct e1000_ps_page { struct page *ps_page[PS_PAGE_BUFFERS]; }; struct e1000_ps_page_dma { uint64_t ps_page_dma[PS_PAGE_BUFFERS]; }; @@ -191,10 +189,12 @@ struct e1000_tx_ring { spinlock_t tx_lock; uint16_t tdh; uint16_t tdt; - uint64_t pkt; boolean_t last_tx_tso; +#ifdef CONFIG_E1000_MQ + struct e1000_queue_stats tx_stats; +#endif }; struct e1000_rx_ring { @@ -224,7 +215,9 @@ struct e1000_rx_ring { uint16_t rdh; uint16_t rdt; - uint64_t pkt; +#ifdef CONFIG_E1000_MQ + struct e1000_queue_stats rx_stats; +#endif }; #define E1000_DESC_UNUSED(R) \ @@ -306,7 +294,6 @@ struct e1000_adapter { #ifdef CONFIG_E1000_MQ struct net_device **cpu_netdev; /* per-cpu */ struct call_async_data_struct rx_sched_call_data; - int cpu_for_queue[4]; #endif int num_queues; diff -up linux-2.6/drivers/net/e1000/e1000_ethtool.c linux-2.6.new/drivers/net/e1000/e1000_ethtool.c --- linux-2.6/drivers/net/e1000/e1000_ethtool.c 2005-11-14 16:20:34.0 -0800 +++ linux-2.6.new/drivers/net/e1000/e1000_ethtool.c 2005-11-04 01:23:40.0 -0800 @@ -96,8 +96,17 @@ static const struct e1000_stats e1000_gs { rx_header_split, E1000_STAT(rx_hdr_split) }, { alloc_rx_buff_failed, E1000_STAT(alloc_rx_buff_failed) }, }; -#define E1000_STATS_LEN\ + +#ifdef CONFIG_E1000_MQ +#define E1000_QUEUE_STATS_LEN \ + (((struct e1000_adapter *)netdev-priv)-num_queues * 2) \ + * (sizeof(struct e1000_queue_stats) / sizeof(uint64_t)) +#else +#define E1000_QUEUE_STATS_LEN 0 +#endif +#define E1000_GLOBAL_STATS_LEN \ sizeof(e1000_gstrings_stats) / sizeof(struct e1000_stats) +#define E1000_STATS_LEN (E1000_GLOBAL_STATS_LEN + E1000_QUEUE_STATS_LEN) static const char e1000_gstrings_test[][ETH_GSTRING_LEN] = { Register test (offline), Eeprom test(offline), Interrupt test (offline), Loopback test (offline), @@ -1781,19 +1707,43 @@ e1000_nway_reset(struct net_device *netd struct ethtool_stats *stats, uint64_t *data) { struct e1000_adapter *adapter = netdev_priv(netdev); +#ifdef CONFIG_E1000_MQ + uint64_t *queue_stat; + int stat_count = sizeof(struct e1000_queue_stats) / sizeof(uint64_t); + int j, k; +#endif int i; e1000_update_stats(adapter); - for(i = 0; i E1000_STATS_LEN; i++) { - char *p = (char *)adapter+e1000_gstrings_stats[i].stat_offset; - data[i] = (e1000_gstrings_stats[i].sizeof_stat == + for(i = 0; i E1000_GLOBAL_STATS_LEN; i++) { + char *p = (char *)adapter+e1000_gstrings_stats[i].stat_offset; + data[i] = (e1000_gstrings_stats[i].sizeof_stat == sizeof(uint64_t)) ? *(uint64_t *)p : *(uint32_t *)p; } +#ifdef CONFIG_E1000_MQ + for (j = 0; j adapter-num_queues; j++) { + queue_stat = (uint64_t *)adapter-tx_ring[j].tx_stats; + for (k = 0; k stat_count; k++) + data[i + k] = queue_stat[k]; + i += k; + } + for (j = 0; j adapter-num_queues; j++) { + queue_stat = (uint64_t *)adapter-rx_ring[j].rx_stats; + for (k = 0; k stat_count; k++) + data[i + k] = queue_stat[k]; + i += k; + } +#endif +/* BUG_ON(i != E1000_STATS_LEN); */ } static void e1000_get_strings(struct net_device *netdev, uint32_t stringset, uint8_t *data) { +#ifdef CONFIG_E1000_MQ + struct e1000_adapter *adapter = netdev_priv(netdev); +#endif + uint8_t *p = data; int i; switch(stringset) { @@ -1802,11 +1707,26 @@ E1000_TEST_LEN*ETH_GSTRING_LEN);
[PATCH netdev-2.6 7/8] e1000: Whitespace fix
Whitespace Fix - Remove trailing whitespaces - Improve readability Signed-off-by: Jeff Kirsher [EMAIL PROTECTED] Signed-off-by: John Ronciak [EMAIL PROTECTED] Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED] diff -up linux-2.6/drivers/net/e1000/e1000_ethtool.c linux-2.6.new/drivers/net/e1000/e1000_ethtool.c --- linux-2.6/drivers/net/e1000/e1000_ethtool.c 2005-11-14 16:20:34.0 -0800 +++ linux-2.6.new/drivers/net/e1000/e1000_ethtool.c 2005-11-04 01:23:40.0 -0800 @@ -195,11 +195,11 @@ e1000_set_settings(struct net_device *ne if(ecmd-autoneg == AUTONEG_ENABLE) { hw-autoneg = 1; - if(hw-media_type == e1000_media_type_fiber) + if (hw-media_type == e1000_media_type_fiber) hw-autoneg_advertised = ADVERTISED_1000baseT_Full | ADVERTISED_FIBRE | ADVERTISED_Autoneg; - else + else hw-autoneg_advertised = ADVERTISED_10baseT_Half | ADVERTISED_10baseT_Full | ADVERTISED_100baseT_Half | @@ -231,9 +231,9 @@ e1000_get_pauseparam(struct net_device * struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = adapter-hw; - pause-autoneg = + pause-autoneg = (adapter-fc_autoneg ? AUTONEG_ENABLE : AUTONEG_DISABLE); - + if(hw-fc == e1000_fc_rx_pause) pause-rx_pause = 1; else if(hw-fc == e1000_fc_tx_pause) @@ -250,7 +250,7 @@ e1000_set_pauseparam(struct net_device * { struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_hw *hw = adapter-hw; - + adapter-fc_autoneg = pause-autoneg; if(pause-rx_pause pause-tx_pause) @@ -274,7 +274,7 @@ e1000_set_pauseparam(struct net_device * else return ((hw-media_type == e1000_media_type_fiber) ? e1000_setup_link(hw) : e1000_force_mac_fc(hw)); - + return 0; } @@ -298,7 +298,7 @@ e1000_set_rx_csum(struct net_device *net e1000_reset(adapter); return 0; } - + static uint32_t e1000_get_tx_csum(struct net_device *netdev) { @@ -329,8 +334,8 @@ static int e1000_set_tso(struct net_device *netdev, uint32_t data) { struct e1000_adapter *adapter = netdev_priv(netdev); - if((adapter-hw.mac_type e1000_82544) || - (adapter-hw.mac_type == e1000_82547)) + if ((adapter-hw.mac_type e1000_82544) || + (adapter-hw.mac_type == e1000_82547)) return data ? -EINVAL : 0; if (data) @@ -338,7 +334,7 @@ else netdev-features = ~NETIF_F_TSO; return 0; -} +} #endif /* NETIF_F_TSO */ static uint32_t @@ -355,7 +355,7 @@ e1000_set_msglevel(struct net_device *ne adapter-msg_enable = data; } -static int +static int e1000_get_regs_len(struct net_device *netdev) { #define E1000_REGS_LEN 32 @@ -557,9 +551,9 @@ e1000_set_eeprom(struct net_device *netd ret_val = e1000_write_eeprom(hw, first_word, last_word - first_word + 1, eeprom_buff); - /* Update the checksum over the first part of the EEPROM if needed + /* Update the checksum over the first part of the EEPROM if needed * and flush shadow RAM for 82573 conrollers */ - if((ret_val == 0) ((first_word = EEPROM_CHECKSUM_REG) || + if ((ret_val == 0) ((first_word = EEPROM_CHECKSUM_REG) || (hw-mac_type == e1000_82573))) e1000_update_eeprom_checksum(hw); @@ -623,7 +623,7 @@ e1000_get_ringparam(struct net_device *n ring-rx_jumbo_pending = 0; } -static int +static int e1000_set_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring) { @@ -666,12 +666,12 @@ e1000_set_ringparam(struct net_device *n rxdr-count = max(ring-rx_pending,(uint32_t)E1000_MIN_RXD); rxdr-count = min(rxdr-count,(uint32_t)(mac_type e1000_82544 ? E1000_MAX_RXD : E1000_MAX_82544_RXD)); - E1000_ROUNDUP(rxdr-count, REQ_RX_DESCRIPTOR_MULTIPLE); + E1000_ROUNDUP(rxdr-count, REQ_RX_DESCRIPTOR_MULTIPLE); txdr-count = max(ring-tx_pending,(uint32_t)E1000_MIN_TXD); txdr-count = min(txdr-count,(uint32_t)(mac_type e1000_82544 ? E1000_MAX_TXD : E1000_MAX_82544_TXD)); - E1000_ROUNDUP(txdr-count, REQ_TX_DESCRIPTOR_MULTIPLE); + E1000_ROUNDUP(txdr-count, REQ_TX_DESCRIPTOR_MULTIPLE); for (i = 0; i adapter-num_queues; i++) { txdr[i].count = txdr-count; @@ -736,7 +736,7 @@ err_setup_rx: uint32_t value;\ E1000_WRITE_REG(adapter-hw, R, W M); \ value =
[PATCH netdev-2.6 6/8] e1000: Comments/Doc/Driver Version
Comments/Doc/Driver Version Signed-off-by: Jeff Kirsher [EMAIL PROTECTED] Signed-off-by: John Ronciak [EMAIL PROTECTED] Signed-off-by: Jesse Brandeburg [EMAIL PROTECTED] diff -up linux-2.6/drivers/net/e1000/e1000_hw.c linux-2.6.new/drivers/net/e1000/e1000_hw.c --- linux-2.6/drivers/net/e1000/e1000_hw.c 2005-11-14 16:20:34.0 -0800 +++ linux-2.6.new/drivers/net/e1000/e1000_hw.c 2005-11-04 01:23:40.0 -0800 @@ -318,6 +318,7 @@ e1000_set_mac_type(struct e1000_hw *hw) case E1000_DEV_ID_82546GB_FIBER: case E1000_DEV_ID_82546GB_SERDES: case E1000_DEV_ID_82546GB_PCIE: +case E1000_DEV_ID_82546GB_QUAD_COPPER: hw-mac_type = e1000_82546_rev_3; break; case E1000_DEV_ID_82541EI: diff -up linux-2.6/drivers/net/e1000/e1000_main.c linux-2.6.new/drivers/net/e1000/e1000_main.c --- linux-2.6/drivers/net/e1000/e1000_main.c2005-11-14 16:20:34.0 -0800 +++ linux-2.6.new/drivers/net/e1000/e1000_main.c2005-11-04 01:23:40.0 -0800 @@ -29,10 +29,85 @@ #include e1000.h /* Change Log + * 6.2.15 9/20/05 + * o For all AMT enabled configurations, set/reset DRV_LOAD bit on + * interface open/close. The DRV_LOAD bit must not be set if the + * driver is loaded but the interface is not open + * 6.2.14 9/15/05 + * o In AMT enabled configurations, set/reset DRV_LOAD bit on interface + * open/close + * 6.2.13 9/14/05 + * o Invoke e1000_check_mng_mode only for 8257x controllers since it + * accesses the FWSM that is not supported in other controllers + * 6.2.12 9/9/05 + * o Add support for device id E1000_DEV_ID_82546GB_QUAD_COPPER + * o set RCTL:SECRC only for controllers newer than 82543. + * o When the n/w interface comes down reset DRV_LOAD bit to notify f/w. + * This code was moved from e1000_remove to e1000_close + * 6.2.10 9/6/05 + * o Fix error in updating RDT in el1000_alloc_rx_buffers[_ps] -- one off. + * o Enable fc by default on 82573 controllers (do not read eeprom) + * o Fix rx_errors statistic not to include missed_packet_count + * o Fix rx_dropped statistic not to include missed_packet_count + (Padraig Brady) + * 6.2.98/30/05 + * o Remove call to update statistics from the controller ib e1000_get_stats + * 6.2.88/30/05 + * o Improved algorithm for rx buffer allocation/rdt update + * o Flow control watermarks relative to rx PBA size + * o Simplified 'Tx Hung' detect logic + * 6.2.7 8/17/05 + * o Report rx buffer allocation failures and tx timeout counts in stats + * 6.2.6 8/16/05 + * o Implement workaround for controller erratum -- linear non-tso packet + * following a TSO gets written back prematurely + * 6.2.5 8/15/05 + * o Set netdev-tx_queue_len based on link speed/duplex settings. + * o Fix net_stats.rx_fifo_errors [EMAIL PROTECTED] + * o Do not power off PHY if SoL/IDER session is active + * 6.2.4 8/10/05 + * o Fix loopback test setup/cleanup for 82571/3 controllers + * o Fix parsing of outgoing packets (e1000_transfer_dhcp_info) to treat + * all packets as raw + * o Prevent operations that will cause the PHY to be reset if SoL/IDER + * sessions are active and log a message + * 6.2.2 7/21/05 + * o used fixed size descriptors for all MTU sizes, reduces memory load + * 6.2.1 7/21/05 + * o Performance tweaks, including copybreak and prefetch + * 6.1.2 4/13/05 + * o Fixed ethtool diagnostics + * o Enabled flow control to take default eeprom settings + * o Added stats_lock around e1000_read_phy_reg commands to avoid concurrent + * calls, one from mii_ioctl and other from within update_stats while processing + * MIIREG ioctl. * 6.0.58 4/20/05 - * o Accepted ethtool cleanup patch from Stephen Hemminger + * o e1000_set_spd_dplx tests for compatible speed/duplex specification + * for fiber adapters + * 6.0.57 4/19/05 + * o Added code to fix register test failure for devices = 82571 + * 6.0.55 3/23/05 + * o Support for MODULE_VERSION + * o Fix APM setting for 82544 based adapters + * 6.0.54 3/26/05 + * o Added a timer to expire packets that were deferred for cleanup + * 6.0.52 3/15/05 + * o Added stats_lock around e1000_read_phy_reg commands to avoid concurrent + * calls, one from mii_ioctl and other from within update_stats while + * processing MIIREG ioctl. + * 6.0.47 3/2/05 + * o Added enhanced functionality to the loopback diags to wrap the + * descriptor rings + * o Added manageability vlan filtering workaround. * 6.0.44+ 2/15/05 - * o applied Anton's patch to resolve tx hang in hardware + * o Added code to handle raw packet based DHCP packets + * o Added code to fix the errata 10 buffer overflow issue + * o Sync up with WR01-05 + * o applied Anton's patch to resolve tx hang in hardware + * o e1000 timeouts with early writeback patch + * o Removed Queensport
Re: 2.6.15-rc1: NET_CLS_U32 not working?
On Thu, Nov 17, 2005 at 12:10:17AM +0100, Christian wrote: hi, i noticed that some of my QoS rules are not working any more. oh, i forgot to enable CONFIG_NET_CLS_U32. but when enabled, i got the following errors when compiling / installing the module: * Warning: unregister_tcf_proto_ops [net/sched/cls_u32.ko] undefined! * Warning: register_tcf_proto_ops [net/sched/cls_u32.ko] undefined! * Warning: tcf_exts_dump [net/sched/cls_u32.ko] undefined! * Warning: tcf_exts_dump_stats [net/sched/cls_u32.ko] undefined! * Warning: tcf_exts_change [net/sched/cls_u32.ko] undefined! * Warning: tcf_exts_validate [net/sched/cls_u32.ko] undefined! * Warning: tcf_exts_destroy [net/sched/cls_u32.ko] undefined! ... when i disabled CONFIG_NET_CLS_U32, everything compiles fine, but cls_u32 is missing of course :-( all the missing symbols seem to be defined in include/net/pkt_cls.h. but this file is #included by net/sched/cls_u32.c and other too, so i don't really know, why it doesn't work. FWIW, i see EXPORT_SYMBOLs at the very end of net/sched/cls_api.c, but i can't see if/when cls_api.c is used (included?) at all. ... I'm assuming you are trying to insert the new module in your old kernel? This is one of the unfortunate but hardly avoidable cases where adding a module requires installing a new kernel. But there's a change in 2.6.15-rc1 that makes this issue much worse: It is no longer user-visible. tristate's select'ing bool's that do not change parts of the (modular) driver but compile additional code into the kernel are simply wrong. thanks for looking into that, Christian. ... cu Adrian BTW: Please Cc netdev@vger.kernel.org on networking issues. -- Is there not promise of rain? Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. Only a promise, Lao Er said. Pearl S. Buck - Dragon Seed - 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: 2.6.15-rc1: NET_CLS_U32 not working?
Adrian Bunk schrieb: I'm assuming you are trying to insert the new module in your old kernel? yes, i tried to modprobe the compiled cls_u32 module. but the make modules errors are there anyway. i tried to compile a fresh 2.6.15-rc1 on a different machine (where i can't do modprobe) and the errors were there too: http://nerdbynature.de/bits/sheep/2.6.15-rc1/make-modules.log This is one of the unfortunate but hardly avoidable cases where adding a module requires installing a new kernel. despite of the errors on make modules i'll reboot with the new kernel asap. BTW: Please Cc netdev@vger.kernel.org on networking issues. ok, will do that. thank you, Christian. -- BOFH excuse #442: Trojan horse ran out of hay - 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 02/10]: [NETFILTER]: Defer fragmentation in ip_output when connection tracking is used
Herbert Xu wrote: On Fri, Nov 11, 2005 at 03:19:17AM +, Patrick McHardy wrote: [NETFILTER]: Defer fragmentation in ip_output when connection tracking is used This allows to get rid of the okfn use in ip_refrag and save the useless fragmentation/defragmentation step when NAT is used. I'm slightly uneasy about this change because for POST_ROUTING, the defragmentation occurs in the middle of the hook, NF_IP_PRI_NAT_SRC. This means that things like the mangle table currently sees the fragments as opposed to the whole packet. This patch will change that. Now I'm not saying that this is necessarily a bad thing. In fact, for all I know it might make more sense to do this. But we should consider the possible implications before embarking on it. Good point. I would also prefer to have fragmentation occur after POST_ROUTING in all cases. Looking at the in-tree targets, it means loosing the ability to do a couple of things: - CLASSIFY fragments differently - MARK fragments differently - DSCP/ECN/TOS mark fragments differently - Change TTLs of fragments to differently values None of them seems very important. The DSCP and ECN targets were broken until not long ago without anyone noticing, the TTL target is relatively new. So it comes down to loosing the ability to classify fragments of one packet differently using iptables, which doesn't make much sense too me. In fact I think it would make classification easier if mangle would see the whole packet. I've CCed Harald for his opinion in case I missed something. Regards Patrick - 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 00/10]: Netfilter IPsec support
Marco Berizzi wrote: How are handled NAT-T packets (udp/4500) with these patches? Instead of ESP packets you see the encapsulated UDP packets on the netfilter hooks: (none):~# ping 10.0.0.1 -c 1 PING 10.0.0.1 (10.0.0.1): 56 data bytes OUTPUT IN= OUT=eth0 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=16899 SEQ=0 POSTROUTING IN= OUT=eth0 SRC=10.0.0.2 DST=10.0.0.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=16899 SEQ=0 OUTPUT IN= OUT=eth0 SRC=10.0.0.2 DST=10.0.0.1 LEN=160 TOS=0x00 PREC=0x00 TTL=64 ID=256 DF PROTO=UDP SPT=4500 DPT=4500 LEN=140 POSTROUTING IN= OUT=eth0 SRC=10.0.0.2 DST=10.0.0.1 LEN=160 TOS=0x00 PREC=0x00 TTL=64 ID=256 DF PROTO=UDP SPT=4500 DPT=4500 LEN=140 PREROUTING IN=eth0 OUT= MAC=fe:fd:0a:00:00:02:36:ec:4f:25:dc:68:08:00 SRC=10.0.0.1 DST=10.0.0.2 LEN=160 TOS=0x00 PREC=0x00 TTL=64 ID=19709 PROTO=UDP SPT=4500 DPT=4500 LEN=140 INPUT IN=eth0 OUT= MAC=fe:fd:0a:00:00:02:36:ec:4f:25:dc:68:08:00 SRC=10.0.0.1 DST=10.0.0.2 LEN=160 TOS=0x00 PREC=0x00 TTL=64 ID=19709 PROTO=UDP SPT=4500 DPT=4500 LEN=140 PREROUTING IN=eth0 OUT= MAC=fe:fd:0a:00:00:02:36:ec:4f:25:dc:68:08:00 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=19708 PROTO=ICMP TYPE=0 CODE=0 ID=16899 SEQ=0 INPUT IN=eth0 OUT= MAC=fe:fd:0a:00:00:02:36:ec:4f:25:dc:68:08:00 SRC=10.0.0.1 DST=10.0.0.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=19708 PROTO=ICMP TYPE=0 CODE=0 ID=16899 SEQ=0 64 bytes from 10.0.0.1: icmp_seq=0 ttl=64 time=25.9 ms - 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: Issue 0 WAS (Re: Oustanding issues WAS(IRe: Consensus? WAS(RFC 2863)
On Wed, 2005-16-11 at 16:46 +0100, Stefan Rompf wrote: Am Mittwoch 16 November 2005 03:16 schrieb jamal: I will not respond to the rest of your email - I wanna make sure we are in sync first on the above. So let me summarize: Ok, let's see if I understood you: 1) There are read_only oper state IFF_XXX flags which are sent via netlink to user space. These are set by the kernel (and not by user space); they reflect the state of link. managed only by the device driver or several layers of the device driver. yes. Caveat: In the case of a link protocol managed by user space such as 802.1x (or STP when done properly) - flags from #2 as sent by say the supplicant user space code will be used to move from dormant-UP; The real setting of the read_only flags in #1 however is done in the kernel. 2) There are read/write admin IFF_XXX flags which are used to select the link-oper mode. I made some suggestions in the earlier email and referenced the BSD man pages. By default the state transition is from Down-UP. A mode could be selected to set a device so it goes from Down-Dormant. The setting of link-oper mode tells the kernel how to map the flags from 1) to 3) yes. And at the moment i can only see two modes (default and one that selects between dormant/down), although we should probably have two bits. Maybe we can call this something along the lines of IFF_OPMODE. I dont know if we should enforce that a device be ifdowned first before setting this or not. There is one other thing (and the approach doesnt have to be what i suggest below but i cant see a big variation): A netif_carrier_on() by a netdevice which has been admin configured to move between down-dormant will infact move it to that state and not to the operational up state. In the case of default mode, (down-up) it will move from down-up 3) There is a kernel dev-operstate_kernel which is accessible via user space in the same manner IFF_UP flags are set etc. Depending on the selected policy in 2), this state is managed by userspace and/or kernel and shows the RFC2863 operstate of the device. indeed. Note: To accomplish our goal to tell dhcp/router daemons when a device is ready for real traffic, IFF_RUNNING has to be derived from here. I think IFF_RUNNING hasnt changed meaning in that it reflects the operational DOWN/UP state. We may have to export two new IFF_XXX operational flags to user space {IFF_DORMANT and IFF_LLD} like i was suggesting earlier; i cant see any other way to escape exporting those two if we are to maintain backward compat for IFF_RUNNING. Even though some things ma not make sense, like IFF_RUNNING and IFF_DORMANT being set together or IFF_RUNNING and IFF_LLD both being set may not make sense. Lets get in sync with the above first. All in all, I think my understanding of your idea would work and looks good. But if I still didn't get it, it really would be best if you are next in posting a patch or pseudo code ;-) I hope the above is clear - any patch will have to be a mix of the ones posted so far. If we are in agreement, i can post what i think the states are; although if we are in agreement above i dont see the need to. cheers, jamal - 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: ROHC over PPP patch
Jesus Arango writes: I would like to porpose (see attached patch) the addition of protocol values for multiplexing and demultiplexing ROHC header compression packets. The constants in this patch are compliant with RFC 3241 (ROHC over PPP). You could take pity on the reader of the code, and us as well, by at least expanding the ROHC acronym in a comment somewhere, and preferably explaining what it is and what it's good for... 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