* Re: [PATCH][BNX2X] round three
From: Eliezer Tamir @ 2007-10-10 19:52 UTC (permalink / raw)
To: davem@davemloft.net, netdev@vger.kernel.org, jeff@garzik.org,
Michael Chan
In-Reply-To: <1192038559.29746.127.camel@eliezer>
Eliezer Tamir wrote:
> The full patch is available at:
> Net_sys_anon@ftp://ftp1.broadcom.com/0001-BNX2X-0.40.10a-net-2.6.24.patch
Just when I thought I have beaten the line beast.
(or maybe it's just too much work and not enough sleep.)
the right links are of course:
ftp://Net_sys_anon@ftp1.broadcom.com/0001-BNX2X-0.40.10a-net-2.6.24.patch
and
ftp://Net_sys_anon@ftp1.broadcom.com/0001-BNX2X-0.40.10a-net-2.6.24.patch.gz
^ permalink raw reply
* Re: [PATCH][NETNS] Make ifindex generation per-namespace
From: Eric W. Biederman @ 2007-10-10 19:51 UTC (permalink / raw)
To: Johannes Berg; +Cc: Pavel Emelyanov, David Miller, Linux Netdev List, devel
In-Reply-To: <1192041243.4770.8.camel@johannes.berg>
Johannes Berg <johannes@sipsolutions.net> writes:
> On Tue, 2007-10-09 at 11:41 -0600, Eric W. Biederman wrote:
>
>> So please hold off on this until the kernel has been audited and
>> we have removed all of the uses of ifindex that assume ifindex is
>> global, that we can find.
>
> I certainly have this assumption in the wireless code (cfg80211). How
> would I go about removing it? Are netlink sockets per-namespace so I can
> use the namespace of the netlink socket to look up a netdev?
Yes. Netlink sockets are per-namespace and you can use the namespace
of a netlink socket to look up a netdev.
Eric
^ permalink raw reply
* Re: authenc compile warnings in current net-2.6.24
From: Sebastian Siewior @ 2007-10-10 19:53 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: Herbert Xu, netdev
In-Reply-To: <470D11B1.2040207@hartkopp.net>
* Oliver Hartkopp | 2007-10-10 19:53:53 [+0200]:
> CC [M] crypto/authenc.o
> crypto/authenc.c: In function ?crypto_authenc_hash?:
> crypto/authenc.c:88: warning: ?cryptlen? may be used uninitialized in this
> function
> crypto/authenc.c:87: warning: ?dst? may be used uninitialized in this
> function
> crypto/authenc.c: In function ?crypto_authenc_decrypt?:
> crypto/authenc.c:163: warning: ?cryptlen? may be used uninitialized in this
> function
> crypto/authenc.c:163: note: ?cryptlen? was declared here
> crypto/authenc.c:162: warning: ?src? may be used uninitialized in this
> function
> crypto/authenc.c:162: note: ?src? was declared here
>
> do you already know these warnings?
Those warnings are looking like a compiler bug to me.
> Oliver
Sebastian
^ permalink raw reply
* Re: [IPv6] Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493
From: David Stevens @ 2007-10-10 20:45 UTC (permalink / raw)
To: Brian Haley
Cc: David Miller, netdev@vger.kernel.org, netdev-owner,
YOSHIFUJI Hideaki
In-Reply-To: <470CEA05.8080809@hp.com>
What about just checking for 0 in the later test?
if (val && __dev_get_by_index(val) == NULL) {
...
+-DLS
^ permalink raw reply
* Re: [ofa-general] Re: [PATCH RFC] RDMA/CMA: Allocate PS_TCP ports from the host TCP port space.
From: Sean Hefty @ 2007-10-10 21:01 UTC (permalink / raw)
To: Steve Wise; +Cc: netdev, rdreier, David Miller, general, linux-kernel
In-Reply-To: <470AA729.2050009@opengridcomputing.com>
> The hack to use a socket and bind it to claim the port was just for
> demostrating the idea. The correct solution, IMO, is to enhance the
> core low level 4-tuple allocation services to be more generic (eg: not
> be tied to a struct sock). Then the host tcp stack and the host rdma
> stack can allocate TCP/iWARP ports/4tuples from this common exported
> service and share the port space. This allocation service could also be
> used by other deep adapters like iscsi adapters if needed.
Since iWarp runs on top of TCP, the port space is really the same.
FWIW, I agree that this proposal is the correct solution to support iWarp.
- Sean
^ permalink raw reply
* Re: [IPv6] Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493
From: Brian Haley @ 2007-10-10 21:20 UTC (permalink / raw)
To: David Stevens
Cc: David Miller, netdev@vger.kernel.org, netdev-owner,
YOSHIFUJI Hideaki
In-Reply-To: <OF75CC6365.1CACD211-ON88257370.0071BBE2-88257370.0071F400@us.ibm.com>
David Stevens wrote:
> What about just checking for 0 in the later test?
>
> if (val && __dev_get_by_index(val) == NULL) {
We could fail the next check right before that though:
if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val)
goto e_inval;
I just mimicked what the IPv4 code does in do_ip_setsockopt().
-Brian
^ permalink raw reply
* Re: [IPv6] Update setsockopt(IPV6_MULTICAST_IF) to support RFC 3493
From: David Stevens @ 2007-10-10 21:48 UTC (permalink / raw)
To: Brian Haley
Cc: David Miller, netdev@vger.kernel.org, netdev-owner,
YOSHIFUJI Hideaki
In-Reply-To: <470D422D.5070403@hp.com>
Brian Haley <brian.haley@hp.com> wrote on 10/10/2007 02:20:45 PM:
> David Stevens wrote:
> > What about just checking for 0 in the later test?
> >
> > if (val && __dev_get_by_index(val) == NULL) {
>
> We could fail the next check right before that though:
Right, the semantics there would be "if we have a bound
dev if, that's the only legal value here." Setting it to '0' in
that case doesn't really do anythng, anyway. But I don't care
about that semantic difference-- could even add "val &&" to the
bound_dev_if check.
What I don't like is that your "if" creates an identical
duplicate code path for the functional part of it. In this case
it's trivial (the asignment), but makes the code look more
complex than it really is. If v4 does it that way, I don't
like that either. :-)
I agree with it in general, and may not be worth the
trouble, but I'd personally prefer something like:
if (sk->sk_type == SOCK_STREAM)
goto e_inval;
if (val && sk->sk_bound_dev_if && sk->sk_bound_dev_if != val)
goto e_inval;
if (val && __dev_get_by_index(val) != NULL) {
retv = -ENODEV;
break;
}
[at this point all validity checks are done and we're following
one code path to do the work; each check is easily
identifiable.]
np->mcast_oif = val;
retv = 0;
break;
Or maybe:
if (sk->sk_type == SOCK_STREAM)
goto e_inval;
if (val) {
if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != val)
goto e_inval;
if (__dev_get_by_index(val != NULL) {
retv = -ENODEV;
break;
}
}
np->mcast_oif = val;
retv = 0;
break;
But anyway, I made the comment; I think some form of it
should go in. :-) If you like the original better, that's
ok with me, too.
+-DLS
^ permalink raw reply
* [PATCH 0/2] QE clock source improvements
From: Timur Tabi @ 2007-10-10 22:18 UTC (permalink / raw)
To: galak, linuxppc-dev, netdev
This patch set adds a new property to make specifying QE clock sources
easier, adds a function to help parse the property, updates some other
functions to use an enum instead of an integer, and updates the ucc_geth
driver to take advantage of all this.
^ permalink raw reply
* [PATCH 1/2] qe: add function qe_clock_source
From: Timur Tabi @ 2007-10-10 22:18 UTC (permalink / raw)
To: galak, linuxppc-dev, netdev; +Cc: Timur Tabi
In-Reply-To: <1192054708946-git-send-email-timur@freescale.com>
Add function qe_clock_source() which takes a string containing the name of a
QE clock source (as is typically found in device trees) and returns the
matching enum qe_clock value.
Update booting-without-of.txt to indicate that the UCC properties rx-clock
and tx-clock are deprecated and replaced with rx-clock-name and tx-clock-name,
which use strings instead of numbers to indicate QE clock sources.
Update qe_setbrg() to take an enum qe_clock instead of an integer as its
first paramter.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
This patch applies to Kumar's for-2.6.24 branch.
arch/powerpc/sysdev/qe_lib/qe.c | 13 +++--
include/asm-powerpc/qe.h | 98 +++++++++++++++++++--------------------
2 files changed, 56 insertions(+), 55 deletions(-)
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 3ccd360..8551e74 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -167,7 +167,7 @@ unsigned int get_brg_clk(void)
/* Program the BRG to the given sampling rate and multiplier
*
- * @brg: the BRG, 1-16
+ * @brg: the BRG, QE_BRG1 - QE_BRG16
* @rate: the desired sampling rate
* @multiplier: corresponds to the value programmed in GUMR_L[RDCR] or
* GUMR_L[TDCR]. E.g., if this BRG is the RX clock, and GUMR_L[RDCR]=01,
@@ -175,11 +175,14 @@ unsigned int get_brg_clk(void)
*
* Also note that the value programmed into the BRGC register must be even.
*/
-void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier)
+void qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier)
{
u32 divisor, tempval;
u32 div16 = 0;
+ if ((brg < QE_BRG1) || (brg > QE_BRG16))
+ return;
+
divisor = get_brg_clk() / (rate * multiplier);
if (divisor > QE_BRGC_DIVISOR_MAX + 1) {
@@ -196,7 +199,7 @@ void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier)
tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) |
QE_BRGC_ENABLE | div16;
- out_be32(&qe_immr->brg.brgc[brg - 1], tempval);
+ out_be32(&qe_immr->brg.brgc[brg - QE_BRG1], tempval);
}
/* Convert a string to a QE clock source enum
@@ -214,7 +217,7 @@ enum qe_clock qe_clock_source(const char *source)
if (strncasecmp(source, "brg", 3) == 0) {
i = simple_strtoul(source + 3, NULL, 10);
if ((i >= 1) && (i <= 16))
- return QE_BRG1 + i - 1;
+ return (QE_BRG1 - 1) + i;
else
return QE_CLK_DUMMY;
}
@@ -222,7 +225,7 @@ enum qe_clock qe_clock_source(const char *source)
if (strncasecmp(source, "clk", 3) == 0) {
i = simple_strtoul(source + 3, NULL, 10);
if ((i >= 1) && (i <= 24))
- return QE_CLK1 + i - 1;
+ return (QE_CLK1 - 1) + i;
else
return QE_CLK_DUMMY;
}
diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h
index 7d53750..81403ee 100644
--- a/include/asm-powerpc/qe.h
+++ b/include/asm-powerpc/qe.h
@@ -28,6 +28,52 @@
#define MEM_PART_SECONDARY 1
#define MEM_PART_MURAM 2
+/* Clocks and BRGs */
+enum qe_clock {
+ QE_CLK_NONE = 0,
+ QE_BRG1, /* Baud Rate Generator 1 */
+ QE_BRG2, /* Baud Rate Generator 2 */
+ QE_BRG3, /* Baud Rate Generator 3 */
+ QE_BRG4, /* Baud Rate Generator 4 */
+ QE_BRG5, /* Baud Rate Generator 5 */
+ QE_BRG6, /* Baud Rate Generator 6 */
+ QE_BRG7, /* Baud Rate Generator 7 */
+ QE_BRG8, /* Baud Rate Generator 8 */
+ QE_BRG9, /* Baud Rate Generator 9 */
+ QE_BRG10, /* Baud Rate Generator 10 */
+ QE_BRG11, /* Baud Rate Generator 11 */
+ QE_BRG12, /* Baud Rate Generator 12 */
+ QE_BRG13, /* Baud Rate Generator 13 */
+ QE_BRG14, /* Baud Rate Generator 14 */
+ QE_BRG15, /* Baud Rate Generator 15 */
+ QE_BRG16, /* Baud Rate Generator 16 */
+ QE_CLK1, /* Clock 1 */
+ QE_CLK2, /* Clock 2 */
+ QE_CLK3, /* Clock 3 */
+ QE_CLK4, /* Clock 4 */
+ QE_CLK5, /* Clock 5 */
+ QE_CLK6, /* Clock 6 */
+ QE_CLK7, /* Clock 7 */
+ QE_CLK8, /* Clock 8 */
+ QE_CLK9, /* Clock 9 */
+ QE_CLK10, /* Clock 10 */
+ QE_CLK11, /* Clock 11 */
+ QE_CLK12, /* Clock 12 */
+ QE_CLK13, /* Clock 13 */
+ QE_CLK14, /* Clock 14 */
+ QE_CLK15, /* Clock 15 */
+ QE_CLK16, /* Clock 16 */
+ QE_CLK17, /* Clock 17 */
+ QE_CLK18, /* Clock 18 */
+ QE_CLK19, /* Clock 19 */
+ QE_CLK20, /* Clock 20 */
+ QE_CLK21, /* Clock 21 */
+ QE_CLK22, /* Clock 22 */
+ QE_CLK23, /* Clock 23 */
+ QE_CLK24, /* Clock 24 */
+ QE_CLK_DUMMY
+};
+
/* Export QE common operations */
extern void qe_reset(void);
extern int par_io_init(struct device_node *np);
@@ -38,7 +84,8 @@ extern int par_io_data_set(u8 port, u8 pin, u8 val);
/* QE internal API */
int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input);
-void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier);
+enum qe_clock qe_clock_source(const char *source);
+void qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier);
int qe_get_snum(void);
void qe_put_snum(u8 snum);
unsigned long qe_muram_alloc(int size, int align);
@@ -129,55 +176,6 @@ enum comm_dir {
COMM_DIR_RX_AND_TX = 3
};
-/* Clocks and BRGs */
-enum qe_clock {
- QE_CLK_NONE = 0,
- QE_BRG1, /* Baud Rate Generator 1 */
- QE_BRG2, /* Baud Rate Generator 2 */
- QE_BRG3, /* Baud Rate Generator 3 */
- QE_BRG4, /* Baud Rate Generator 4 */
- QE_BRG5, /* Baud Rate Generator 5 */
- QE_BRG6, /* Baud Rate Generator 6 */
- QE_BRG7, /* Baud Rate Generator 7 */
- QE_BRG8, /* Baud Rate Generator 8 */
- QE_BRG9, /* Baud Rate Generator 9 */
- QE_BRG10, /* Baud Rate Generator 10 */
- QE_BRG11, /* Baud Rate Generator 11 */
- QE_BRG12, /* Baud Rate Generator 12 */
- QE_BRG13, /* Baud Rate Generator 13 */
- QE_BRG14, /* Baud Rate Generator 14 */
- QE_BRG15, /* Baud Rate Generator 15 */
- QE_BRG16, /* Baud Rate Generator 16 */
- QE_CLK1, /* Clock 1 */
- QE_CLK2, /* Clock 2 */
- QE_CLK3, /* Clock 3 */
- QE_CLK4, /* Clock 4 */
- QE_CLK5, /* Clock 5 */
- QE_CLK6, /* Clock 6 */
- QE_CLK7, /* Clock 7 */
- QE_CLK8, /* Clock 8 */
- QE_CLK9, /* Clock 9 */
- QE_CLK10, /* Clock 10 */
- QE_CLK11, /* Clock 11 */
- QE_CLK12, /* Clock 12 */
- QE_CLK13, /* Clock 13 */
- QE_CLK14, /* Clock 14 */
- QE_CLK15, /* Clock 15 */
- QE_CLK16, /* Clock 16 */
- QE_CLK17, /* Clock 17 */
- QE_CLK18, /* Clock 18 */
- QE_CLK19, /* Clock 19 */
- QE_CLK20, /* Clock 20 */
- QE_CLK21, /* Clock 21 */
- QE_CLK22, /* Clock 22 */
- QE_CLK23, /* Clock 23 */
- QE_CLK24, /* Clock 24 */
- QE_CLK_DUMMY
-};
-
-/* Convert a string to a QE clock source enum */
-enum qe_clock qe_clock_source(const char *source);
-
/* QE CMXUCR Registers.
* There are two UCCs represented in each of the four CMXUCR registers.
* These values are for the UCC in the LSBs
--
1.5.2.4
^ permalink raw reply related
* [PATCH 2/2] ucc_geth: use rx-clock-name and tx-clock-name device tree properties
From: Timur Tabi @ 2007-10-10 22:18 UTC (permalink / raw)
To: galak, linuxppc-dev, netdev; +Cc: Timur Tabi
In-Reply-To: <11920547093580-git-send-email-timur@freescale.com>
This patch updates the ucc_geth device driver to check the new rx-clock-name
and tx-clock-name properties first. If present, it uses the new function
qe_clock_source() to obtain the clock source. Otherwise, it checks the
deprecated rx-clock and tx-clock properties.
The device trees for 832x, 836x, and 8568 have been updated to contain the
new property names only.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
This patch applies to Kumar's for-2.6.24 branch, on top of my other patch titled
"qe: add function qe_clock_source".
arch/powerpc/boot/dts/mpc832x_mds.dts | 8 ++++----
arch/powerpc/boot/dts/mpc832x_rdb.dts | 8 ++++----
arch/powerpc/boot/dts/mpc836x_mds.dts | 8 ++++----
arch/powerpc/boot/dts/mpc8568mds.dts | 8 ++++----
drivers/net/ucc_geth.c | 12 +++++-------
5 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index fcd333c..b57485b 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -217,8 +217,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <19>;
- tx-clock = <1a>;
+ rx-clock-name = "clk9";
+ tx-clock-name = "clk10";
phy-handle = < &phy3 >;
pio-handle = < &pio3 >;
};
@@ -238,8 +238,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <17>;
- tx-clock = <18>;
+ rx-clock-name = "clk7";
+ tx-clock-name = "clk8";
phy-handle = < &phy4 >;
pio-handle = < &pio4 >;
};
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index 388c8a7..e68a08b 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -202,8 +202,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <20>;
- tx-clock = <13>;
+ rx-clock-name = "clk16";
+ tx-clock-name = "clk3";
phy-handle = <&phy00>;
pio-handle = <&ucc2pio>;
};
@@ -223,8 +223,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <19>;
- tx-clock = <1a>;
+ rx-clock-name = "clk9";
+ tx-clock-name = "clk10";
phy-handle = <&phy04>;
pio-handle = <&ucc3pio>;
};
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index fbd1573..7a54072 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -245,8 +245,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <0>;
- tx-clock = <19>;
+ rx-clock-name = "none";
+ tx-clock-name = "clk9";
phy-handle = < &phy0 >;
phy-connection-type = "rgmii-id";
pio-handle = < &pio1 >;
@@ -267,8 +267,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <0>;
- tx-clock = <14>;
+ rx-clock-name = "none";
+ tx-clock-name = "clk4";
phy-handle = < &phy1 >;
phy-connection-type = "rgmii-id";
pio-handle = < &pio2 >;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index 5439437..cf45aab 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -333,8 +333,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <0>;
- tx-clock = <20>;
+ rx-clock-name = "none";
+ tx-clock-name = "clk16";
pio-handle = <&pio1>;
phy-handle = <&phy0>;
phy-connection-type = "rgmii-id";
@@ -355,8 +355,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <0>;
- tx-clock = <20>;
+ rx-clock-name = "none";
+ tx-clock-name = "clk16";
pio-handle = <&pio2>;
phy-handle = <&phy1>;
phy-connection-type = "rgmii-id";
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index a147d6e..9308397 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3863,7 +3863,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
sprop = of_get_property(np, "rx-clock-name", NULL);
if (sprop) {
ug_info->uf_info.rx_clock = qe_clock_source(sprop);
- if ((ug_info->uf_info.rx_clock < QE_CLK1) ||
+ if ((ug_info->uf_info.rx_clock < QE_CLK_NONE) ||
(ug_info->uf_info.rx_clock > QE_CLK24)) {
printk(KERN_ERR
"ucc_geth: invalid rx-clock-name property\n");
@@ -3873,12 +3873,12 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
prop = of_get_property(np, "rx-clock", NULL);
if (!prop) {
/* If both rx-clock-name and rx-clock are missing,
- we want to tell people to use rx-clock-name. */
+ we want to tell people to use rx-clock-name. */
printk(KERN_ERR
"ucc_geth: missing rx-clock-name property\n");
return -EINVAL;
}
- if ((*prop < QE_CLK1) || (*prop > QE_CLK24)) {
+ if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
printk(KERN_ERR
"ucc_geth: invalid rx-clock propperty\n");
return -EINVAL;
@@ -3889,7 +3889,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
sprop = of_get_property(np, "tx-clock-name", NULL);
if (sprop) {
ug_info->uf_info.tx_clock = qe_clock_source(sprop);
- if ((ug_info->uf_info.tx_clock < QE_CLK1) ||
+ if ((ug_info->uf_info.tx_clock < QE_CLK_NONE) ||
(ug_info->uf_info.tx_clock > QE_CLK24)) {
printk(KERN_ERR
"ucc_geth: invalid tx-clock-name property\n");
@@ -3902,7 +3902,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
"ucc_geth: mising tx-clock-name property\n");
return -EINVAL;
}
- if ((*prop < QE_CLK1) || (*prop > QE_CLK24)) {
+ if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
printk(KERN_ERR
"ucc_geth: invalid tx-clock property\n");
return -EINVAL;
@@ -3910,8 +3910,6 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
ug_info->uf_info.tx_clock = *prop;
}
- prop = of_get_property(np, "tx-clock", NULL);
- ug_info->uf_info.tx_clock = *prop;
err = of_address_to_resource(np, 0, &res);
if (err)
return -EINVAL;
--
1.5.2.4
^ permalink raw reply related
* Re: [PATCH 0/2] QE clock source improvements
From: Timur Tabi @ 2007-10-10 22:31 UTC (permalink / raw)
To: Timur Tabi; +Cc: galak, linuxppc-dev, netdev
In-Reply-To: <1192054708946-git-send-email-timur@freescale.com>
Sorry, please ignore this set. Something got screwed up with the patches.
I'm going to resend.
Timur Tabi wrote:
> This patch set adds a new property to make specifying QE clock sources
> easier, adds a function to help parse the property, updates some other
> functions to use an enum instead of an integer, and updates the ucc_geth
> driver to take advantage of all this.
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
--
Timur Tabi
Linux Kernel Developer @ Freescale
^ permalink raw reply
* Re: [ofa-general] Re: [PATCH 2/3][NET_BATCH] net core use batching
From: David Miller @ 2007-10-10 22:37 UTC (permalink / raw)
To: hadi
Cc: johnpol, Robert.Olsson, herbert, gaagaan, jeff, rdreier,
peter.p.waskiewicz.jr, mcarlson, andi, general, netdev, tgraf,
randy.dunlap, sri, shemminger, kaber, mchan, jagana
In-Reply-To: <1192021728.4853.17.camel@localhost>
From: jamal <hadi@cyberus.ca>
Date: Wed, 10 Oct 2007 09:08:48 -0400
> On Wed, 2007-10-10 at 03:44 -0700, David Miller wrote:
>
> > I've always gotten very poor results when increasing the TX queue a
> > lot, for example with NIU the point of diminishing returns seems to
> > be in the range of 256-512 TX descriptor entries and this was with
> > 1.6Ghz cpus.
>
> Is it interupt per packet? From my experience, you may find interesting
> results varying tx interupt mitigation parameters in addition to the
> ring parameters.
> Unfortunately when you do that, optimal parameters also depends on
> packet size. so what may work for 64B, wont work well for 1400B.
No, it was not interrupt per-packet, I was telling the chip to
interrupt me every 1/4 of the ring.
^ permalink raw reply
* [PATCH 0/2] QE clock source improvements
From: Timur Tabi @ 2007-10-10 22:37 UTC (permalink / raw)
To: galak, linuxppc-dev, netdev
(Replaces all previous versions of this patch)
This patch set adds a new property to make specifying QE clock sources
easier, adds a function to help parse the property, updates some other
functions to use an enum instead of an integer, and updates the ucc_geth
driver to take advantage of all this.
^ permalink raw reply
* [PATCH 2/2] ucc_geth: use rx-clock-name and tx-clock-name device tree properties
From: Timur Tabi @ 2007-10-10 22:37 UTC (permalink / raw)
To: galak, linuxppc-dev, netdev; +Cc: Timur Tabi
In-Reply-To: <11920558291655-git-send-email-timur@freescale.com>
This patch updates the ucc_geth device driver to check the new rx-clock-name
and tx-clock-name properties first. If present, it uses the new function
qe_clock_source() to obtain the clock source. Otherwise, it checks the
deprecated rx-clock and tx-clock properties.
The device trees for 832x, 836x, and 8568 have been updated to contain the
new property names only.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
This patch applies to Kumar's for-2.6.24 branch, on top of my other patch titled
"qe: add function qe_clock_source".
arch/powerpc/boot/dts/mpc832x_mds.dts | 8 ++--
arch/powerpc/boot/dts/mpc832x_rdb.dts | 8 ++--
arch/powerpc/boot/dts/mpc836x_mds.dts | 8 ++--
arch/powerpc/boot/dts/mpc8568mds.dts | 8 ++--
drivers/net/ucc_geth.c | 55 ++++++++++++++++++++++++++++++--
5 files changed, 67 insertions(+), 20 deletions(-)
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts
index fcd333c..b57485b 100644
--- a/arch/powerpc/boot/dts/mpc832x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc832x_mds.dts
@@ -217,8 +217,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <19>;
- tx-clock = <1a>;
+ rx-clock-name = "clk9";
+ tx-clock-name = "clk10";
phy-handle = < &phy3 >;
pio-handle = < &pio3 >;
};
@@ -238,8 +238,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <17>;
- tx-clock = <18>;
+ rx-clock-name = "clk7";
+ tx-clock-name = "clk8";
phy-handle = < &phy4 >;
pio-handle = < &pio4 >;
};
diff --git a/arch/powerpc/boot/dts/mpc832x_rdb.dts b/arch/powerpc/boot/dts/mpc832x_rdb.dts
index 388c8a7..e68a08b 100644
--- a/arch/powerpc/boot/dts/mpc832x_rdb.dts
+++ b/arch/powerpc/boot/dts/mpc832x_rdb.dts
@@ -202,8 +202,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <20>;
- tx-clock = <13>;
+ rx-clock-name = "clk16";
+ tx-clock-name = "clk3";
phy-handle = <&phy00>;
pio-handle = <&ucc2pio>;
};
@@ -223,8 +223,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <19>;
- tx-clock = <1a>;
+ rx-clock-name = "clk9";
+ tx-clock-name = "clk10";
phy-handle = <&phy04>;
pio-handle = <&ucc3pio>;
};
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts
index fbd1573..7a54072 100644
--- a/arch/powerpc/boot/dts/mpc836x_mds.dts
+++ b/arch/powerpc/boot/dts/mpc836x_mds.dts
@@ -245,8 +245,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <0>;
- tx-clock = <19>;
+ rx-clock-name = "none";
+ tx-clock-name = "clk9";
phy-handle = < &phy0 >;
phy-connection-type = "rgmii-id";
pio-handle = < &pio1 >;
@@ -267,8 +267,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <0>;
- tx-clock = <14>;
+ rx-clock-name = "none";
+ tx-clock-name = "clk4";
phy-handle = < &phy1 >;
phy-connection-type = "rgmii-id";
pio-handle = < &pio2 >;
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/mpc8568mds.dts
index 5439437..cf45aab 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/mpc8568mds.dts
@@ -333,8 +333,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <0>;
- tx-clock = <20>;
+ rx-clock-name = "none";
+ tx-clock-name = "clk16";
pio-handle = <&pio1>;
phy-handle = <&phy0>;
phy-connection-type = "rgmii-id";
@@ -355,8 +355,8 @@
*/
mac-address = [ 00 00 00 00 00 00 ];
local-mac-address = [ 00 00 00 00 00 00 ];
- rx-clock = <0>;
- tx-clock = <20>;
+ rx-clock-name = "none";
+ tx-clock-name = "clk16";
pio-handle = <&pio2>;
phy-handle = <&phy1>;
phy-connection-type = "rgmii-id";
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 7dedc96..9308397 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3827,6 +3827,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
int err, ucc_num, max_speed = 0;
const phandle *ph;
const unsigned int *prop;
+ const char *sprop;
const void *mac_addr;
phy_interface_t phy_interface;
static const int enet_to_speed[] = {
@@ -3859,10 +3860,56 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
ug_info->uf_info.ucc_num = ucc_num;
- prop = of_get_property(np, "rx-clock", NULL);
- ug_info->uf_info.rx_clock = *prop;
- prop = of_get_property(np, "tx-clock", NULL);
- ug_info->uf_info.tx_clock = *prop;
+ sprop = of_get_property(np, "rx-clock-name", NULL);
+ if (sprop) {
+ ug_info->uf_info.rx_clock = qe_clock_source(sprop);
+ if ((ug_info->uf_info.rx_clock < QE_CLK_NONE) ||
+ (ug_info->uf_info.rx_clock > QE_CLK24)) {
+ printk(KERN_ERR
+ "ucc_geth: invalid rx-clock-name property\n");
+ return -EINVAL;
+ }
+ } else {
+ prop = of_get_property(np, "rx-clock", NULL);
+ if (!prop) {
+ /* If both rx-clock-name and rx-clock are missing,
+ we want to tell people to use rx-clock-name. */
+ printk(KERN_ERR
+ "ucc_geth: missing rx-clock-name property\n");
+ return -EINVAL;
+ }
+ if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
+ printk(KERN_ERR
+ "ucc_geth: invalid rx-clock propperty\n");
+ return -EINVAL;
+ }
+ ug_info->uf_info.rx_clock = *prop;
+ }
+
+ sprop = of_get_property(np, "tx-clock-name", NULL);
+ if (sprop) {
+ ug_info->uf_info.tx_clock = qe_clock_source(sprop);
+ if ((ug_info->uf_info.tx_clock < QE_CLK_NONE) ||
+ (ug_info->uf_info.tx_clock > QE_CLK24)) {
+ printk(KERN_ERR
+ "ucc_geth: invalid tx-clock-name property\n");
+ return -EINVAL;
+ }
+ } else {
+ prop = of_get_property(np, "rx-clock", NULL);
+ if (!prop) {
+ printk(KERN_ERR
+ "ucc_geth: mising tx-clock-name property\n");
+ return -EINVAL;
+ }
+ if ((*prop < QE_CLK_NONE) || (*prop > QE_CLK24)) {
+ printk(KERN_ERR
+ "ucc_geth: invalid tx-clock property\n");
+ return -EINVAL;
+ }
+ ug_info->uf_info.tx_clock = *prop;
+ }
+
err = of_address_to_resource(np, 0, &res);
if (err)
return -EINVAL;
--
1.5.2.4
^ permalink raw reply related
* [PATCH 1/2] qe: add function qe_clock_source
From: Timur Tabi @ 2007-10-10 22:37 UTC (permalink / raw)
To: galak, linuxppc-dev, netdev; +Cc: Timur Tabi
In-Reply-To: <11920558283326-git-send-email-timur@freescale.com>
Add function qe_clock_source() which takes a string containing the name of a
QE clock source (as is typically found in device trees) and returns the
matching enum qe_clock value.
Update booting-without-of.txt to indicate that the UCC properties rx-clock
and tx-clock are deprecated and replaced with rx-clock-name and tx-clock-name,
which use strings instead of numbers to indicate QE clock sources.
Update qe_setbrg() to take an enum qe_clock instead of an integer as its
first paramter.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
This patch applies to Kumar's for-2.6.24 branch.
Documentation/powerpc/booting-without-of.txt | 13 ++++
arch/powerpc/sysdev/qe_lib/qe.c | 41 ++++++++++-
include/asm-powerpc/qe.h | 95 +++++++++++++-------------
3 files changed, 99 insertions(+), 50 deletions(-)
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt
index 7a6c5f2..d8306ee 100644
--- a/Documentation/powerpc/booting-without-of.txt
+++ b/Documentation/powerpc/booting-without-of.txt
@@ -1615,6 +1615,19 @@ platforms are moved over to use the flattened-device-tree model.
- interrupt-parent : the phandle for the interrupt controller that
services interrupts for this device.
- pio-handle : The phandle for the Parallel I/O port configuration.
+ - rx-clock-name: the UCC receive clock source
+ "none": clock source is disabled
+ "brg1" through "brg16": clock source is BRG1-BRG16, respectively
+ "clk1" through "clk24": clock source is CLK1-CLK24, respectively
+ - tx-clock-name: the UCC transmit clock source
+ "none": clock source is disabled
+ "brg1" through "brg16": clock source is BRG1-BRG16, respectively
+ "clk1" through "clk24": clock source is CLK1-CLK24, respectively
+ The following two properties are deprecated. rx-clock has been replaced
+ with rx-clock-name, and tx-clock has been replaced with tx-clock-name.
+ Drivers that currently use the deprecated properties should continue to
+ do so, in order to support older device trees, but they should be updated
+ to check for the new properties first.
- rx-clock : represents the UCC receive clock source.
0x00 : clock source is disabled;
0x1~0x10 : clock source is BRG1~BRG16 respectively;
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c
index 3d57d38..8551e74 100644
--- a/arch/powerpc/sysdev/qe_lib/qe.c
+++ b/arch/powerpc/sysdev/qe_lib/qe.c
@@ -167,7 +167,7 @@ unsigned int get_brg_clk(void)
/* Program the BRG to the given sampling rate and multiplier
*
- * @brg: the BRG, 1-16
+ * @brg: the BRG, QE_BRG1 - QE_BRG16
* @rate: the desired sampling rate
* @multiplier: corresponds to the value programmed in GUMR_L[RDCR] or
* GUMR_L[TDCR]. E.g., if this BRG is the RX clock, and GUMR_L[RDCR]=01,
@@ -175,11 +175,14 @@ unsigned int get_brg_clk(void)
*
* Also note that the value programmed into the BRGC register must be even.
*/
-void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier)
+void qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier)
{
u32 divisor, tempval;
u32 div16 = 0;
+ if ((brg < QE_BRG1) || (brg > QE_BRG16))
+ return;
+
divisor = get_brg_clk() / (rate * multiplier);
if (divisor > QE_BRGC_DIVISOR_MAX + 1) {
@@ -196,8 +199,40 @@ void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier)
tempval = ((divisor - 1) << QE_BRGC_DIVISOR_SHIFT) |
QE_BRGC_ENABLE | div16;
- out_be32(&qe_immr->brg.brgc[brg - 1], tempval);
+ out_be32(&qe_immr->brg.brgc[brg - QE_BRG1], tempval);
+}
+
+/* Convert a string to a QE clock source enum
+ *
+ * This function takes a string, typically from a property in the device
+ * tree, and returns the corresponding "enum qe_clock" value.
+*/
+enum qe_clock qe_clock_source(const char *source)
+{
+ unsigned int i;
+
+ if (strcasecmp(source, "none") == 0)
+ return QE_CLK_NONE;
+
+ if (strncasecmp(source, "brg", 3) == 0) {
+ i = simple_strtoul(source + 3, NULL, 10);
+ if ((i >= 1) && (i <= 16))
+ return (QE_BRG1 - 1) + i;
+ else
+ return QE_CLK_DUMMY;
+ }
+
+ if (strncasecmp(source, "clk", 3) == 0) {
+ i = simple_strtoul(source + 3, NULL, 10);
+ if ((i >= 1) && (i <= 24))
+ return (QE_CLK1 - 1) + i;
+ else
+ return QE_CLK_DUMMY;
+ }
+
+ return QE_CLK_DUMMY;
}
+EXPORT_SYMBOL(qe_clock_source);
/* Initialize SNUMs (thread serial numbers) according to
* QE Module Control chapter, SNUM table
diff --git a/include/asm-powerpc/qe.h b/include/asm-powerpc/qe.h
index 0dabe46..81403ee 100644
--- a/include/asm-powerpc/qe.h
+++ b/include/asm-powerpc/qe.h
@@ -28,6 +28,52 @@
#define MEM_PART_SECONDARY 1
#define MEM_PART_MURAM 2
+/* Clocks and BRGs */
+enum qe_clock {
+ QE_CLK_NONE = 0,
+ QE_BRG1, /* Baud Rate Generator 1 */
+ QE_BRG2, /* Baud Rate Generator 2 */
+ QE_BRG3, /* Baud Rate Generator 3 */
+ QE_BRG4, /* Baud Rate Generator 4 */
+ QE_BRG5, /* Baud Rate Generator 5 */
+ QE_BRG6, /* Baud Rate Generator 6 */
+ QE_BRG7, /* Baud Rate Generator 7 */
+ QE_BRG8, /* Baud Rate Generator 8 */
+ QE_BRG9, /* Baud Rate Generator 9 */
+ QE_BRG10, /* Baud Rate Generator 10 */
+ QE_BRG11, /* Baud Rate Generator 11 */
+ QE_BRG12, /* Baud Rate Generator 12 */
+ QE_BRG13, /* Baud Rate Generator 13 */
+ QE_BRG14, /* Baud Rate Generator 14 */
+ QE_BRG15, /* Baud Rate Generator 15 */
+ QE_BRG16, /* Baud Rate Generator 16 */
+ QE_CLK1, /* Clock 1 */
+ QE_CLK2, /* Clock 2 */
+ QE_CLK3, /* Clock 3 */
+ QE_CLK4, /* Clock 4 */
+ QE_CLK5, /* Clock 5 */
+ QE_CLK6, /* Clock 6 */
+ QE_CLK7, /* Clock 7 */
+ QE_CLK8, /* Clock 8 */
+ QE_CLK9, /* Clock 9 */
+ QE_CLK10, /* Clock 10 */
+ QE_CLK11, /* Clock 11 */
+ QE_CLK12, /* Clock 12 */
+ QE_CLK13, /* Clock 13 */
+ QE_CLK14, /* Clock 14 */
+ QE_CLK15, /* Clock 15 */
+ QE_CLK16, /* Clock 16 */
+ QE_CLK17, /* Clock 17 */
+ QE_CLK18, /* Clock 18 */
+ QE_CLK19, /* Clock 19 */
+ QE_CLK20, /* Clock 20 */
+ QE_CLK21, /* Clock 21 */
+ QE_CLK22, /* Clock 22 */
+ QE_CLK23, /* Clock 23 */
+ QE_CLK24, /* Clock 24 */
+ QE_CLK_DUMMY
+};
+
/* Export QE common operations */
extern void qe_reset(void);
extern int par_io_init(struct device_node *np);
@@ -38,7 +84,8 @@ extern int par_io_data_set(u8 port, u8 pin, u8 val);
/* QE internal API */
int qe_issue_cmd(u32 cmd, u32 device, u8 mcn_protocol, u32 cmd_input);
-void qe_setbrg(unsigned int brg, unsigned int rate, unsigned int multiplier);
+enum qe_clock qe_clock_source(const char *source);
+void qe_setbrg(enum qe_clock brg, unsigned int rate, unsigned int multiplier);
int qe_get_snum(void);
void qe_put_snum(u8 snum);
unsigned long qe_muram_alloc(int size, int align);
@@ -129,52 +176,6 @@ enum comm_dir {
COMM_DIR_RX_AND_TX = 3
};
-/* Clocks and BRGs */
-enum qe_clock {
- QE_CLK_NONE = 0,
- QE_BRG1, /* Baud Rate Generator 1 */
- QE_BRG2, /* Baud Rate Generator 2 */
- QE_BRG3, /* Baud Rate Generator 3 */
- QE_BRG4, /* Baud Rate Generator 4 */
- QE_BRG5, /* Baud Rate Generator 5 */
- QE_BRG6, /* Baud Rate Generator 6 */
- QE_BRG7, /* Baud Rate Generator 7 */
- QE_BRG8, /* Baud Rate Generator 8 */
- QE_BRG9, /* Baud Rate Generator 9 */
- QE_BRG10, /* Baud Rate Generator 10 */
- QE_BRG11, /* Baud Rate Generator 11 */
- QE_BRG12, /* Baud Rate Generator 12 */
- QE_BRG13, /* Baud Rate Generator 13 */
- QE_BRG14, /* Baud Rate Generator 14 */
- QE_BRG15, /* Baud Rate Generator 15 */
- QE_BRG16, /* Baud Rate Generator 16 */
- QE_CLK1, /* Clock 1 */
- QE_CLK2, /* Clock 2 */
- QE_CLK3, /* Clock 3 */
- QE_CLK4, /* Clock 4 */
- QE_CLK5, /* Clock 5 */
- QE_CLK6, /* Clock 6 */
- QE_CLK7, /* Clock 7 */
- QE_CLK8, /* Clock 8 */
- QE_CLK9, /* Clock 9 */
- QE_CLK10, /* Clock 10 */
- QE_CLK11, /* Clock 11 */
- QE_CLK12, /* Clock 12 */
- QE_CLK13, /* Clock 13 */
- QE_CLK14, /* Clock 14 */
- QE_CLK15, /* Clock 15 */
- QE_CLK16, /* Clock 16 */
- QE_CLK17, /* Clock 17 */
- QE_CLK18, /* Clock 18 */
- QE_CLK19, /* Clock 19 */
- QE_CLK20, /* Clock 20 */
- QE_CLK21, /* Clock 21 */
- QE_CLK22, /* Clock 22 */
- QE_CLK23, /* Clock 23 */
- QE_CLK24, /* Clock 24 */
- QE_CLK_DUMMY,
-};
-
/* QE CMXUCR Registers.
* There are two UCCs represented in each of the four CMXUCR registers.
* These values are for the UCC in the LSBs
--
1.5.2.4
^ permalink raw reply related
* Re: [PATCH 1/7] [IPSEC] esp: Remove NAT-T checksum invalidation for BEET
From: David Miller @ 2007-10-10 22:42 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <E1IfcjK-00023y-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 10 Oct 2007 22:40:10 +0800
> [IPSEC] esp: Remove NAT-T checksum invalidation for BEET
>
> I pointed this out back when this patch was first proposed but it looks like
> it got lost along the way.
>
> The checksum only needs to be ignored for NAT-T in transport mode where
> we lose the original inner addresses due to NAT. With BEET the inner
> addresses will be intact so the checksum remains valid.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
^ permalink raw reply
* Re: [PATCH 2/7] [IPSEC] beet: Fix extension header support on output
From: David Miller @ 2007-10-10 22:42 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <E1IfcjL-000246-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 10 Oct 2007 22:40:11 +0800
> [IPSEC] beet: Fix extension header support on output
>
> The beet output function completely kills any extension headers by replacing
> them with the IPv6 header. This is because it essentially ignores the
> result of ip6_find_1stfragopt by simply acting as if there aren't any
> extension headers.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
^ permalink raw reply
* Re: [PATCH 3/7] [IPSEC]: Set skb->data to payload in x->mode->output
From: David Miller @ 2007-10-10 22:44 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <E1IfcjM-00024E-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 10 Oct 2007 22:40:12 +0800
> [IPSEC]: Set skb->data to payload in x->mode->output
>
> This patch changes the calling convention so that on entry from
> x->mode->output and before entry into x->type->output skb->data
> will point to the payload instead of the IP header.
>
> This is essentially a redistribution of skb_push/skb_pull calls
> with the aim of minimising them on the common path of tunnel +
> ESP.
>
> It'll also let us use the same calling convention between IPv4
> and IPv6 with the next patch.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
^ permalink raw reply
* Re: [PATCH 4/7] [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output
From: David Miller @ 2007-10-10 22:44 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <E1IfcjN-00024M-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 10 Oct 2007 22:40:13 +0800
> [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output
>
> The IPv6 calling convention for x->mode->output is more general and could
> help an eventual protocol-generic x->type->output implementation. This
> patch adopts it for IPv4 as well and modifies the IPv4 type output functions
> accordingly.
>
> It also rewrites the IPv6 mac/transport header calculation to be based off
> the network header where practical.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
^ permalink raw reply
* Re: [PATCH 5/7] [IPSEC]: Get rid of ipv6_{auth,esp,comp}_hdr
From: David Miller @ 2007-10-10 22:45 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <E1IfcjO-00024U-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 10 Oct 2007 22:40:14 +0800
> [IPSEC]: Get rid of ipv6_{auth,esp,comp}_hdr
>
> This patch removes the duplicate ipv6_{auth,esp,comp}_hdr structures since
> they're identical to the IPv4 versions. Duplicating them would only create
> problems for ourselves later when we need to add things like extended
> sequence numbers.
>
> I've also added transport header type conversion headers for these types
> which are now used by the transforms.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
^ permalink raw reply
* Re: [PATCH 6/7] [IPSEC]: Move IP length/checksum setting out of transforms
From: David Miller @ 2007-10-10 22:46 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <E1IfcjP-00024c-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 10 Oct 2007 22:40:15 +0800
> [IPSEC]: Move IP length/checksum setting out of transforms
>
> This patch moves the setting of the IP length and checksum fields out of
> the transforms and into the xfrmX_output functions. This would help future
> efforts in merging the transforms themselves.
>
> It also adds an optimisation to ipcomp due to the fact that the transport
> offset is guaranteed to be zero.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
APplied.
^ permalink raw reply
* Re: [PATCH 7/7] [IPSEC]: Move IP protocol setting from transforms into xfrm4_input.c
From: David Miller @ 2007-10-10 22:46 UTC (permalink / raw)
To: herbert; +Cc: netdev
In-Reply-To: <E1IfcjQ-00024k-00@gondolin.me.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Wed, 10 Oct 2007 22:40:16 +0800
> [IPSEC]: Move IP protocol setting from transforms into xfrm4_input.c
>
> This patch makes the IPv4 x->type->input functions return the next protocol
> instead of setting it directly. This is identical to how we do things in
> IPv6 and will help us merge common code on the input path.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
^ permalink raw reply
* Re: [PATCH] do not give access to 1-1024 ports for autobinding
From: David Miller @ 2007-10-10 22:51 UTC (permalink / raw)
To: shemminger; +Cc: den, netdev
In-Reply-To: <20071010084137.1963122e@freepuppy.rosehill>
From: Stephen Hemminger <shemminger@linux-foundation.org>
Date: Wed, 10 Oct 2007 08:41:37 -0700
> On Wed, 10 Oct 2007 18:34:49 +0400
> "Denis V. Lunev" <den@openvz.org> wrote:
>
> > This patch prevents possibility to give 1-1024 port range for autobinding.
> > {1, 1} may only takes some sense for deep embedded people.
> >
> > Signed-off-by: Denis V. Lunev <den@openvz.org>
> >
> > --- ./net/ipv4/sysctl_net_ipv4.c.port2 2007-10-10 17:46:48.000000000 +0400
> > +++ ./net/ipv4/sysctl_net_ipv4.c 2007-10-10 18:08:00.000000000 +0400
> > @@ -25,7 +25,7 @@ extern int sysctl_ip_nonlocal_bind;
> > #ifdef CONFIG_SYSCTL
> > static int zero;
> > static int tcp_retr1_max = 255;
> > -static int ip_local_port_range_min[] = { 1, 1 };
> > +static int ip_local_port_range_min[] = { 1024, 1024 };
> > static int ip_local_port_range_max[] = { 65535, 65535 };
> > #endif
> >
> > -
>
> That only limits the sysctl, which seems completely counter productive.
> Sounds like more of the "stop root from shooting themselves" patches.
Agreed, we shouldn't be changing these values.
^ permalink raw reply
* Re: [PATCH] do not give access to 1-1024 ports for autobinding
From: David Miller @ 2007-10-10 22:52 UTC (permalink / raw)
To: den; +Cc: netdev
In-Reply-To: <20071010143449.GA10796@iris.sw.ru>
From: "Denis V. Lunev" <den@openvz.org>
Date: Wed, 10 Oct 2007 18:34:49 +0400
> This patch prevents possibility to give 1-1024 port range for autobinding.
> {1, 1} may only takes some sense for deep embedded people.
>
> Signed-off-by: Denis V. Lunev <den@openvz.org>
Administrators can configure their systems however they want,
the numbers are valid port numbers, so we should not prevent
the possibility.
^ permalink raw reply
* Re: [ofa-general] Re: [PATCH 2/3][NET_BATCH] net core use batching
From: David Miller @ 2007-10-10 22:53 UTC (permalink / raw)
To: billfink
Cc: hadi, shemminger, andi, jeff, johnpol, herbert, gaagaan,
Robert.Olsson, netdev, rdreier, peter.p.waskiewicz.jr, mcarlson,
jagana, general, mchan, tgraf, randy.dunlap, sri, kaber
In-Reply-To: <20071010120215.7ec19323.billfink@mindspring.com>
From: Bill Fink <billfink@mindspring.com>
Date: Wed, 10 Oct 2007 12:02:15 -0400
> On Tue, 09 Oct 2007, David Miller wrote:
>
> > We have to keep in mind, however, that the sw queue right now is 1000
> > packets. I heavily discourage any driver author to try and use any
> > single TX queue of that size. Which means that just dropping on back
> > pressure might not work so well.
> >
> > Or it might be perfect and signal TCP to backoff, who knows! :-)
>
> I can't remember the details anymore, but for 10-GigE, I have encountered
> cases where I was able to significantly increase TCP performance by
> increasing the txqueuelen to 10000, which is the setting I now use for
> any 10-GigE testing.
For some reason this does not surprise me.
We bumped the ethernet default up to 1000 for gigabit.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox