Setting ce driver parameters with ce.conf

I am starting to run into a situation where I need both a 100M Full Duplex set on one ce interface, but 1000M Auto Negotiate on another. To put it bluntly this is a chore. I have done it a few times over the last year, but never remember the steps. I am sure there are some descent docs out there but I have pieced this together from looking at the documentation, which was wrong at one point. What you need to do is unambiguously identify the exact PCI device to supply different parameters. Otherwise it is easy you just add the following to /platform/sun4u/kernel/drv/ce.conf:

adv_autoneg_cap=0 \
adv_1000fdx_cap=0 \
adv_1000hdx_cap=0 \
adv_100fdx_cap=1 \
adv_100hdx_cap=0 \
adv_10fdx_cap=0 \
adv_10hdx_cap=0;

Of course you can use ndd in an rcX.d script to set these parameters, but SUN is quick to point out in the documentation that it is not supported. Plus I always viewed the conf files as the best practice.

NOTE: The following should work exactly the same for bge devices


The relevant documentation start on page 54. First you need to get the correct name:

# grep ce /etc/driver_aliases
ce "pci108e,abba"
ce "pci100b,35"

The documentation simply notes the name is “pci100b,35” for the Sun Quad GigaSwoft Ethernet PCI-X. Which in my particular instance is the on board device for my V490. Next we need the path name and associated instance numbers. This is obtained by looking at /etc/path_to_inst:

# grep ce /etc/path_to_inst
"/pci@8,700000/network@2" 0 "ce"
"/pci@9,700000/network@2" 1 "ce"
"/pci@9,600000/network@1" 2 "ce"

The documentation isn’t very clear, but the first line is the ce interface on the SC card. If you have a Quad Gigaswift installed on a V890 it might look more like this:

# grep ce /etc/path_to_inst
"/pci@9,700000/network@2" 0 "ce"
"/pci@9,700000/pci@2/network@0" 1 "ce"
"/pci@9,700000/pci@2/network@1" 2 "ce"
"/pci@9,700000/pci@2/network@2" 3 "ce"
"/pci@9,700000/pci@2/network@3" 4 "ce"
"/pci@9,700000/pci@3/network@0" 5 "ce"
"/pci@9,700000/pci@3/network@1" 6 "ce"
"/pci@9,700000/pci@3/network@2" 7 "ce"
"/pci@9,700000/pci@3/network@3" 8 "ce"

There are some subtle differences. You should note the extra pci@2 in the path name. That is because the interface is on a card plugged into a PCI slot, versus an on board interface. Using the V490 with on board interface the following configures the first interface to 100M Full, and the second interface to 1000M Auto Negotiate. Add the following to /platform/sun4u/kernel/drv/ce.conf:

name="pci100b,35" parent="/pci@9,700000" unit-address="2" adv-autoneg-cap=0 adv-100hdx-cap=0 adv-100fdx-cap=1 adv-1000fdx-cap=0 adv-10hdx-cap=0 adv-10fdx-cap=0 adv-1000hdx-cap=0 adv-100T4-cap=0;
name="pci100b,35" parent="/pci@9,600000" unit-address="1" adv-autoneg-cap=1 adv-100hdx-cap=0 adv-100fdx-cap=0 adv-1000fdx-cap=1 adv-10hdx-cap=0 adv-10fdx-cap=0 adv-1000hdx-cap=0 adv-100T4-cap=0;

Here is the same thing with the V890 example, the only difference is we use the 7th interface for the 1000M Auto Negotiate. I do this to illustrate the difference:

name="pci100b,35" parent="/pci@9,700000/pci@2" unit-address="0" adv-autoneg-cap=0 adv-100hdx-cap=0 adv-100fdx-cap=1 adv-1000fdx-cap=0 adv-10hdx-cap=0 adv-10fdx-cap=0 adv-1000hdx-cap=0 adv-100T4-cap=0;
name="pci100b,35" parent="/pci@9,700000/pci@3" unit-address="2" adv-autoneg-cap=1 adv-100hdx-cap=0 adv-100fdx-cap=0 adv-1000fdx-cap=1 adv-10hdx-cap=0 adv-10fdx-cap=0 adv-1000hdx-cap=0 adv-100T4-cap=0;

It is easy to confuse the unit-address for the instance number. Let’s take the 7th interface path name and tear it apart:

"/pci@9,700000/pci@3/network@2" 7 "ce"

  • The parent is /pci@9,700000/pci@3, everything before the last / (slash) character
  • The hardware name is everything after the last / (slash) character and before the @ (at sign) character
  • The unit address is the number after the last @ (at sign) character

I hope this helps. Use this script on this page to make sure the settings are working correctly. If it doesn’t work check /var/adm/messages, and don’t give up. You probably just cut and pasted something wrong.

Advertisements

2 Responses to “Setting ce driver parameters with ce.conf”

  1. Buu Tran Says:

    I love this pace, it is so clear and knowledgable

  2. rajnikanth Says:

    it helps a lot


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: