- 30 9月, 2020 9 次提交
-
-
由 Huazhong Tan 提交于
Currently, the driver is able to query the device's specifications, which includes the maximum BD number of non TSO packet, so replace macro HNS3_MAX_NON_TSO_BD_NUM with the queried value, and rewrite macro HNS3_MAX_NON_TSO_SIZE whose value depends on the the maximum BD number of non TSO packet. Also, add a new parameter max_non_tso_bd_num to function hns3_tx_bd_num() and hns3_skb_need_linearized(), then they can get the maximum BD number of non TSO packet from the caller instead of calculating by themself, The note of hns3_skb_need_linearized() should be update as well. Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
Stanislaw Kardach says: ==================== octeontx2-af: cleanup and extend parser config Current KPU configuration data is spread over multiple files which makes it hard to read. Clean this up by gathering all configuration data in a single structure and also in a single file (npc_profile.h). This should increase the readability of KPU handling code (since it always references same structure), simplify updates to the CAM key extraction code and allow abstracting out the configuration source. Additionally extend and fix the parser config to support additional DSA types, NAT-T-ESP and IPv6 fields. Patch 1 ensures that CUSTOMx LTYPEs are not aliased with meaningful LTYPEs where possible. Patch 2 gathers all KPU profile related data into a single struct and creates an adapter structure which provides an interface to the KPU profile for the octeontx2-af driver. Patches 3-4 add support for Extended DSA, eDSA and Forward DSA. Patches 5-6 adds IPv6 fields to CAM key extraction and optimize the parser performance for fragmented IPv6 packets. Patch 7 refactors ESP handling in the parser to support NAT-T-ESP. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Kiran Kumar K 提交于
Add support for NAT-T-ESP to KPU parser configuration. NAT ESP is a UDP based protocol. So move ESP to LE so that both UDP and ESP can be extracted. Signed-off-by: NKiran Kumar K <kirankumark@marvell.com> Acked-by: NSunil Goutham <sgoutham@marvell.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Abhijit Ayarekar 提交于
IPv6 fragmented packet may not contain completed layer 4 information. So stop KPU parsing after setting ipv6 fragmentation flag. Signed-off-by: NAbhijit Ayarekar <aayarekar@marvell.com> Acked-by: NSunil Goutham <sgoutham@marvell.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Vidhya Vidhyaraman 提交于
Added some IPv6 protocol fields to the default MKEX profile. They include everything from the beginning of IP header and up to source address. The pattern occupies full KW2 in MCAM entry. Only one out of two LD registers for this protocol is used. Signed-off-by: NVidhya Vidhyaraman <vraman@marvell.com> Acked-by: NSunil Goutham <sgoutham@marvell.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Satha Rao 提交于
KPU profile interpret Extended DSA and eDSA by looking source dev. This was incorrect and it restricts to use few source device ids and also created confusion while parsing regular DSA tag. With below patch lookup was based on bit 12 of Word0. This is always zero for DSA tag and it should be one for Extended DSA and eDSA. Signed-off-by: NSatha Rao <skoteshwar@marvell.com> Acked-by: NSunil Goutham <sgoutham@marvell.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Hariprasad Kelam 提交于
Marvell Prestera switches supports distributed switch architecture by inserting Forward DSA tag of 4 bytes right after ethernet SMAC. This tag don't have a tpid field. This patch provides parser and extraction support for the same. Default ldata extraction profile added for FDSA such that Src_port is extracted and placed inplace of vlanid field. Like extended DSA and eDSA tags,a special PKIND of 62 is used for this tag. Signed-off-by: NHariprasad Kelam <hkelam@marvell.com> Acked-by: NSunil Goutham <sgoutham@marvell.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Stanislaw Kardach 提交于
Refactor KPU related NPC code gathering all configuration data in a structured format and putting it in one place (npc_profile.h). This increases readability and makes it easier to extend the profile configuration (as opposed to jumping between multiple header and source files). To do this: * Gather all KPU profile related data into a single adapter struct. * Convert the built-in MKEX definition to a structured one to streamline the MKEX loading. * Convert LT default register configuration into a structure, keeping default protocol settings in same file where identifiers for those protocols are defined. * Add a single point for KPU profile loading, so that its source may change in the future once proper interfaces for loading such config are in place. Signed-off-by: NStanislaw Kardach <skardach@marvell.com> Acked-by: NSunil Goutham <sgoutham@marvell.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Stanislaw Kardach 提交于
Since LD contains LTYPE definitions tweaked toward efficient NIX_AF_RX_FLOW_KEY_ALG(0..31)_FIELD(0..4) usage, the original location of NPC_LT_LD_CUSTOM0/1 was aliased with MPLS_IN_* definitions. Moving custom frame to value 6 and 7 removes the aliasing at the cost of custom frames being also considered when TCP/UDP RSS algo is configured. However since the goal of CUSTOM frames is to classify them to a separate set of RQs, this cost is acceptable. Signed-off-by: NStanislaw Kardach <skardach@marvell.com> Acked-by: NSunil Goutham <sgoutham@marvell.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 29 9月, 2020 31 次提交
-
-
由 Gustavo A. R. Silva 提交于
There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct tc_u_hnode and use the struct_size() helper to calculate the size for the allocations. Commit 5778d39d ("net_sched: fix struct tc_u_hnode layout in u32") makes it clear that the code is expected to dynamically allocate divisor + 1 entries for ->ht[] in tc_uhnode. Also, based on other observations, as the piece of code below: 1232 for (h = 0; h <= ht->divisor; h++) { 1233 for (n = rtnl_dereference(ht->ht[h]); 1234 n; 1235 n = rtnl_dereference(n->next)) { 1236 if (tc_skip_hw(n->flags)) 1237 continue; 1238 1239 err = u32_reoffload_knode(tp, n, add, cb, 1240 cb_priv, extack); 1241 if (err) 1242 return err; 1243 } 1244 } we can assume that, in general, the code is actually expecting to allocate that extra space for the one-element array in tc_uhnode, everytime it allocates memory for instances of tc_uhnode or tc_u_common structures. That's the reason for passing '1' as the last argument for struct_size() in the allocation for _root_ht_ and _tp_c_, and 'divisor + 1' in the allocation code for _ht_. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arraysTested-by: Nkernel test robot <lkp@intel.com> Link: https://lore.kernel.org/lkml/5f7062af.z3T9tn9yIPv6h5Ny%25lkp@intel.com/Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Gustavo A. R. Silva 提交于
There is a regular need in the kernel to provide a way to declare having a dynamically sized set of trailing elements in a structure. Kernel code should always use “flexible array members”[1] for these cases. The older style of one-element or zero-length arrays should no longer be used[2]. Refactor the code according to the use of a flexible-array member in struct qed_ll2_tx_packet, instead of a one-element array and use the struct_size() helper to calculate the size for the allocations. Commit f5823fe6 ("qed: Add ll2 option to limit the number of bds per packet") was used as a reference point for these changes. Also, it's important to notice that flexible-array members should occur last in any structure, and structures containing such arrays and that are members of other structures, must also occur last in the containing structure. That's why _cur_completing_packet_ is now moved to the bottom in struct qed_ll2_tx_queue. _descq_mem_ and _cur_send_packet_ are also moved for unification. [1] https://en.wikipedia.org/wiki/Flexible_array_member [2] https://www.kernel.org/doc/html/v5.9-rc1/process/deprecated.html#zero-length-and-one-element-arraysTested-by: Nkernel test robot <lkp@intel.com> Link: https://lore.kernel.org/lkml/5f707198.PA1UCZ8MYozYZYAR%25lkp@intel.com/Signed-off-by: NGustavo A. R. Silva <gustavoars@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Rusaimi Amira Ruslan 提交于
Adding reference clock (1us tic) for all LPI timer on Intel platforms. The reference clock is derived from ptp clk. This also enables all LPI counter. Signed-off-by: NRusaimi Amira Ruslan <rusaimi.amira.rusaimi@intel.com> Signed-off-by: NVoon Weifeng <weifeng.voon@intel.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
Alex Elder says: ==================== net: ipa: miscellaneous cleanups This series contains some minor cleanups I've been meaning to get around to for a while. The first few remove the definitions of some currently-unused symbols. Several fix some warnings that are reported when the build is done with "W=2". All are simple and have no effect on the operation of the code. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
In ipa_uc_response_hdlr() a comment uses the wrong function name when it describes where a clock reference is taken. Fix this. Also fix the comment in ipa_uc_response_hdlr() to correctly refer to ipa_uc_setup(), which is where the clock reference described here is taken. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
When "W=2" is supplied to the build command, we get a warning about shadowing a global declaration (of a typedef) for a variable defined in ipa_probe(). Rename the variable to get rid of the warning. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
Fix two spots where a variable "channel_id" is unnecessarily redefined inside loops in "gsi.c". This is warned about if "W=2" is added to the build command. Note that this problem is harmless, so there's no need to backport it as a bugfix. Remove a comment in gsi_init() about waking the system; the GSI interrupt does not wake the system any more. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
The GSI general interrupt is managed by three registers: enable; status; and clear. The three registers have same set of field bits at the same locations. Use a common set of field masks for all three registers to avoid duplication. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
The GSI global interrupt is managed by three registers: enable; status; and clear. The three registers have same set of field bits at the same locations. Use a common set of field masks for all three registers to avoid duplication. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
The GSI interrupt type register and interrupt type mask register have the same field bits at the same locations. Use a common set of field masks for both registers rather than essentially duplicating them. The only place the interrupt mask register uses any of these is in gsi_irq_enable(). Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
Most of the field masks used for fields in a status structure are unused. Remove their definitions; we can add them back again when we actually use them to handle arriving status messages. These are warned about if "W=2" is added to the build command. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
Only the deaggregation status exception type is ever actually used. If any other status exception type is reported we basically ignore it, and consume the packet. Remove the unused definitions of status exception type symbols; they can be added back when we actually handle them. Separately, two consecutive if statements test the same condition near the top of ipa_endpoint_suspend_one(). Instead, use a single test with a block that combines the previously-separate lines of code. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
Three status opcodes are not currently supported. Symbols representing their numeric values are defined but never used. Remove those unused definitions; they can be defined again when they actually get used. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Elder 提交于
In "gsi_trans.c", the field mask TRE_FLAGS_IEOB_FMASK is defined but never used. Although there's no harm in defining this, remove it for now and redefine it at some future date if it becomes needed. This is warned about if "W=2" is added to the build command. Signed-off-by: NAlex Elder <elder@linaro.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
Lijun Pan says: ==================== ibmvnic: refactor some send/handle functions This patch series rename and factor some send crq request functions. The new naming aligns better with handle* functions such that it make the code easier to read and search by new contributors. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lijun Pan 提交于
Factor send_control_ip_offload out of handle_query_ip_offload_rsp. Signed-off-by: NLijun Pan <ljp@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lijun Pan 提交于
Factor send_query_ip_offload out of handle_request_cap_rsp to pair with handle_query_ip_offload_rsp. Signed-off-by: NLijun Pan <ljp@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lijun Pan 提交于
The new name send_query_map pairs with handle_query_map_rsp. Signed-off-by: NLijun Pan <ljp@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lijun Pan 提交于
The new name send_request_cap pairs with handle_request_cap_rsp. Signed-off-by: NLijun Pan <ljp@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lijun Pan 提交于
The new name send_query_cap pairs with handle_query_cap_rsp. Signed-off-by: NLijun Pan <ljp@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lijun Pan 提交于
Set up the speed according to crq->query_phys_parms.rsp.speed. Fix IBMVNIC_10GBPS typo. Fixes: f8d6ae0d ("ibmvnic: Report actual backing device speed and duplex values") Signed-off-by: NLijun Pan <ljp@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Rikard Falkeborn 提交于
The only usage of atmtcp_v_dev_ops is to pass its address to atm_dev_register() which takes a pointer to const, and comparing its address to another address, which does not modify it. Make it const to allow the compiler to put it in read-only memory. Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Davide Caratti 提交于
similarly to what has been done with commit 9d149045 ("geneve: change from tx_error to tx_dropped on missing metadata"), avoid reporting errors to userspace in case the kernel doesn't find any tunnel information for a skb that is going to be transmitted: an increase of tx_dropped is enough. tested with the following script: # for t in ip6gre ip6gretap ip6erspan; do > ip link add dev gre6-test0 type $t external > ip address add dev gre6-test0 2001:db8::1/64 > ip link set dev gre6-test0 up > sleep 30 > ip -s -j link show dev gre6-test0 | jq \ > '.[0].stats64.tx | {"errors": .errors, "dropped": .dropped}' > ip link del dev gre6-test0 > done Reported-by: NJianlin Shi <jishi@redhat.com> Signed-off-by: NDavide Caratti <dcaratti@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 David S. Miller 提交于
Karsten Graul says: ==================== net/smc: introduce SMC-Dv2 support SMC-Dv2 support (see https://www.ibm.com/support/pages/node/6326337) provides multi-subnet support for SMC-D, eliminating the current same-subnet restriction. The new version detects if any of the virtual ISM devices are on the same system and can therefore be used for an SMC-Dv2 connection. Furthermore, SMC-Dv2 eliminates the need for PNET IDs on s390. ==================== Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ursula Braun 提交于
This patch covers the small SMCD version 2 changes for CLC decline. Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com> Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ursula Braun 提交于
SMC Version 2 defines a first contact extension for CLC accept and CLC confirm. This patch covers sending and receiving of the CLC first contact extension. Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com> Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ursula Braun 提交于
The new format of SMCD V2 CLC accept and confirm is introduced, and building and checking of SMCD V2 CLC accepts / confirms is adapted accordingly. Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com> Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ursula Braun 提交于
SMCD Version 2 allows to propose up to 8 additional ISM devices offered to the peer as candidates for SMCD communication. This patch covers the server side, i.e. selection of an ISM device matching one of the proposed ISM devices, that will be used for CLC accept Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com> Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ursula Braun 提交于
The new format of an SMCD V2 CLC proposal is introduced, and building and checking of SMCD V2 CLC proposals is adapted accordingly. Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com> Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ursula Braun 提交于
SMCD Version 2 allows to propose up to 8 additional ISM devices offered to the peer as candidates for SMCD communication. This patch covers determination of the ISM devices to be proposed. ISM devices without PNETID are preferred, since ISM devices with PNETID are a V1 leftover and will disappear over the time. Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com> Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Ursula Braun 提交于
SMCD version 2 allows usage of ISM devices with hardware PNETID only, if an Ethernet net_device exists with the same hardware PNETID. This requires to maintain a list of pnetids belonging to Ethernet net_devices, which is covered by this patch. Signed-off-by: NUrsula Braun <ubraun@linux.ibm.com> Signed-off-by: NKarsten Graul <kgraul@linux.ibm.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-