Re: PATCH: media option for ethernet hw checksum
Jonathan Lemon wrote: > >Here is a patch I have locally that would be useful for Bill Paul, > >I think. I know, we could use "flag0" for this, but it seems to > >me that this will be an increasingly common option in hadware. > > > >I know Bill had to set this manually as a compile time flag, for > >lack of an option (same for the JMB Intel Gigabit card driver). > > Um, why? It shouldn't be an option. Either the card supports it > and it's turned on, or it doesn't and it's turned off. If anything, > perhaps there should be a sysctl to enable/disable all hw checksums > for those who want a more end-to-end solution. I think you are behind in this thread. The answer is in several parts: 1) For some Gigabit cards, the host can do it faster; for others, it can not. If you can have a machine with several different cards in it, then it needs to be a per card option. This was my initial reason, since I have a local system with both Tigon II and Tigon III cards in it. 2) For some topologies, it makes sense to turn off the checksum checking entirely for local link destinations, since the checksum is not really useful, but it is not possible to negotiate it off on an end-to-end basis, but you might want to avoid the overhead to get much closer to wire speeds on a local intra-cluster network. -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: PATCH: media option for ethernet hw checksum
In article [EMAIL PROTECTED]> you write: >Here is a patch I have locally that would be useful for Bill Paul, >I think. I know, we could use "flag0" for this, but it seems to >me that this will be an increasingly common option in hadware. > >I know Bill had to set this manually as a compile time flag, for >lack of an option (same for the JMB Intel Gigabit card driver). Um, why? It shouldn't be an option. Either the card supports it and it's turned on, or it doesn't and it's turned off. If anything, perhaps there should be a sysctl to enable/disable all hw checksums for those who want a more end-to-end solution. -- Jonathan To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: PATCH: media option for ethernet hw checksum
On Wed, May 30, 2001 at 01:59:57AM -0700, Terry Lambert wrote: > > Personaly I don't think I would have wasted 3/8th of the > > shared options on the abomination known as flags... > > Flags can be device private, which can be a good thing. That's true. > I only use the patch because I know of no Gigabit ethernet > cards that are useful which can not perform checksum > offloading. > > Maybe it should just always be on... I thought there was a > problem with performance, doing that with the Tigon II. > > In any case, it seems to be a tradeoff that you might want > to make intentionally, if your main processor was 1.5GHz... I think this is a good idea, I just quiestioned using the last remaining shared option (at least relative to NetBSD) for it. How about using one of the eight unused ethernet options instead? Arguably it should be a shared option, but realisticly Token Ring and FDDI aren't going to support it any time soon and there's little point with 802.11. The other option is of course to just go ahead and use the last free slot and figure if_media will need a redesign one of these days regardless. -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 PGP signature
Re: PATCH: media option for ethernet hw checksum
Brooks Davis wrote: > > On Fri, May 25, 2001 at 11:11:16PM +, Terry Lambert wrote: > > Here is a patch I have locally that would be useful for Bill Paul, > > I think. I know, we could use "flag0" for this, but it seems to > > me that this will be an increasingly common option in hadware. > > Should this be implemented as a shared option like this? I > ask because NetBSD has added the following types and only > has one shared option left: > > #define IFM_FLOW0x0040/* enable hardware flow control */ > #define IFM_FLAG0 0x0100/* Driver defined flag */ > #define IFM_FLAG1 0x0200/* Driver defined flag */ > #define IFM_FLAG2 0x0400/* Driver defined flag */ > #define IFM_LOOP0x0800/* Put hardware in loopback */ > > Personaly I don't think I would have wasted 3/8th of the > shared options on the abomination known as flags... Flags can be device private, which can be a good thing. I only use the patch because I know of no Gigabit ethernet cards that are useful which can not perform checksum offloading. Maybe it should just always be on... I thought there was a problem with performance, doing that with the Tigon II. In any case, it seems to be a tradeoff that you might want to make intentionally, if your main processor was 1.5GHz... -- Terry To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message
Re: PATCH: media option for ethernet hw checksum
On Fri, May 25, 2001 at 11:11:16PM +, Terry Lambert wrote: > Here is a patch I have locally that would be useful for Bill Paul, > I think. I know, we could use "flag0" for this, but it seems to > me that this will be an increasingly common option in hadware. Should this be implemented as a shared option like this? I ask because NetBSD has added the following types and only has one shared option left: #define IFM_FLOW0x0040/* enable hardware flow control */ #define IFM_FLAG0 0x0100/* Driver defined flag */ #define IFM_FLAG1 0x0200/* Driver defined flag */ #define IFM_FLAG2 0x0400/* Driver defined flag */ #define IFM_LOOP0x0800/* Put hardware in loopback */ Personaly I don't think I would have wasted 3/8th of the shared options on the abomination known as flags... -- Brooks -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 PGP signature
PATCH: media option for ethernet hw checksum
Here is a patch I have locally that would be useful for Bill Paul, I think. I know, we could use "flag0" for this, but it seems to me that this will be an increasingly common option in hadware. I know Bill had to set this manually as a compile time flag, for lack of an option (same for the JMB Intel Gigabit card driver). PS: The if_ti.c driver has a bug in the option checking, in that it does an equality instead of a bit test, in case some goes in to make this option work there... Index: if_media.h === RCS file: /home/cvs/FreeBSD/sys/net/if_media.h,v retrieving revision 1.1.1.1 diff -r1.1.1.1 if_media.h 180a181 > #define IFM_CKSUM 0x0040 /* Force hardware checksum */ 347a349 > { IFM_CKSUM,"hw-checksum" },\ Terry Lambert [EMAIL PROTECTED] --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message