1 / 22

An Overview

GROS ( G ROS IS A R OUTING O PERATING S YSTEM ) Phase II Batch : 6 Guide :Sabitha . S Hemant Pillai Dean John Abraham Krishnakumar.R. An Overview. Review of previous stage. Fast Ethernet card reception and transmission. Transfer of packets from one network to another.

mada
Télécharger la présentation

An Overview

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GROS(GROS ISA ROUTING OPERATING SYSTEM)Phase II Batch : 6Guide :Sabitha . SHemant PillaiDean John AbrahamKrishnakumar.R

  2. An Overview • Review of previous stage. • Fast Ethernet card reception and transmission. • Transfer of packets from one network to another. • Equalizing the priority of cards. • Bug yet to be solved

  3. Review of previous stage • Booting. • Protected mode switching. • Reception and transmission of packets using PCI and ISA cards.

  4. Preliminaries • Speed of network cards Ordinary – 10Mbps Fast - 100Mbps Gigabit Ethernets – 1000Mbps • We use Fast Ethernet cards , 100Mbps • Hubs are of 10Mbps • So Uses Auto-negotiation

  5. Auto-Negotiation • Checks the ability of the partner. • Selects the common, maximum possible speed. • Done by the transceiver on the card. • In our case it is REALTEK’s 8139 chipset .

  6. Fast Ethernet cards • GROS function pci_bios gets us the base address of the card. • Situation demands two cards • Had to search Bus no 0 and 1 to find the address of both n/w cards • Hardware address can be got as in case of Ordinary cards (Read from PROM). • Done when initializing the card. • Transmission different

  7. Environment • Two networks • Can be heterogeneous networks with different OS’es running over IP. • A single machine with GROS, connected to two networks • The machine has two Fast Ethernet cards.

  8. The Plan network2 network1 check Case 1 : Packet from networ1 to network2 Case 2 : Packet from network 2 to network 1 System with GROS

  9. The Network card class ne • ne , Object used for network card management. • Presently it has only one method, init. • Declared In file ne.h. • Next slides, code is being explained . . . . represents few lines of code

  10. The code for ne class ne { public: unsigned int *rx_ring; void init(int notFirInit, int ioAd); }

  11. Highlights of ne • rx_ring - is the reception ring. • void ne::init(int notFirInit, int ioAd){ .......... if (!notFirInit) { /* Get hw address*/ /* Print it */ . . . . . . . }

  12. /* Bring chip to low power mode */ outb(0xC0, ioAd + CFG9346); outb(0x03, ioAd + CONFIG1); outb('H‘, ioAd + HLTCLK); /* Reset the chip */ outb(CMDRESET, ioAd + CHIPCMD); for (i = 1000 ; i > 0 ; i-- ) if ((inb(ioAd + CHIPCMD) & CMDRESET) == 0) break; . . . Fixup up the Max DMA . . . . . . Burst and duplex mode . . . outl((unsigned long)rx_ring, ioAd + RXBUF);

  13. . . Put the card to promiscous mode . . . . Enable the transmission . . . . . Enable interrupts . . . } • Using this class we declare : ne *n=(ne *) 0x5000; • Receive ring is initialized in the fn. ‘newmain’ as n->rx_ring=(unsigned int*)0x8000 • n->init(0, ioAd1) • n->init(0, ioAd2) (ioAd1 and ioAd2 got by function pci_bios )

  14. Interrupts • enable_irq()function enables the irq’s of keyboard and the two n/w cards. • Two function are registered : net1() as ISR of n/w card 1 net2()as ISR of n/w card 2 • Both functions call common function : net(addr1,addr2) net1 calls with ioAd1 and ioAd2 net2 with ioAd2 and ioAd1 as parameters

  15. Reception • Both the card receives to n->rx_ring one at a time. • After a single reception : 1 1 2 n->rx_ring rest of pckt status size next Size = header + pckt length

  16. High lights of Transmission • Put the address of packet to be transmitted to Transmit address register outl((unsigned int)(n->rx_ring+4), ,ioAd2+TXADDR0); • Tell the network card to transmit it outl(0xffffdfff & (myflag| ((unsigned int)hdr.h.count-4)) ,ioAd2+TXSTATUS0);

  17. The difference • Usual drivers use upto 4 xmit buffers • When transmit success, interrupt raised • Buffer marked as free • Here only one buffer used. • Wait until a single packet is transmitted while(!(inl(ioAd2+TXSTATUS0)&0x00008000)) { times++; if (times == 100) break; }

  18. The Bug • Traffic of one side greater then always the card of that side gets serviced(if it has low irq no.) • The trouble is with 8259 Interrupt controller • After an interrupt is serviced, its priority is made lowest . Hence all equal /* The code below equilizes the */ /* priority of all IRQ's D7=R=1 */ /* and D5=S=1 */ outb(0xa0,0x20); outb(0xa0,0xa0);

  19. Checking • Transmitted packets from machine in one n/w to a machine in other n/w • In the other n/w we checked using TCPDUMP • PING, TELNET and other tools does work • Tried changing the ip address when the packet was within GROS. Succeded

  20. Bug yet to be solved • GROS crashes when no of packets reach 2400 range • First Observed when : - LINUX NFS client m/c on one n/w - Server on another n/w - Ran X windows - Desktop was being transmitted crashed. • Verified packet nos by using the broadcast option of PING and TCPDUMP. • Changed stack location without success.

  21. Summary • Fast Ethernet card Functionality • Getting packet from one n/w to another • IRQ priority problem • Checking • The remaining Bug

  22. Thank You

More Related