public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS]TCP/IP problem
@ 2000-09-03 18:45 lqx
  2000-09-04  4:15 ` Hugo 'NOx' Tyson
  0 siblings, 1 reply; 5+ messages in thread
From: lqx @ 2000-09-03 18:45 UTC (permalink / raw)
  To: ecos-discuss

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 526 bytes --]

 Hi,all  I have got ecos running on our board using the 
CL_PS7500FE ARM processor. I have included  DM9008  ethernet chip and 
use the tcp/ip stack version 1_0b1 that I downloaded from the 
URL--sourceware.cygnus.com  .The chip really works.But when I ping the ecos 
with a packet more than 1500 bytes,the ecos never send the packet back.Why?Is 
there any bug in the tcp/ip stack?for when I debugged  the net device 
driver, I found the driver received the packet correctly .Anyone can help 
me?
 thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS]TCP/IP problem
  2000-09-03 18:45 [ECOS]TCP/IP problem lqx
@ 2000-09-04  4:15 ` Hugo 'NOx' Tyson
  0 siblings, 0 replies; 5+ messages in thread
From: Hugo 'NOx' Tyson @ 2000-09-04  4:15 UTC (permalink / raw)
  To: ecos-discuss


"lqx" <liqx@term.star.com.cn> writes:
>  I have got ecos running on our board using the CL_PS7500FE ARM =
> processor. I have included  DM9008  ethernet chip and use the tcp/ip =
> stack version 1_0b1 that I downloaded from the =
> URL--sourceware.cygnus.com  .The chip really works.But when I ping the =
> ecos with a packet more than 1500 bytes,the ecos never send the packet =
> back.Why?Is there any bug in the tcp/ip stack?for when I debugged  the =
> net device driver, I found the driver received the packet correctly =
> Anyone can help me?

I don't remember the details, but I remember encountering the same problem,
and I think that this change was the fix for it:

(in net/tcpip/VERSION/ChangeLog)
   2000-06-23  Hugo Tyson  <hmt@cygnus.co.uk>

        * src/ecos/support.c (cyg_net_mbuf_alloc, cyg_kmem_init): Align
        the mbuf pool to MSIZE [128] bytes.  That way dtom() works, nasty
        though it is.  That's needed for ip reassembly in ip_input.c, when
        dealing with large icmp-layer packets eg. ping -s 2000 ...

So perhaps if you update from anoncvs?

HTH,
	- Huge

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] TCP/IP problem
  2002-09-26 23:29 Marc Pignat
@ 2002-09-27  5:08 ` Gary Thomas
  0 siblings, 0 replies; 5+ messages in thread
From: Gary Thomas @ 2002-09-27  5:08 UTC (permalink / raw)
  To: Marc Pignat; +Cc: eCos Discussion

On Fri, 2002-09-27 at 00:13, Marc Pignat wrote:
> 
> Have you noticed performance problem with tcp/ip ?
> 
> When connected throught a switch, there is no problem and with a hub, a small amount of network traffic reduce the performance by a 10 factor...

This is most likely a result of collisions.  On a switch,
each connections between endpoints is virtual - just like
a single, private wire.  On a hub, all connections share
the same wire.  The way that ethernet transmissions happen,
there will always be collisions on shared transmission media.

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] TCP/IP problem
@ 2002-09-26 23:29 Marc Pignat
  2002-09-27  5:08 ` Gary Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: Marc Pignat @ 2002-09-26 23:29 UTC (permalink / raw)
  To: eCos


Have you noticed performance problem with tcp/ip ?

When connected throught a switch, there is no problem and with a hub, a small amount of network traffic reduce the performance by a 10 factor...

Has anybody the same problem ?

Marc



=====================================================================
Marc Pignat - Collaborateur Scientifique (Système Intégrés)
Haute Ecole valaisanne
Rte du Rawyl 47
1950 Sion
=====================================================================
Bureau : A306 tél : +41 27 606 8748 fax : +41 27 606 8715 mail : marc.pignat@hevs.ch
Privé : +41 79 678 71 13


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] TCP/IP problem
@ 2001-12-26  5:26 Raman Sivam
  0 siblings, 0 replies; 5+ messages in thread
From: Raman Sivam @ 2001-12-26  5:26 UTC (permalink / raw)
  To: ecos-discuss

Dear Sir,


We have written a small TCP client program which connects to a TCP server on
Port 7734 .The hardware platform is EDB7212 . The Error message in connect
system call is "Message Too long".The Progam that we tried is :


#include <network.h>
#include <cyg/kernel/kapi.h>
#include <stdio.h>
#include <string.h>


#define STACK_SIZE CYGNUM_HAL_STACK_SIZE_TYPICAL
static char stack[2][STACK_SIZE];
static cyg_thread thread1,thread2;
static cyg_handle_t t1,t2;
struct sockaddr_in local,cli;

int ser;

void server(struct bootp *bp)
{
	int c,i,*l,n,pp;
	char chdata='*';

	if((ser=socket(AF_INET,SOCK_STREAM,0))<0)
	{
		perror("\nSERVER  :  socket");
		exit(1);
	}
	printf("\nSERVER Socket Created");
	cyg_thread_delay(50);

    memset(&local, 0, sizeof(local));

	local.sin_family=AF_INET;
	local.sin_port=ntohs(7734);
	local.sin_addr.s_addr=INADDR_ANY;


	cli.sin_family=AF_INET;
	cli.sin_port=htons(7734);
	cli.sin_addr.s_addr=INADDR_ANY;

	diag_printf("Trying to bind...");

	if(bind(ser,(struct sockaddr *) &local,sizeof(local))<0)
	{
		perror("\nSERVER  :  bind");
		exit(1);
	}
	diag_printf("done\n");
	diag_printf("Trying to listen...");
	listen(ser,5);
	diag_printf("done\n");


	while(1)
	{
		diag_printf("\nBefore accept...");
		pp=sizeof(cli);
		c=accept(ser, (struct sockaddr *)&cli,&pp);
		if(c==-1)
		{
			perror("\nSERVER  :  accept");
			exit(1);
		}
		diag_printf("done. \n Accept Sucessful");

		diag_printf("Trying to read from the server...");

		if(n=read(c,&chdata,1)<0)
		{
			perror("\nSERVER  :  read failed!!!");
			exit(1);
		}

		diag_printf("\nCLIENT SENT   %c",chdata);

		/***********************/
		chdata = '@';
				diag_printf("Trying to send @...");

			 	if(write(c,&chdata,1)<0)
			 	{
					perror("\nSERVER  :  write failed");
					exit(1);
				}

				diag_printf("done\nSERVER WROTE TO CLIENT");
		close(c);
		/***********************/


	}
	close(ser);
}


void client(struct bootp *bp)
{

	int c;
	int i,s,l;
	char chd = '$';
	struct sockaddr_in toCon;

	s=socket(AF_INET,SOCK_STREAM,0);

	if(s<0)
	{
		perror("\nCLIENT  :  socket");
		exit(1);
	}
	printf("\nClinet Socket created");
	cyg_thread_delay(50);



    toCon.sin_family=AF_INET;
    toCon.sin_addr = bp->bp_yiaddr;
    toCon.sin_port=htons(7734);




	l=sizeof(toCon);

	diag_printf("Trying to connect to the server...");

	c=connect(s,(struct sockaddr*) &toCon,sizeof(toCon));


	if(c<0)
	{
		perror("\nCLIENT  :  connect");
		diag_printf("The Error number: %d", errno);
		exit(1);
	}
	diag_printf("done.");

	diag_printf("Trying to write a char to the server...");

	    l=sizeof(local);
		if(write(c,&chd,1)<0)
		{
			perror("\nSERVER  :  write failed");
			exit(1);
		}

		diag_printf("done\nWROTE TO SERVER");
		diag_printf("Trying to read a byte from the server...");

	if(read(c,&i,1)<0)
	{
		perror("\nSERVER  :  read failed");
		exit(1);
	}

	diag_printf("done\nSERVER WROTE  : %d",i);
	diag_printf("\nCLIENT SAYS BYE");
	close(c);
}

void
net_test(cyg_addrword_t param)
{


    if (eth0_up) {
        server(&eth0_bootp_data);
    }
 }
void
net_test1(cyg_addrword_t param)
{


    if (eth0_up) {
        client(&eth0_bootp_data);
        }
 }
void cyg_start(void)
{
	init_all_network_interfaces();

	cyg_thread_create(4,net_test,0,"Server",&stack[0],STACK_SIZE,&t1,&thread1);

cyg_thread_create(5,net_test1,0,"Client",&stack[1],STACK_SIZE,&t2,&thread2);

	cyg_thread_resume(t1);
	cyg_thread_resume(t2);

	cyg_scheduler_start();

}

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-09-27 12:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-03 18:45 [ECOS]TCP/IP problem lqx
2000-09-04  4:15 ` Hugo 'NOx' Tyson
2001-12-26  5:26 [ECOS] TCP/IP problem Raman Sivam
2002-09-26 23:29 Marc Pignat
2002-09-27  5:08 ` Gary Thomas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).