| Anonymous | Login | Signup for a new account | 11-10-2008 10:41 PST |
| Main | My View | View Issues | Change Log | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
| 0000115 | [BusyBox] New Features | minor | always | 02-18-05 11:12 | 02-26-08 10:25 | ||||
| Reporter | marc | View Status | public | ||||||
| Assigned To | BusyBox | ||||||||
| Priority | normal | Resolution | fixed | ||||||
| Status | closed | Product Version | 1.00 | ||||||
| Summary | 0000115: ifenslave | ||||||||
| Description |
>Attached a (trivial) patch to add ifenslave to the busybox program. I >will add some more documentation in the next weeks (maybe months) to >this applet, but currently it has all the documentation available with >the ifenslave program. > >ifenslave allows to bind 2 (or more?) physical interfaces to one logical >one, offering some level of redundancy. > >The patch is against 1.00 > >P.S. I forwarded this to busybox-owner (I assumed I was on the busybox >list but apparently, I was not). `(S)?h:H`.e can ignore that patch; it's >essentially the same (only a different contact e-mail). |
||||||||
| Additional Information | submission here after mail from Allan Clarck | ||||||||
| Attached Files |
|
||||||||
|
|
|||||||||
Notes |
|
|
(0000118) marc 03-25-05 04:55 |
The following patch needs to be applied, I need to restudy the term 'alphabetically ordered'. /Me humbly throws himself at the mercy of the coding gods. [mleeman@gemini busybox-1.00]$ cvs diff -up ./include/applets.h Index: ./include/applets.h =================================================================== RCS file: /home/services/cvs/firmware/ppc/busybox-1.00/include/applets.h,v retrieving revision 1.1 diff -u -p -r1.1 applets.h --- ./include/applets.h 18 Feb 2005 11:19:47 -0000 1.1 +++ ./include/applets.h 25 Mar 2005 12:53:33 -0000 @@ -271,12 +271,12 @@ #ifdef CONFIG_IFCONFIG APPLET(ifconfig, ifconfig_main, _BB_DIR_SBIN, _BB_SUID_NEVER) #endif -#ifdef CONFIG_IFENSLAVE - APPLET(ifenslave, ifenslave_main, _BB_DIR_SBIN, _BB_SUID_NEVER) -#endif #ifdef CONFIG_IFUPDOWN APPLET(ifdown, ifupdown_main, _BB_DIR_SBIN, _BB_SUID_NEVER) #endif +#ifdef CONFIG_IFENSLAVE + APPLET(ifenslave, ifenslave_main, _BB_DIR_SBIN, _BB_SUID_NEVER) +#endif #ifdef CONFIG_IFUPDOWN APPLET(ifup, ifupdown_main, _BB_DIR_SBIN, _BB_SUID_NEVER) #endif |
|
(0000382) pgf 08-04-05 13:08 |
i've done just enough on this to come up with a proper patch file (ifenslave.pat), rather than the tar of individual diffs originally provided. and i've included the alphabetical reordering mentioned in the other note. however, this applet isn't ready for primetime, in my opinion. it hasn't been trimmed or modified at all, as far as i can tell, and makes no use of the libbb. someone should probably do some of that cleanup before this is applied. |
|
(0000383) marc 08-04-05 13:27 |
IIRC, the individual diffs are mentioned in the rules for submitting patches somewhere. I seem to remember this since I used the same for a patch to u-boot and got slapped for this by Wolgang :) As for the 'prime-time' note, ifenslave is pretty simple and though I agree that it could be improved (everything can) it's not that needed (ifenslave is one C file). We're using the patch for euhm over 6 months in busybox and are pleased with it. |
|
(0000400) floydpink 08-10-05 10:28 |
I made some changes to reduce size and fit better into Busybox. This resulted in a change from 14912 bytes to 7524 bytes on my system. I attached a new unified patch with my changes. |
|
(0000564) marc 09-21-05 01:47 |
Refreshed work of Jason for the 1.01 |
|
(0000665) landley 11-04-05 23:25 |
Guys, convince me here. Why should I add this to busybox? It's small and self-contained ("gcc -Os -s linux-*/Documentation/networking/ifenslave.c" produces a 14k binary), and there seems to be very little demand for it. (Where's the use case for this? You have to buy twice as many switches, so the cost savings aren't quite as much as they seem unless you're only bonding two systems together directly sans switch. GigE is cheap enough that doing this for 100baseT makes very little sense anymore, and 10Gig is expensive primarily because demand for it has failed to materialize. Who needs this and yet is concerned about an extra 7k in their binary?) And yeah, the patch needs more work. If it was fully busyboxified it would use bb_getopts_ulflags(), bb_error_msg(), goto the end rather than reproducing if(CLEAN_UP) and return, and so on... But before worrying about that: where's the demand for this? Examples? |
|
(0000666) marc 11-04-05 23:54 edited on: 05-17-06 06:22 |
As for the busyboxification, some have done a bit of work, but I am willing to have another look and continue this to the end. I sent you in e-mail and on the mailinglist some justification why we use it (and I would assume the same for others); but in our case it boils down to availability and reliability of the embedded systems by providing a fallback physical connection bound to the same logical connection. It has proven its worth in one particular network with very buggy switches, and due to the critical nature of these devices, the fallback allowed to plan an overhaul because of the extra time (switches were out of our control). Some customers opt for a full redundant network. For embedded devices, I am truely convinced that a redundant ethernet connection provides an added value; we double all our connections for the afore mentioned reasons on all our boards... |
|
(0000744) marc 12-08-05 00:04 |
the latest 2.6 kernel (2.6.14) ripped out the backwards compatibility options for ifenslave; so the current patch does no longer work with the newe 2.6 kernels. Working on a replacement (to be expected after testing one of these days). |
|
(0000746) marc 12-08-05 04:11 |
The latest uploaded version is the new busybox version of ifenslave, that works fine with 2.6 kernels and recent 2.4 kernels. Support of the previous ifenslave version has ben discontinued in the last 2.6 kernels |
|
(0000747) marc 12-08-05 04:19 |
The latest patch adds 4.6 kB to busybox, getopt is used due to the use of optind (I could not find a similar thing in the bb_getopt_ulflags() |
|
(0001370) marc 05-17-06 06:21 |
refresh to 1.2.0 |
|
(0001610) vda 09-03-06 07:48 |
At least in current svn if(optind == argc)... can be used after bb_getopt_ulflags. Please do getopt -> bb_getopt_ulflags change. + bb_show_usage(); + res = 2; eek. IIRC bb_show_usage() does not return. + /* Open a basic socket */ + if ((skfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { + bb_error_msg("Socket\n"); + res = 1; + goto out; + } Replace thsi with just xsocket(). In other places: use b_[p]error_msg_and_exit() where makes sense. + if(CONFIG_FEATURE_CLEAN_UP){ + if (skfd >= 0) { + close(skfd); + } + } Personally I'd not worry about cleanup. It is needed (in the bright NOFORK future) only for applets like sed, cut... which are very frequently called from shell scripts. Nitpicks: + } + } else { + /* Accept multiple slaves */ + do { add "return res;" in the first block (above else), remove else. Allows you to de-indent that huge esle block one step back. Easier to read. } while ((slave_ifname = *spp++) != NULL); Plase avoid this. Harder to read for no apparent benefit. Do assignment before while(). |
|
(0005394) vda 02-26-08 09:06 |
Added quick and dirty 1.9.1 port... |
|
(0005404) vda 02-26-08 10:25 |
Added in rev 21117. Thanks! |
| Copyright © 2000 - 2006 Mantis Group |