hi 

i have changed igb-5.2.9.4 #1 to #2 for getting available  packet in mirror net 
interface, eg eth1
#1
static void igb_receive_skb(struct igb_q_vector *q_vector,
                            struct sk_buff *skb)
{
        struct vlan_group **vlgrp = netdev_priv(skb->dev);


        if (IGB_CB(skb)->vid) {
                if (*vlgrp) {
                        vlan_gro_receive(&q_vector->napi, *vlgrp,
                                         IGB_CB(skb)->vid, skb);
                } else {
                        dev_kfree_skb_any(skb);
                }
        } else {
                napi_gro_receive(&q_vector->napi, skb);

        }
}
#2 my patch


static void igb_receive_skb(struct igb_q_vector *q_vector,
                            struct sk_buff *skb)
{
        struct vlan_group **vlgrp = netdev_priv(skb->dev);


        if (IGB_CB(skb)->vid) {
                if (*vlgrp) {
                        vlan_gro_receive(&q_vector->napi, *vlgrp,
                                         IGB_CB(skb)->vid, skb);
                } else {
                        dev_kfree_skb_any(skb);
                }
        } else {
                u32 uDev = *(u32*)skb->dev->name;
                if(uDev == *(u32*)"eth1") {  // eth1 is mirror interface
                        struct iphdr *iph = NULL;
                        if(skb->protocol == htons(ETH_P_8021Q)) {
                                iph = (struct iphdr *)(skb->data + 4);
                        }
                        else if(skb->protocol == htons(ETH_P_IP)) {
                                iph = (struct iphdr *)skb->data;
                        }
                        if(iph != NULL && /*TCP*/6 == iph->protocol && 
htons(iph->tot_len) >= 80) {
                                napi_gro_receive(&q_vector->napi, skb);
                        } else {
                                dev_kfree_skb_any(skb);
                        }
                } else {
                        napi_gro_receive(&q_vector->napi, skb);
                }

        }
}



i have 2 interfaces:
eth0  :    with IP connected with gateway
eth1  :    mirror interface  for  data analysis



That's patch works ok after reboot, but  the default RSS  is  1.  so  i want to 
change RSS
# cat /etc/modprobe.d/igb.conf
options igb RSS=8,8  


After change RSS configure,i reboot the server. 
Then i can not connect the server in remote pc, and i found this system log in 
server:
Jun 16 21:47:04 shuju kernel: igb 0000:05:00.0: eth0: igb: eth0 NIC Link is Up 
1000 Mbps Full Duplex, Flow Control: None
Jun 16 21:47:04 shuju kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Jun 16 21:47:04 shuju kernel: ADDRCONF(NETDEV_UP): eth1: link is not ready
Jun 16 21:47:04 shuju kernel: igb 0000:05:00.1: eth1: igb: eth1 NIC Link is Up 
1000 Mbps Full Duplex, Flow Control: None
Jun 16 21:47:04 shuju kernel: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Jun 16 21:47:04 shuju kernel: igb 0000:05:00.0: Detected Tx Unit Hang
Jun 16 21:47:04 shuju kernel:  Tx Queue             <4>
Jun 16 21:47:04 shuju kernel:  TDH                  <1>
Jun 16 21:47:04 shuju kernel:  TDT                  <1>
Jun 16 21:47:04 shuju kernel:  next_to_use          <3>
Jun 16 21:47:04 shuju kernel:  next_to_clean        <0>
Jun 16 21:47:04 shuju kernel: buffer_info[next_to_clean]
Jun 16 21:47:04 shuju kernel:  time_stamp           <ffff0724>
Jun 16 21:47:04 shuju kernel:  next_to_watch        <ffff88043a5f9000>
Jun 16 21:47:04 shuju kernel:  jiffies              <ffff1058>
Jun 16 21:47:04 shuju kernel:  desc.status          <168000>

...  a lot of this error
Jun 17 09:03:13 shuju kernel: igb 0000:05:00.0: Detected Tx Unit Hang
Jun 17 09:03:13 shuju kernel:  Tx Queue             <7>
Jun 17 09:03:13 shuju kernel:  TDH                  <12>
Jun 17 09:03:13 shuju kernel:  TDT                  <13>
Jun 17 09:03:13 shuju kernel:  next_to_use          <13>
Jun 17 09:03:13 shuju kernel:  next_to_clean        <0>
Jun 17 09:03:13 shuju kernel: buffer_info[next_to_clean]
Jun 17 09:03:13 shuju kernel:  time_stamp           <100103fc3>
Jun 17 09:03:13 shuju kernel:  next_to_watch        <ffff88023b950000>
Jun 17 09:03:13 shuju kernel:  jiffies              <100104a7f>
Jun 17 09:03:13 shuju kernel:  desc.status          <1758000>



Can you help me ?
Thanks
------------------------------------------------------------------------------
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to