[PATCH ethtool v3 1/2] ethtool: add support for get/set ethtool_tunable

2020-07-19 Thread Govindarajulu Varadarajan
Add support for ETHTOOL_GTUNABLE and ETHTOOL_STUNABLE options. Tested rx-copybreak on enic driver. Tested ETHTOOL_TUNABLE_STRING options with test/debug changes in kernel. Signed-off-by: Govindarajulu Varadarajan --- v3: * Remove handling of string type tunables v2: * Fix alignments and braces

[PATCH ethtool v3 2/2] man: add man page for ETHTOOL_GTUNABLE and ETHTOOL_STUNABLE

2020-07-19 Thread Govindarajulu Varadarajan
Signed-off-by: Govindarajulu Varadarajan --- v3: Document special values 0 (disabled) and 65535 (auto) for pfc-prevention-tout. v2: Add description ethtool.8.in | 40 1 file changed, 40 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index

[PATCH ethtool v2 1/2] ethtool: add support for get/set ethtool_tunable

2020-07-17 Thread Govindarajulu Varadarajan
Add support for ETHTOOL_GTUNABLE and ETHTOOL_STUNABLE options. Tested rx-copybreak on enic driver. Tested ETHTOOL_TUNNABLE_STRING options with test/debug changes in kernel. Signed-off-by: Govindarajulu Varadarajan --- v2: * Fix alignments and braces. * Move union definition outside struct

Re: [PATCH ethtool 1/2] ethtool: add support for get/set ethtool_tunable

2020-07-17 Thread Govindarajulu Varadarajan (gvaradar)
On Sun, 2020-07-05 at 00:50 +0200, Michal Kubecek wrote: > On Mon, Jun 08, 2020 at 10:52:54AM -0700, Govindarajulu Varadarajan wrote: > > Add support for ETHTOOL_GTUNABLE and ETHTOOL_STUNABLE options. > > > > Tested rx-copybreak on enic driver. Tested ET

[PATCH ethtool v2 2/2] man: add man page for ETHTOOL_GTUNABLE and ETHTOOL_STUNABLE

2020-07-17 Thread Govindarajulu Varadarajan
Signed-off-by: Govindarajulu Varadarajan --- v2: Add description ethtool.8.in | 40 1 file changed, 40 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index 689822e..9a3e9a7 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -398,6 +398,18

[PATCH ethtool 2/2] man: add man page for ETHTOOL_GTUNABLE and ETHTOOL_STUNABLE

2020-06-08 Thread Govindarajulu Varadarajan
Signed-off-by: Govindarajulu Varadarajan --- ethtool.8.in | 12 1 file changed, 12 insertions(+) diff --git a/ethtool.8.in b/ethtool.8.in index 4c5b6c5..da0564e 100644 --- a/ethtool.8.in +++ b/ethtool.8.in @@ -390,6 +390,18 @@ ethtool \- query or control network driver and hardware

[PATCH ethtool 1/2] ethtool: add support for get/set ethtool_tunable

2020-06-08 Thread Govindarajulu Varadarajan
Add support for ETHTOOL_GTUNABLE and ETHTOOL_STUNABLE options. Tested rx-copybreak on enic driver. Tested ETHTOOL_TUNNABLE_STRING options with test/debug changes in kernel. Signed-off-by: Govindarajulu Varadarajan --- ethtool.c | 227 ++ 1

[PATCH net v2] net: handle 802.1P vlan 0 packets properly

2019-06-14 Thread Govindarajulu Varadarajan
as untagged packets. This patch fixes it by checking if vlan_id is 0 and processes next vlan header. Signed-off-by: Govindarajulu Varadarajan --- v2: Move the check out of vlan_do_receive() to __netif_receive_skb_core(). This way, we do not change the behaviour when rx_handler

Re: [PATCH RESEND net] net: handle 802.1P vlan 0 packets properly

2019-06-11 Thread Govindarajulu Varadarajan (gvaradar)
@On Tue, 2019-06-11 at 13:34 +0900, Toshiaki Makita wrote: > On 2019/06/11 3:31, Govindarajulu Varadarajan wrote: > > When stack receives pkt: [802.1P vlan 0][802.1AD vlan 100][IPv4], > > vlan_do_receive() returns false if it does not find vlan_dev. Later > > __netif_receiv

[PATCH RESEND net] net: handle 802.1P vlan 0 packets properly

2019-06-10 Thread Govindarajulu Varadarajan
as untagged packets. This patch fixes it by checking if vlan_id is 0 and processes next vlan header. Signed-off-by: Govindarajulu Varadarajan --- net/8021q/vlan_core.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/net/8021q/vlan_core.c b/net/80

Re: [PATCH net] net: handle 802.1P vlan 0 packets properly

2019-06-10 Thread Govindarajulu Varadarajan (gvaradar)
On Mon, 2019-06-10 at 14:28 -0700, David Miller wrote: > From: Govindarajulu Varadarajan > Date: Mon, 10 Jun 2019 07:27:02 -0700 > > > When stack receives pkt: [802.1P vlan 0][802.1AD vlan 100][IPv4], > > vlan_do_receive() returns false if it does not

[PATCH net] net: handle 802.1P vlan 0 packets properly

2019-06-10 Thread Govindarajulu Varadarajan
as untagged packets. This patch fixes it by checking if vlan_id is 0 and processes next vlan header. Signed-off-by: Govindarajulu Varadarajan --- net/8021q/vlan_core.c | 24 +--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/net/8021q/vlan_core.c b/net/80

Re: [PATCH net-next] ipv4: Handle RTA_GATEWAY set to 0

2019-04-10 Thread Govindarajulu Varadarajan
ddress is actually > set. > > Fixes: f35b794b3b405 ("ipv4: Prepare fib_config for IPv6 gateway") > Reported-by: Govindarajulu Varadarajan > Signed-off-by: David Ahern Tested-by: Govindarajulu Varadarajan This fixes the issue I was facing. Thanks David.

Re: [PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh

2019-04-09 Thread Govindarajulu Varadarajan
On Tue, Apr 9, 2019 at 7:13 PM David Ahern wrote: > > On 4/9/19 5:08 PM, Govindarajulu Varadarajan wrote: > > On Fri, Apr 5, 2019 at 4:32 PM David Ahern wrote: > >> > >> From: David Ahern > >> > >> fib_check_nh is currently huge covering multiple

Re: [PATCH v2 net-next 08/18] ipv4: Refactor fib_check_nh

2019-04-09 Thread Govindarajulu Varadarajan
On Fri, Apr 5, 2019 at 4:32 PM David Ahern wrote: > > From: David Ahern > > fib_check_nh is currently huge covering multiple uses cases - device only, > device + gateway, and device + gateway with ONLINK. The next patch adds > validation checks for IPv6 which only further complicates it. So, brea

[PATCH net] enic: fix checksum validation for IPv6

2019-01-30 Thread Govindarajulu Varadarajan
In case of IPv6 pkts, ipv4_csum_ok is 0. Because of this, driver does not set skb->ip_summed. So IPv6 rx checksum is not offloaded. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --gi

[PATCH net] enic: do not call enic_change_mtu in enic_probe

2018-07-30 Thread Govindarajulu Varadarajan
ge_mtu and assign the mtu to netdev->mtu. Fixes: ab123fe071c9 ("enic: handle mtu change for vf properly") Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet

[PATCH net] enic: handle mtu change for vf properly

2018-07-27 Thread Govindarajulu Varadarajan
When driver gets notification for mtu change, driver does not handle it for all RQs. It handles only RQ[0]. Fix is to use enic_change_mtu() interface to change mtu for vf. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 78 +++-- 1

[PATCH net] enic: initialize enic->rfs_h.lock in enic_probe

2018-06-19 Thread Govindarajulu Varadarajan
? dev_load+0x6a/0x150 dev_ioctl+0x253/0x4b0 sock_do_ioctl+0x9a/0x130 sock_ioctl+0x1af/0x350 do_vfs_ioctl+0x8e/0x670 ? syscall_trace_enter+0x1e2/0x380 ksys_ioctl+0x60/0x90 __x64_sys_ioctl+0x16/0x20 do_syscall_64+0x5a/0x170 entry_SYSCALL_64_after_hwframe+0x49/0xbe Signed-off-by: Govindarajulu

[PATCH net] enic: do not overwrite error code

2018-06-18 Thread Govindarajulu Varadarajan
In failure path, we overwrite err to what vnic_rq_disable() returns. In case it returns 0, enic_open() returns success in case of error. Reported-by: Ben Hutchings Fixes: e8588e268509 ("enic: enable rq before updating rq descriptors") Signed-off-by: Govindarajulu Varadarajan --- d

[PATCH net-next] enic: fix UDP rss bits

2018-06-05 Thread Govindarajulu Varadarajan
s for both IPv4 and IPv6. Also add spinlock around vnic_dev_capable_rss_hash_type(). Signed-off-by: Govindarajulu Varadarajan --- .../net/ethernet/cisco/enic/enic_ethtool.c| 18 + drivers/net/ethernet/cisco/enic/enic_main.c | 20 +-- drivers/net/ethernet/

[PATCH net v2] enic: set DMA mask to 47 bit

2018-05-23 Thread Govindarajulu Varadarajan
In commit 624dbf55a359b ("driver/net: enic: Try DMA 64 first, then failover to DMA") DMA mask was changed from 40 bits to 64 bits. Hardware actually supports only 47 bits. Fixes: 624dbf55a359b ("driver/net: enic: Try DMA 64 first, then failover to DMA") Signed-off-by: Govin

[PATCH net-next] enic: set DMA mask to 47 bit

2018-05-22 Thread Govindarajulu Varadarajan
In commit 624dbf55a359b ("driver/net: enic: Try DMA 64 first, then failover to DMA") DMA mask was changed from 40 bits to 64 bits. Hardware actually supports only 47 bits. Fixes: 624dbf55a359b("driver/net: enic: Try DMA 64 first, then failover to DMA") Signed-off-by: Govin

[PATCH net-next] enic: drop IP proto check for vxlan tunnel delete

2018-03-13 Thread Govindarajulu Varadarajan
r IP proto in tunnel delete path. Driver need not check for IP proto since same UDP port cannot be used to create two tunnels. Fixes: d11790941dd3 ("enic: Add vxlan offload support for IPv6 pkts") Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main

[PATCH net-next 0/6] enic update

2018-03-01 Thread Govindarajulu Varadarajan
This series adds support for IPv6 vxlan offload and UDP rss along with a bug fix in filling the rq ring. Govindarajulu Varadarajan (6): enic: Check inner ip proto for pseudo header csum enic: Add vxlan offload support for IPv6 pkts enic: Check if hw supports multi wq with vxlan offload

[PATCH net-next 6/6] enic: set IG desc cache flag in open

2018-03-01 Thread Govindarajulu Varadarajan
New adapter needs CMD_OPENF_IG_DESCCACHE flag to be set. If this flag is not set, fw flushes the global IG desc cache. This flag is nop in older adapter. Also increment driver version Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic.h| 2 +- drivers/net

[PATCH net-next 4/6] enic: set UDP rss flag

2018-03-01 Thread Govindarajulu Varadarajan
New hardware needs UDP flag set to enable UDP L4 rss hash. Add ethtool get option to display supported rss flow hash. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_ethtool.c | 36 ++ drivers/net/ethernet/cisco/enic/enic_main.c| 4

[PATCH net-next 1/6] enic: Check inner ip proto for pseudo header csum

2018-03-01 Thread Govindarajulu Varadarajan
To compute pseudo IP header csum, we need to check the inner header for encap pkt, not outer IP header. Also add pseudo csum for IPv6 inner pkt. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 15 ++- 1 file changed, 14 insertions(+), 1

[PATCH net-next 2/6] enic: Add vxlan offload support for IPv6 pkts

2018-03-01 Thread Govindarajulu Varadarajan
New adaptors supports vxlan offload for inner IPv6 and outer IPv6 vxlan pkts. Fw sets BIT(0) & BIT(1) in a1 if hw supports ipv6 inner & outer pkt offload. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic.h| 1 + drivers/net/ethernet/ci

[PATCH net-next 3/6] enic: Check if hw supports multi wq with vxlan offload

2018-03-01 Thread Govindarajulu Varadarajan
Some adaptors do not support vxlan offload when multi wq is configured. If hw supports multi wq, BIT(2) is set in a1. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 5 + drivers/net/ethernet/cisco/enic/vnic_devcmd.h | 1 + 2 files changed, 6

[PATCH net-next 5/6] enic: enable rq before updating rq descriptors

2018-03-01 Thread Govindarajulu Varadarajan
rq should be enabled before posting the buffers to rq desc. If not hw sees stale value and casuses DMAR errors. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net

[PATCH net-next v2] enic: add wq clean up budget

2017-12-21 Thread Govindarajulu Varadarajan
get to 256. Signed-off-by: Govindarajulu Varadarajan --- v2: resubmit: previous discussion: https://patchwork.ozlabs.org/patch/845011/ drivers/net/ethernet/cisco/enic/enic.h | 2 ++ drivers/net/ethernet/cisco/enic/enic_main.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --

Re: [PATCH net] enic: add wq clean up budget

2017-12-19 Thread Govindarajulu Varadarajan
On Fri, 8 Dec 2017, Govindarajulu Varadarajan wrote: On Wed, 6 Dec 2017, David Miller wrote: From: Govindarajulu Varadarajan Date: Tue, 5 Dec 2017 11:14:41 -0800 In case of tx clean up, we set '-1' as budget. This means clean up until wq is empty or till (1 << 32) pkts ar

Re: [PATCH net] enic: add wq clean up budget

2017-12-08 Thread Govindarajulu Varadarajan
On Wed, 6 Dec 2017, David Miller wrote: From: Govindarajulu Varadarajan Date: Tue, 5 Dec 2017 11:14:41 -0800 In case of tx clean up, we set '-1' as budget. This means clean up until wq is empty or till (1 << 32) pkts are cleaned. Under heavy load this will run for lon

[PATCH net] enic: add wq clean up budget

2017-12-05 Thread Govindarajulu Varadarajan
get to 256. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic.h | 2 ++ drivers/net/ethernet/cisco/enic/enic_main.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic/enic.h b/drivers/net/ethernet/cisco/enic

[PATCH net-next] enic: add sw timestamp support

2017-12-01 Thread Govindarajulu Varadarajan
Add ethtool ops to advertise sw timestamping. Call skb_tx_timestamp() just before ringing the wq doorbell. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_ethtool.c | 12 drivers/net/ethernet/cisco/enic/enic_main.c| 1 + 2 files changed, 13

[PATCH net-next v2] enic: Fix format truncation warning

2017-06-19 Thread Govindarajulu Varadarajan
16 snprintf(enic->msix[intr].devname, ^~ sizeof(enic->msix[intr].devname), ~ "%.11s-rx-%u", netdev->name, i); ~~~~~~~~~~~ Signed-off-by: Govindarajulu Varadarajan ---

Re: [PATCH net-next] enic: use kasprintf instead of snprintf

2017-06-18 Thread Govindarajulu Varadarajan
On Sun, 18 Jun 2017, Joe Perches wrote: Perhaps it'd be better to use a style with a variable length format precision ie: "%.*s-tx-%u", IFNAMSIZ - 4 - , netdev-name, i) This would truncate interface name. Why is this preferred to my patch?

[PATCH net-next] enic: use kasprintf instead of snprintf

2017-06-18 Thread Govindarajulu Varadarajan
tx-%u", netdev->name, i); ^ also increment the version. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic.h | 4 +-- drivers/net/ethernet/cisco/enic/enic_main.c | 38 +++-- 2 files changed, 27 insertions(+), 15

[PATCH net-next] enic: unmask intr only when napi is complete

2017-05-22 Thread Govindarajulu Varadarajan
In case of busy poll, napi_complete_done returns false and does not dequeue napi. In this case do not unmask the intr. We are guaranteed napi is called again. This reduces unnecessary iowrites. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 6

[PATCH net-next] enic: update enic maintainers

2017-03-21 Thread Govindarajulu Varadarajan
update enic maintainers Signed-off-by: Govindarajulu Varadarajan --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index d14e42bef72e..5094b78c4acc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3159,7 +3159,6 @@ F:drivers/platform/chrome

Re: [PATCH] enic: Store permanent MAC address during probe()

2017-03-20 Thread Govindarajulu Varadarajan
On Mon, 20 Mar 2017, PJ Waskiewicz wrote: On Mon, Mar 20, 2017 at 5:33 PM, Govindarajulu Varadarajan wrote: On Mon, 20 Mar 2017, PJ Waskiewicz wrote: From: PJ Waskiewicz The permanent MAC address is useful to store for things like ethtool, and when bonding with modes such as active

Re: [PATCH] enic: Store permanent MAC address during probe()

2017-03-20 Thread Govindarajulu Varadarajan
On Mon, 20 Mar 2017, PJ Waskiewicz wrote: From: PJ Waskiewicz The permanent MAC address is useful to store for things like ethtool, and when bonding with modes such as active/passive or LACP. Hi Peter, Is this patch fixing an issue with bonding drive on enic? This follows the model of oth

[PATCH 1/3 v2 net-next] enic: add devcmds for vxlan offload

2017-02-08 Thread Govindarajulu Varadarajan
csum_ok/encap Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/vnic_dev.c| 34 ++ drivers/net/ethernet/cisco/enic/vnic_dev.h| 5 +++ drivers/net/ethernet/cisco/enic/vnic_devcmd.h | 51 +++ drivers/net/ethernet/cisco/enic

[PATCH 2/3 v2 net-next] enic: add udp_tunnel ndo for vxlan offload

2017-02-08 Thread Govindarajulu Varadarajan
ip_csum_ok and tcp_udp_csum_ok mode 2: BIT(0) in rss_hash is set if it is encapsulated packet. BIT(1) is set if outer_ip_csum_ok/ BIT(2) is set if outer_tcp_csum_ok tcp_udp_csum_ok/ipv4_csum_ok is set if inner csum is OK. Signed-off-by: Govindarajulu Varadarajan --- drivers/net

[PATCH 0/3 v2 net-next] enic: add vxlan offload support

2017-02-08 Thread Govindarajulu Varadarajan
, on all three patches. Govindarajulu Varadarajan (3): enic: add devcmds for vxlan offload enic: add udp_tunnel ndo for vxlan offload enic: add vxlan offload on tx path drivers/net/ethernet/cisco/enic/enic.h| 6 + drivers/net/ethernet/cisco/enic/enic_main.c | 282

[PATCH 3/3 v2 net-next] enic: add vxlan offload on tx path

2017-02-08 Thread Govindarajulu Varadarajan
Define ndo_features_check. Hw supports offload only for ipv4 inner and ipv4 outer pkt. Code refactor for setting inner tcp pseudo csum. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 126 +--- 1 file changed, 114 insertions

[PATCH 0/3 net-next] enic: add vxlan offload support

2017-02-08 Thread Govindarajulu Varadarajan
mode 0 and 2. Driver gets the supported modes bitmap using get_supported_feature_ver devcmd and selects the highest mode both driver and fw supports. Third patch adds offload support on tx path by adding enic_features_check(). Govindarajulu Varadarajan (3): enic: add devcmds for vxlan offload

[PATCH 1/3 net-next] enic: add devcmds for vxlan offload

2017-02-07 Thread Govindarajulu Varadarajan
csum_ok/encap Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/vnic_dev.c| 42 ++ drivers/net/ethernet/cisco/enic/vnic_dev.h| 5 +++ drivers/net/ethernet/cisco/enic/vnic_devcmd.h | 51 +++ drivers/net/ethernet/cisco

[PATCH 2/3 net-next] enic: add udp_tunnel ndo for vxlan offload

2017-02-07 Thread Govindarajulu Varadarajan
ip_csum_ok and tcp_udp_csum_ok mode 2: BIT(0) in rss_hash is set if it is encapsulated packet. BIT(1) is set if outer_ip_csum_ok/ BIT(2) is set if outer_tcp_csum_ok tcp_udp_csum_ok/ipv4_csum_ok is set if inner csum is OK. Signed-off-by: Govindarajulu Varadarajan --- drivers/net

[PATCH 3/3 net-next] enic: add vxlan offload on tx path

2017-02-07 Thread Govindarajulu Varadarajan
Define ndo_features_check. Hw supports offload only for ipv4 inner and ipv4 outer pkt. Code refactor for setting inner tcp pseudo csum. Signed-off-by: Govindarajulu Varadarajan --- drivers/net/ethernet/cisco/enic/enic_main.c | 126 +--- 1 file changed, 114 insertions

[PATCH net-next] enic: set skb->hash type properly

2016-11-01 Thread Govindarajulu Varadarajan
From: Govindarajulu Varadarajan <_gov...@gmx.com> Driver sets the skb l4/l3 hash based on NIC_CFG_RSS_HASH_TYPE_*, which is bit mask. This is wrong. Hw actually provides us enum. Use CQ_ENET_RQ_DESC_RSS_TYPE_* to set l3 and l4 hash type. Fixes: bf751ba802fe ("driver/net: enic: reco

[PATCH net] enic: fix rq disable

2016-10-27 Thread Govindarajulu Varadarajan
nsure we do not miss when running goes low. In old adaptors rq->enable needs to be re-written to 0 when posted_index is reset in vnic_rq_clean() in order to keep rq->prefetch_index in sync. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/n

[PATCH net-next] enic: set netdev->vlan_features

2016-04-15 Thread Govindarajulu Varadarajan
From: Govindarajulu Varadarajan <_gov...@gmx.com> Driver sets vlan_feature to netdev->features as hardware supports all of them on vlan interface. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic_main.c | 1 + 1 file chang

[PATCH net] enic: increment devcmd2 result ring in case of timeout

2016-02-03 Thread Govindarajulu Varadarajan
incrementing result even in case of timeout. Fixes: 373fb0873d43 ("enic: add devcmd2") Signed-off-by: Sandeep Pillai Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic.h | 2 +- drivers/net/ethernet/cisco/enic

[PATCH v2 net-next] enic: assign affinity hint to interrupts

2015-10-30 Thread Govindarajulu Varadarajan
policy. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic.h | 27 +++ drivers/net/ethernet/cisco/enic/enic_main.c | 72 + 2 files changed, 99 insertions(+) diff --git a/drivers/net/ethernet/cisc

[PATCH net-next] enic: assign affinity hint to interrupts

2015-10-27 Thread Govindarajulu Varadarajan
cpus mask based on affinity hint. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic.h | 27 ++ drivers/net/ethernet/cisco/enic/enic_main.c | 81 + 2 files changed, 108 insertions(+) diff --git a/d

[PATCH net-next 2/2] enic: do hang reset only in case of tx timeout

2015-10-01 Thread Govindarajulu Varadarajan
. Hang reset only in case of tx timeout, in .ndo_tx_timeout. Do soft reset otherwise. Introduce deferred work, enic_tx_hang_reset, to do hang reset. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic.h | 1 + drivers/net/ethernet/cisc

[PATCH net-next 1/2] enic: handle spurious error interrupt

2015-10-01 Thread Govindarajulu Varadarajan
Some of the enic adaptors are know to generate spurious interrupts. When error interrupt is generated, driver just resets the device. This patch resets the device only when an error is occurred. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisc

[PATCH net-next v2] enic: reduce ioread in devcmd2

2015-08-25 Thread Govindarajulu Varadarajan
posted_index is RO in firmware. We need not do ioread everytime to get posted index. Store posted index locally. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- v2: initialize devcmd2->posted properly in vnic_dev_init_devcmd2 drivers/net/ethernet/cisco/enic/vnic_

Re: [PATCH net-next] enic: reduce ioread in devcmd2

2015-08-25 Thread Govindarajulu Varadarajan
On Tue, 25 Aug 2015, Govindarajulu Varadarajan wrote: posted_index is RO in firmware. We need not do ioread everytime to get posted index. Store posted index locally. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- diff --git a/drivers/net/ethernet/cisco/enic/vnic_w

[PATCH net-next] enic: reduce ioread in devcmd2

2015-08-25 Thread Govindarajulu Varadarajan
posted_index is RO in firmware. We need not do ioread everytime to get posted index. Store posted index locally. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/vnic_dev.c | 8 +--- drivers/net/ethernet/cisco/enic/vnic_wq.h | 1 + 2

[PATCH 3/4 net-next] enic: add devcmd2 resources

2015-08-15 Thread Govindarajulu Varadarajan
Add devcmd resources to vnic_res_type. Add data types used by devcmd. Signed-off-by: N V V Satyanarayana Reddy Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/vnic_dev.h | 1 + drivers/net/ethernet/cisco/enic/vnic_devcmd.h

[PATCH 4/4 net-next] enic: add devcmd2

2015-08-15 Thread Govindarajulu Varadarajan
ow control. Initialize devcmd2, if fails we fall back to devcmd1. Also change the driver version. Signed-off-by: N V V Satyanarayana Reddy Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic.h| 2 +- drivers/net/ethernet/cisco/

[PATCH 2/4 net-next] enic: use netdev_ or dev_ instead of pr_

2015-08-15 Thread Govindarajulu Varadarajan
pr_info does not give any details about the interface involved. This patch uses netdev_info for printing the message. Use dev_info where netdev is not ready. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic.h | 19 drive

[PATCH 1/4 net-next] enic: move struct definition from .c to .h file

2015-08-15 Thread Govindarajulu Varadarajan
Some of the structure definitions are in .c file to make them private to that file. This patch moves the struct definition to .h file, So that their definitions are accessible from other files. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisc

[PATCH 0/4 net-next] enic: add devcmd2

2015-08-15 Thread Govindarajulu Varadarajan
uses work queue to post the devcmds, just like tx work queue. This allows better flow control. Govindarajulu Varadarajan (4): enic: move struct definition from .c to .h file enic: use netdev_ or dev_ instead of pr_ enic: add devcmd2 resources enic: add devcmd2 drivers/net/ethernet/cisco/e

[PATCH net-next 1/2] enic: add adaptive coalescing intr for intx and msi poll

2015-07-15 Thread Govindarajulu Varadarajan
s static after enic_poll. Since enic_poll needs it, move both of these function definitions above enic_poll. No change in functionality. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic_main.c | 135 ++-- 1 file changed,

[PATCH net-next 2/2] enic: allow adaptive coalesce setting for msi/legacy intr

2015-07-15 Thread Govindarajulu Varadarajan
coalesce value greater than what adaptor supports, driver uses the max value. We should at least log this. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic_ethtool.c | 113 ++--- 1 file changed, 65 insertions(+), 48 dele

[PATCH net v2] enic: fix issues in enic_poll

2015-07-01 Thread Govindarajulu Varadarajan
occurs and napi is scheduled on different cpu, it tries to acquire enic_poll_lock_napi() and fails. Unlock napi_poll before unmasking the interrupt. v2: Do not change tx wonk done behaviour. Consider only rx work done for completing napi. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.

[PATCH net] enic: fix issues in enic_poll

2015-06-30 Thread Govindarajulu Varadarajan
different cpu, it tries to acquire enic_poll_lock_napi() and fails. Unlock napi_poll before unmasking the interrupt. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic_main.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-)

[PATCH net-next v2] enic: use atomic_t instead of spin_lock in busy poll

2015-06-25 Thread Govindarajulu Varadarajan
efore we move the napi poll to idle. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- v2: Add more details about why gro flush is required while unlocking napi poll. drivers/net/ethernet/cisco/enic/enic_main.c | 4 +- drivers/net/ethernet/cisco/enic/vnic_

Re: [PATCH net-next] enic: use atomic_t instead of spin_lock in busy poll

2015-06-24 Thread Govindarajulu Varadarajan
On Wed, 24 Jun 2015, David Miller wrote: From: Govindarajulu Varadarajan <_gov...@gmx.com> Date: Tue, 23 Jun 2015 21:47:50 +0530 -static inline bool enic_poll_unlock_napi(struct vnic_rq *rq) +static inline void enic_poll_unlock_napi(struct vnic_

[PATCH net-next] enic: use atomic_t instead of spin_lock in busy poll

2015-06-23 Thread Govindarajulu Varadarajan
-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic_main.c | 4 +- drivers/net/ethernet/cisco/enic/vnic_rq.h | 91 + 2 files changed, 29 insertions(+), 66 deletions(-) diff --git a/drivers/net/ethernet/cisco/enic/enic_mai

[PATCH net 2/3] enic: check return value for stat dump

2015-06-10 Thread Govindarajulu Varadarajan
We do not check the return value of enic_dev_stats_dump(). If allocation fails, we will hit NULL pointer reference. Return only if memory allocation fails. For other failures, we return the previously recorded values. Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drive

[PATCH net 3/3] enic: fix memory leak in rq_clean

2015-06-10 Thread Govindarajulu Varadarajan
x95/0x150 [ 40.66] [] enic_rq_alloc_buf+0x1b8/0x360 [enic] [ 40.70] [] enic_open+0xf8/0x820 [enic] [ 40.74] [] __dev_open+0xce/0x150 [ 40.79] [] __dev_change_flags+0xa1/0x170 Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/c

[PATCH net 1/3] enic: unlock napi busy poll before unmasking intr

2015-06-10 Thread Govindarajulu Varadarajan
[ 781.122723] ---[ end trace cec2e9dd3af7b9db ]--- Signed-off-by: Govindarajulu Varadarajan <_gov...@gmx.com> --- drivers/net/ethernet/cisco/enic/enic_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/cisco/enic/enic_main.c b/drivers/net/ethernet/cisc