netxen: enable ip addr hashing
NX3031 hardware requires local IP addresses for packet accumulation (LRO). IP address hashing is required to distinguish a local TCP flow from others (forwarded or guest). This patch adds listener for IP and netdev events and configures IP address in the firmware. Signed-off-by: Amit Kumar Salecha <amit@netxen.com> Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
68b3cae082
commit
6598b169b8
@@ -706,6 +706,30 @@ int netxen_config_rss(struct netxen_adapter *adapter, int enable)
|
||||
return rv;
|
||||
}
|
||||
|
||||
int netxen_config_ipaddr(struct netxen_adapter *adapter, u32 ip, int cmd)
|
||||
{
|
||||
nx_nic_req_t req;
|
||||
u64 word;
|
||||
int rv;
|
||||
|
||||
memset(&req, 0, sizeof(nx_nic_req_t));
|
||||
req.qhdr = cpu_to_le64(NX_HOST_REQUEST << 23);
|
||||
|
||||
word = NX_NIC_H2C_OPCODE_CONFIG_IPADDR | ((u64)adapter->portnum << 16);
|
||||
req.req_hdr = cpu_to_le64(word);
|
||||
|
||||
req.words[0] = cpu_to_le64(cmd);
|
||||
req.words[1] = cpu_to_le64(ip);
|
||||
|
||||
rv = netxen_send_cmd_descs(adapter, (struct cmd_desc_type0 *)&req, 1);
|
||||
if (rv != 0) {
|
||||
printk(KERN_ERR "%s: could not notify %s IP 0x%x reuqest\n",
|
||||
adapter->netdev->name,
|
||||
(cmd == NX_IP_UP) ? "Add" : "Remove", ip);
|
||||
}
|
||||
return rv;
|
||||
}
|
||||
|
||||
int netxen_linkevent_request(struct netxen_adapter *adapter, int enable)
|
||||
{
|
||||
nx_nic_req_t req;
|
||||
|
Reference in New Issue
Block a user